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