2016-07-11 13:37:57 +00:00
{
2017-03-06 13:35:39 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "The topology" ,
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"project_id" : {
"description" : "Project UUID" ,
"type" : "string" ,
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
} ,
"type" : {
"description" : "Type of file. It's always topology" ,
"enum" : [
"topology"
]
} ,
2016-11-03 17:20:51 +00:00
"auto_start" : {
2017-03-06 13:35:39 +00:00
"description" : "Start the topology when opened" ,
"type" : "boolean"
} ,
"auto_close" : {
"description" : "Close the topology when no client is connected" ,
"type" : "boolean"
2016-09-27 15:15:40 +00:00
} ,
"auto_open" : {
2017-03-06 13:35:39 +00:00
"description" : "Open the topology with GNS3" ,
"type" : "boolean"
} ,
"revision" : {
"description" : "Version of the .gns3 specification." ,
"type" : "integer"
} ,
"version" : {
"description" : "Version of the GNS3 software which have update the file for the last time" ,
"type" : "string"
} ,
"name" : {
"type" : "string" ,
"description" : "Name of the project"
} ,
"scene_height" : {
"type" : "integer" ,
"description" : "Height of the drawing area"
} ,
"scene_width" : {
"type" : "integer" ,
"description" : "Width of the drawing area"
2016-08-25 12:43:19 +00:00
} ,
2016-07-14 13:31:49 +00:00
"topology" : {
2017-03-06 13:35:39 +00:00
"description" : "The topology content" ,
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"computes" : {
"description" : "Computes servers" ,
"type" : "array" ,
2016-10-20 08:54:07 +00:00
"items" : {
2017-03-06 13:35:39 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Request validation to a GNS3 compute object instance" ,
"type" : "object" ,
2016-10-20 08:54:07 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"compute_id" : {
"description" : "Server identifier" ,
"type" : "string"
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"name" : {
"description" : "Server name" ,
"type" : "string"
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"protocol" : {
"description" : "Server protocol" ,
"enum" : [
"http" ,
"https"
]
2016-07-22 11:54:57 +00:00
} ,
2017-03-06 13:35:39 +00:00
"host" : {
"description" : "Server host" ,
"type" : "string"
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"port" : {
"description" : "Server port" ,
"type" : "integer"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"user" : {
"description" : "User for authentication" ,
2016-10-20 08:54:07 +00:00
"type" : [
"string" ,
"null"
2017-03-06 13:35:39 +00:00
]
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"connected" : {
"description" : "Whether the controller is connected to the compute server or not" ,
"type" : "boolean"
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"cpu_usage_percent" : {
"description" : "CPU usage of the compute. Read only" ,
2016-10-20 08:54:07 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"number" ,
2016-10-20 08:54:07 +00:00
"null"
2016-11-03 17:20:51 +00:00
] ,
2017-03-06 13:35:39 +00:00
"maximum" : 100 ,
2016-11-03 17:20:51 +00:00
"minimum" : 0
} ,
2017-03-06 13:35:39 +00:00
"memory_usage_percent" : {
"description" : "RAM usage of the compute. Read only" ,
2016-10-20 08:54:07 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"number" ,
2016-11-03 17:20:51 +00:00
"null"
] ,
2017-03-06 13:35:39 +00:00
"maximum" : 100 ,
"minimum" : 0
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"capabilities" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Get what a server support" ,
"type" : "object" ,
"required" : [
"version" ,
"node_types"
] ,
2016-08-29 13:58:29 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"version" : {
"description" : "Version number" ,
2016-08-29 13:58:29 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"string" ,
2016-08-29 13:58:29 +00:00
"null"
2017-03-06 13:35:39 +00:00
]
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"node_types" : {
"type" : "array" ,
"items" : {
"description" : "Type of node" ,
2016-11-03 17:20:51 +00:00
"enum" : [
2017-03-06 13:35:39 +00:00
"cloud" ,
"nat" ,
"ethernet_hub" ,
"ethernet_switch" ,
"frame_relay_switch" ,
"atm_switch" ,
"docker" ,
"dynamips" ,
"vpcs" ,
"virtualbox" ,
"vmware" ,
"iou" ,
"qemu"
]
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"description" : "Node type supported by the compute"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"platform" : {
"type" : "string" ,
"description" : "Platform where the compute is running"
}
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
}
} ,
"additionalProperties" : false ,
"required" : [
"compute_id" ,
"protocol" ,
"host" ,
"port" ,
"name"
]
}
} ,
"drawings" : {
"description" : "Drawings elements" ,
"type" : "array" ,
"items" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "An drawing object" ,
"type" : "object" ,
"properties" : {
"drawing_id" : {
"description" : "Drawing UUID" ,
2016-11-03 17:20:51 +00:00
"type" : "string" ,
2017-03-06 13:35:39 +00:00
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"project_id" : {
"description" : "Project UUID" ,
"type" : "string" ,
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"x" : {
"description" : "X property" ,
"type" : "integer"
2016-11-03 17:20:51 +00:00
} ,
"y" : {
2017-03-06 13:35:39 +00:00
"description" : "Y property" ,
"type" : "integer"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"z" : {
"description" : "Z property" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the element" ,
2016-11-03 17:20:51 +00:00
"type" : "integer" ,
2017-03-06 13:35:39 +00:00
"minimum" : -359 ,
"maximum" : 360
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"svg" : {
"description" : "SVG content of the drawing" ,
"type" : "string"
2016-11-03 17:20:51 +00:00
}
} ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
}
2016-11-03 17:20:51 +00:00
} ,
"links" : {
2017-03-06 13:35:39 +00:00
"description" : "Link elements" ,
"type" : "array" ,
2016-11-03 17:20:51 +00:00
"items" : {
2017-03-06 13:35:39 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "A link object" ,
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
"link_id" : {
"description" : "Link UUID" ,
2017-03-06 13:35:39 +00:00
"type" : "string" ,
"minLength" : 36 ,
2016-11-03 17:20:51 +00:00
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
2016-09-27 15:15:40 +00:00
} ,
2016-11-03 17:20:51 +00:00
"project_id" : {
"description" : "Project UUID" ,
2017-03-06 13:35:39 +00:00
"type" : "string" ,
"minLength" : 36 ,
2016-11-03 17:20:51 +00:00
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
} ,
"nodes" : {
2017-03-06 13:35:39 +00:00
"description" : "List of the VMS" ,
"type" : "array" ,
2016-09-14 13:24:27 +00:00
"items" : {
2017-03-06 13:35:39 +00:00
"type" : "object" ,
2016-09-14 13:24:27 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"node_id" : {
"description" : "Node UUID" ,
"type" : "string" ,
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
} ,
2016-10-20 08:54:07 +00:00
"adapter_number" : {
2017-03-06 13:35:39 +00:00
"description" : "Adapter number" ,
"type" : "integer"
} ,
"port_number" : {
"description" : "Port number" ,
"type" : "integer"
2016-10-20 08:54:07 +00:00
} ,
2016-11-03 17:20:51 +00:00
"label" : {
2017-03-06 13:35:39 +00:00
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
"text" : {
"type" : "string"
} ,
2017-03-06 13:35:39 +00:00
"style" : {
"description" : "SVG style attribute" ,
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
"x" : {
2017-03-06 13:35:39 +00:00
"description" : "Relative X position of the label. If null center it" ,
2016-11-03 17:20:51 +00:00
"type" : [
"integer" ,
"null"
2017-03-06 13:35:39 +00:00
]
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"y" : {
"description" : "Relative Y position of the label" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the label" ,
"type" : "integer" ,
"minimum" : -359 ,
"maximum" : 360
2016-11-03 17:20:51 +00:00
}
} ,
"required" : [
"text" ,
"x" ,
"y"
2017-03-06 13:35:39 +00:00
] ,
"additionalProperties" : false
2016-09-14 13:24:27 +00:00
}
} ,
2016-11-03 17:20:51 +00:00
"required" : [
"node_id" ,
"adapter_number" ,
"port_number"
2017-03-06 13:35:39 +00:00
] ,
"additionalProperties" : false
}
} ,
"capturing" : {
"description" : "Read only property. True if a capture running on the link" ,
"type" : "boolean"
} ,
"capture_file_name" : {
"description" : "Read only property. The name of the capture file if capture is running" ,
"type" : [
"string" ,
"null"
]
} ,
"capture_file_path" : {
"description" : "Read only property. The full path of the capture file if capture is running" ,
"type" : [
"string" ,
"null"
]
} ,
"link_type" : {
"description" : "Type of link" ,
"enum" : [
"ethernet" ,
"serial"
]
2016-11-03 17:20:51 +00:00
}
} ,
"required" : [
"nodes"
] ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
}
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"nodes" : {
"description" : "Nodes elements" ,
"type" : "array" ,
2016-11-03 17:20:51 +00:00
"items" : {
2017-03-06 13:35:39 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "A node object" ,
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"compute_id" : {
"description" : "Compute identifier" ,
"type" : "string"
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"project_id" : {
"description" : "Project UUID" ,
"type" : "string" ,
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
} ,
"node_id" : {
"description" : "Node UUID" ,
"type" : "string" ,
"minLength" : 36 ,
"maxLength" : 36 ,
"pattern" : "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
} ,
"node_type" : {
"description" : "Type of node" ,
"enum" : [
"cloud" ,
"nat" ,
"ethernet_hub" ,
"ethernet_switch" ,
"frame_relay_switch" ,
"atm_switch" ,
"docker" ,
"dynamips" ,
"vpcs" ,
"virtualbox" ,
"vmware" ,
"iou" ,
"qemu"
]
} ,
"node_directory" : {
"description" : "Working directory of the node. Read only" ,
2016-11-03 17:20:51 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"null" ,
"string"
]
2016-10-20 08:54:07 +00:00
} ,
2017-03-06 13:35:39 +00:00
"command_line" : {
"description" : "Command line use to start the node" ,
2016-11-03 17:20:51 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"null" ,
"string"
]
} ,
"name" : {
"description" : "Node name" ,
"type" : "string" ,
"minLength" : 1
} ,
"console" : {
"description" : "Console TCP port" ,
"minimum" : 1 ,
"maximum" : 65535 ,
"type" : [
"integer" ,
2016-11-03 17:20:51 +00:00
"null"
2017-03-06 13:35:39 +00:00
]
2016-09-14 13:24:27 +00:00
} ,
2017-03-06 13:35:39 +00:00
"console_host" : {
"description" : "Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller." ,
"type" : "string" ,
"minLength" : 1
} ,
"console_type" : {
"description" : "Console type" ,
2016-09-14 13:24:27 +00:00
"enum" : [
2017-03-06 13:35:39 +00:00
"vnc" ,
"telnet" ,
2016-10-20 08:54:07 +00:00
"http" ,
2017-03-06 13:35:39 +00:00
null
]
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"properties" : {
"description" : "Properties specific to an emulator" ,
"type" : "object"
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"status" : {
"description" : "Status of the node" ,
"enum" : [
"stopped" ,
"started" ,
"suspended"
]
} ,
"label" : {
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
2017-03-06 13:35:39 +00:00
"text" : {
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"style" : {
"description" : "SVG style attribute" ,
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"x" : {
"description" : "Relative X position of the label. If null center it" ,
2016-11-03 17:20:51 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"integer" ,
2016-11-03 17:20:51 +00:00
"null"
2017-03-06 13:35:39 +00:00
]
} ,
"y" : {
"description" : "Relative Y position of the label" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the label" ,
"type" : "integer" ,
"minimum" : -359 ,
"maximum" : 360
2016-11-03 17:20:51 +00:00
}
} ,
"required" : [
2017-03-06 13:35:39 +00:00
"text" ,
"x" ,
"y"
2016-11-03 17:20:51 +00:00
] ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"symbol" : {
"description" : "Symbol of the node" ,
2016-09-27 15:15:40 +00:00
"type" : [
2017-03-06 13:35:39 +00:00
"string" ,
2016-10-20 08:54:07 +00:00
"null"
2016-09-27 15:15:40 +00:00
] ,
2017-03-06 13:35:39 +00:00
"minLength" : 1
} ,
"width" : {
"description" : "Width of the node (Read only)" ,
"type" : "integer"
} ,
"height" : {
"description" : "Height of the node (Read only)" ,
"type" : "integer"
} ,
"x" : {
"description" : "X position of the node" ,
"type" : "integer"
} ,
"y" : {
"description" : "Y position of the node" ,
"type" : "integer"
} ,
"z" : {
"description" : "Z position of the node" ,
"type" : "integer"
} ,
"port_name_format" : {
"description" : "Formating for port name {0} will be replace by port number" ,
"type" : "string"
} ,
"port_segment_size" : {
"description" : "Size of the port segment" ,
"type" : "integer" ,
2016-11-03 17:20:51 +00:00
"minimum" : 0
2016-09-27 15:15:40 +00:00
} ,
2017-03-06 13:35:39 +00:00
"first_port_name" : {
"description" : "Name of the first port" ,
"type" : [
"string" ,
"null"
]
} ,
"ports" : {
"description" : "List of node ports READ only" ,
"type" : "array" ,
"items" : {
"type" : "object" ,
"description" : "A node port" ,
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Port name"
} ,
"short_name" : {
"type" : "string" ,
"description" : "Short version of port name"
} ,
"adapter_number" : {
"type" : "integer" ,
"description" : "Adapter slot"
} ,
"port_number" : {
"type" : "integer" ,
"description" : "Port slot"
} ,
"link_type" : {
"description" : "Type of link" ,
"enum" : [
"ethernet" ,
"serial"
]
} ,
"data_link_types" : {
"type" : "object" ,
"description" : "Available PCAP type for capture" ,
"properties" : { }
}
} ,
"additionalProperties" : false
}
2016-07-11 13:37:57 +00:00
}
2016-11-03 17:20:51 +00:00
} ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
}
2016-07-11 13:37:57 +00:00
}
2016-07-14 13:31:49 +00:00
} ,
2016-10-20 08:54:07 +00:00
"required" : [
"nodes" ,
"links" ,
"drawings" ,
"computes"
2016-11-03 17:20:51 +00:00
] ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
2016-07-11 13:37:57 +00:00
}
2016-09-27 15:15:40 +00:00
} ,
"required" : [
"project_id" ,
"type" ,
"revision" ,
"version" ,
"name" ,
"topology"
2016-11-03 17:20:51 +00:00
] ,
2017-03-06 13:35:39 +00:00
"additionalProperties" : false
2016-07-11 13:37:57 +00:00
}