mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-30 21:03:49 +02:00
parent
2c6063569a
commit
a8b78a9b0a
@ -23,7 +23,8 @@ from gns3server.controller import Controller
|
|||||||
|
|
||||||
from gns3server.schemas.node import (
|
from gns3server.schemas.node import (
|
||||||
NODE_OBJECT_SCHEMA,
|
NODE_OBJECT_SCHEMA,
|
||||||
NODE_UPDATE_SCHEMA
|
NODE_UPDATE_SCHEMA,
|
||||||
|
NODE_CREATE_SCHEMA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -42,7 +43,7 @@ class NodeHandler:
|
|||||||
400: "Invalid request"
|
400: "Invalid request"
|
||||||
},
|
},
|
||||||
description="Create a new node instance",
|
description="Create a new node instance",
|
||||||
input=NODE_OBJECT_SCHEMA,
|
input=NODE_CREATE_SCHEMA,
|
||||||
output=NODE_OBJECT_SCHEMA)
|
output=NODE_OBJECT_SCHEMA)
|
||||||
def create(request, response):
|
def create(request, response):
|
||||||
|
|
||||||
|
@ -233,5 +233,6 @@ NODE_OBJECT_SCHEMA = {
|
|||||||
"required": ["name", "node_type", "compute_id"]
|
"required": ["name", "node_type", "compute_id"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NODE_CREATE_SCHEMA = NODE_OBJECT_SCHEMA
|
||||||
NODE_UPDATE_SCHEMA = NODE_OBJECT_SCHEMA
|
NODE_UPDATE_SCHEMA = NODE_OBJECT_SCHEMA
|
||||||
del NODE_UPDATE_SCHEMA["required"]
|
del NODE_UPDATE_SCHEMA["required"]
|
||||||
|
@ -52,6 +52,7 @@ PROJECT_CREATE_SCHEMA = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": False,
|
"additionalProperties": False,
|
||||||
|
"required": ["name"]
|
||||||
}
|
}
|
||||||
|
|
||||||
PROJECT_UPDATE_SCHEMA = {
|
PROJECT_UPDATE_SCHEMA = {
|
||||||
|
Loading…
Reference in New Issue
Block a user