mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +02:00
Option to reset or not all MAC addresses when exporting or duplicating a project.
This commit is contained in:
1 parent
5575657318
commit
8eefaa3f32
3 files changed
+24
-6
No files matched your search
@@ -15,6 +15,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import copy
|
||||
|
||||
SUPPLIER_OBJECT_SCHEMA = {
|
||||
"type": ["object", "null"],
|
||||
"description": "Supplier of the project",
|
||||
@@ -120,6 +122,13 @@ PROJECT_CREATE_SCHEMA = {
|
||||
"required": ["name"]
|
||||
}
|
||||
|
||||
# Create a project duplicate schema based on create schema and add "reset_mac_addresses" properties
|
||||
PROJECT_DUPLICATE_SCHEMA = copy.deepcopy(PROJECT_CREATE_SCHEMA)
|
||||
PROJECT_DUPLICATE_SCHEMA["description"] = "Request validation to duplicate a Project instance"
|
||||
PROJECT_DUPLICATE_SCHEMA["properties"].update({"reset_mac_addresses": {"type": "boolean",
|
||||
"description": "Reset MAC addresses for this project"
|
||||
}})
|
||||
|
||||
PROJECT_UPDATE_SCHEMA = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"description": "Request validation to update a Project instance",
|
||||
|
||||
Reference in new issue
Block a user