2016-07-11 13:37:57 +00:00
{
2018-01-08 08:26:44 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "The topology" ,
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2018-01-08 08:26:44 +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"
]
} ,
"auto_start" : {
"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" : {
2018-01-08 08:26:44 +00:00
"description" : "Open the topology with GNS3" ,
"type" : "boolean"
} ,
"revision" : {
"description" : "Version of the .gns3 specification." ,
"type" : "integer"
2017-03-06 13:35:39 +00:00
} ,
"version" : {
2018-01-08 08:26:44 +00:00
"description" : "Version of the GNS3 software which have update the file for the last time" ,
"type" : "string"
2017-03-06 13:35:39 +00:00
} ,
"name" : {
"type" : "string" ,
"description" : "Name of the project"
} ,
"scene_height" : {
"type" : "integer" ,
"description" : "Height of the drawing area"
} ,
2018-01-08 08:26:44 +00:00
"scene_width" : {
"type" : "integer" ,
"description" : "Width of the drawing area"
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"zoom" : {
"type" : "integer" ,
"description" : "Zoom of the drawing area"
} ,
"show_layers" : {
"type" : "boolean" ,
"description" : "Show layers on the drawing area"
} ,
"snap_to_grid" : {
"type" : "boolean" ,
"description" : "Snap to grid on the drawing area"
} ,
"show_grid" : {
"type" : "boolean" ,
"description" : "Show the grid on the drawing area"
} ,
"show_interface_labels" : {
"type" : "boolean" ,
"description" : "Show interface labels on the drawing area"
2016-08-25 12:43:19 +00:00
} ,
2016-07-14 13:31:49 +00:00
"topology" : {
2018-01-08 08:26:44 +00:00
"description" : "The topology content" ,
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2018-01-08 08:26:44 +00:00
"computes" : {
"description" : "Computes servers" ,
2017-03-06 13:35:39 +00:00
"type" : "array" ,
2016-10-20 08:54:07 +00:00
"items" : {
2018-01-08 08:26:44 +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" : {
2018-01-08 08:26:44 +00:00
"compute_id" : {
"description" : "Server identifier" ,
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"name" : {
"description" : "Server name" ,
"type" : "string"
} ,
"protocol" : {
"description" : "Server protocol" ,
"enum" : [
"http" ,
"https"
]
} ,
"host" : {
"description" : "Server host" ,
"type" : "string"
} ,
"port" : {
"description" : "Server port" ,
"type" : "integer"
} ,
"user" : {
"description" : "User for authentication" ,
2016-10-20 08:54:07 +00:00
"type" : [
"string" ,
"null"
2018-01-08 08:26:44 +00:00
]
2016-10-20 08:54:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"connected" : {
"description" : "Whether the controller is connected to the compute server or not" ,
"type" : "boolean"
} ,
"cpu_usage_percent" : {
"description" : "CPU usage of the compute. Read only" ,
2016-10-20 08:54:07 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"number" ,
"null"
2016-11-03 17:20:51 +00:00
] ,
2018-01-08 08:26:44 +00:00
"maximum" : 100 ,
"minimum" : 0
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"memory_usage_percent" : {
"description" : "RAM usage of the compute. Read only" ,
2016-10-20 08:54:07 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"number" ,
"null"
2016-11-03 17:20:51 +00:00
] ,
2018-01-08 08:26:44 +00:00
"maximum" : 100 ,
"minimum" : 0
2016-10-20 08:54:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"capabilities" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Get what a server support" ,
"type" : "object" ,
"required" : [
"version" ,
"node_types"
2017-03-06 13:35:39 +00:00
] ,
2016-08-29 13:58:29 +00:00
"properties" : {
2018-01-08 08:26:44 +00:00
"version" : {
"description" : "Version number" ,
2016-08-29 13:58:29 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"string" ,
2016-08-29 13:58:29 +00:00
"null"
2018-01-08 08:26:44 +00:00
]
2016-10-20 08:54:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"node_types" : {
"type" : "array" ,
"items" : {
"description" : "Type of node" ,
"enum" : [
"cloud" ,
"nat" ,
"ethernet_hub" ,
"ethernet_switch" ,
"frame_relay_switch" ,
"atm_switch" ,
"docker" ,
"dynamips" ,
"vpcs" ,
"virtualbox" ,
"vmware" ,
"iou" ,
"qemu"
]
} ,
"description" : "Node type supported by the compute"
} ,
"platform" : {
"type" : "string" ,
"description" : "Platform where the compute is running"
2018-01-08 04:57:07 +00:00
}
} ,
2018-01-08 08:26:44 +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" ,
"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}$"
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +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}$"
} ,
"x" : {
"description" : "X property" ,
"type" : "integer"
} ,
"y" : {
"description" : "Y property" ,
"type" : "integer"
} ,
"z" : {
"description" : "Z property" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the element" ,
2018-01-08 04:57:07 +00:00
"type" : "integer" ,
2018-01-08 08:26:44 +00:00
"minimum" : -359 ,
"maximum" : 360
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"svg" : {
"description" : "SVG content of the drawing" ,
"type" : "string"
}
} ,
"additionalProperties" : false
}
} ,
"links" : {
"description" : "Link elements" ,
"type" : "array" ,
"items" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "A link object" ,
"type" : "object" ,
"properties" : {
"link_id" : {
"description" : "Link 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}$"
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +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}$"
} ,
"nodes" : {
"description" : "List of the VMS" ,
2018-01-08 04:57:07 +00:00
"type" : "array" ,
"items" : {
2018-01-08 08:26:44 +00:00
"type" : "object" ,
2018-01-08 04:57:07 +00:00
"properties" : {
2018-01-08 08:26:44 +00:00
"node_id" : {
"description" : "Node UUID" ,
2018-01-08 04:57:07 +00:00
"type" : "string" ,
2018-01-08 08:26:44 +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}$"
2018-01-08 04:57:07 +00:00
} ,
"adapter_number" : {
2018-01-08 08:26:44 +00:00
"description" : "Adapter number" ,
"type" : "integer"
2018-01-08 04:57:07 +00:00
} ,
"port_number" : {
2018-01-08 08:26:44 +00:00
"description" : "Port number" ,
"type" : "integer"
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"label" : {
2018-01-08 04:57:07 +00:00
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
2018-01-08 04:57:07 +00:00
"text" : {
2017-03-06 13:35:39 +00:00
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"style" : {
"description" : "SVG style attribute" ,
"type" : "string"
} ,
2016-11-03 17:20:51 +00:00
"x" : {
2018-01-08 08:26:44 +00:00
"description" : "Relative X position of the label. If null center it" ,
2016-11-03 17:20:51 +00:00
"type" : [
"integer" ,
"null"
2018-01-08 08:26:44 +00:00
]
} ,
"y" : {
"description" : "Relative Y position of the label" ,
"type" : "integer"
2017-03-06 13:35:39 +00:00
} ,
"rotation" : {
2018-01-08 08:26:44 +00:00
"description" : "Rotation of the label" ,
2017-03-06 13:35:39 +00:00
"type" : "integer" ,
"minimum" : -359 ,
2018-01-08 08:26:44 +00:00
"maximum" : 360
2016-11-03 17:20:51 +00:00
}
} ,
"required" : [
"text" ,
"x" ,
"y"
2018-01-08 08:26:44 +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"
2018-01-08 08:26:44 +00:00
] ,
"additionalProperties" : false
}
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"suspend" : {
"type" : "boolean" ,
"description" : "Suspend the link"
} ,
"filters" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Packet filter. This allow to simulate latency and errors" ,
"type" : "object"
2017-03-06 13:35:39 +00:00
} ,
"capturing" : {
2018-01-08 08:26:44 +00:00
"description" : "Read only property. True if a capture running on the link" ,
"type" : "boolean"
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"capture_file_name" : {
"description" : "Read only property. The name of the capture file if capture is running" ,
2017-03-06 13:35:39 +00:00
"type" : [
"string" ,
"null"
2018-01-08 08:26:44 +00:00
]
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"capture_file_path" : {
"description" : "Read only property. The full path of the capture file if capture is running" ,
2017-03-06 13:35:39 +00:00
"type" : [
"string" ,
"null"
2018-01-08 08:26:44 +00:00
]
2017-03-06 13:35:39 +00:00
} ,
"link_type" : {
2018-01-08 08:26:44 +00:00
"description" : "Type of link" ,
2017-03-06 13:35:39 +00:00
"enum" : [
"ethernet" ,
"serial"
2018-01-08 08:26:44 +00:00
]
2016-11-03 17:20:51 +00:00
}
} ,
2018-01-08 08:26:44 +00:00
"additionalProperties" : false
}
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"nodes" : {
"description" : "Nodes elements" ,
2017-03-06 13:35:39 +00:00
"type" : "array" ,
2016-11-03 17:20:51 +00:00
"items" : {
2018-01-08 08:26:44 +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" : {
2018-01-08 08:26:44 +00:00
"compute_id" : {
"description" : "Compute identifier" ,
"type" : "string"
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"project_id" : {
"description" : "Project UUID" ,
2017-03-06 13:35:39 +00:00
"type" : "string" ,
"minLength" : 36 ,
2018-01-08 08:26:44 +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-10-20 08:54:07 +00:00
} ,
2018-01-08 08:26:44 +00:00
"node_id" : {
"description" : "Node UUID" ,
2018-01-08 04:57:07 +00:00
"type" : "string" ,
2018-01-08 08:26:44 +00:00
"minLength" : 36 ,
2018-01-08 04:57:07 +00:00
"maxLength" : 36 ,
2018-01-08 08:26:44 +00:00
"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" ,
"type" : [
"null" ,
"string"
]
} ,
"command_line" : {
"description" : "Command line use to start the node" ,
"type" : [
"null" ,
"string"
]
} ,
"name" : {
"description" : "Node name" ,
2017-03-06 13:35:39 +00:00
"type" : "string" ,
2018-01-08 08:26:44 +00:00
"minLength" : 1
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"console" : {
"description" : "Console TCP port" ,
"minimum" : 1 ,
"maximum" : 65535 ,
2017-03-06 13:35:39 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"integer" ,
2016-11-03 17:20:51 +00:00
"null"
2018-01-08 08:26:44 +00:00
]
2016-09-14 13:24:27 +00:00
} ,
2018-01-08 08:26:44 +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
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"console_type" : {
"description" : "Console type" ,
2016-09-14 13:24:27 +00:00
"enum" : [
2018-01-08 08:26:44 +00:00
"vnc" ,
"telnet" ,
2016-10-20 08:54:07 +00:00
"http" ,
2018-01-08 08:26:44 +00:00
"https" ,
"spice" ,
null
]
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"properties" : {
"description" : "Properties specific to an emulator" ,
"type" : "object"
} ,
"status" : {
"description" : "Status of the node" ,
"enum" : [
"stopped" ,
"started" ,
"suspended"
]
} ,
"label" : {
"type" : "object" ,
2016-11-03 17:20:51 +00:00
"properties" : {
2018-01-08 08:26:44 +00:00
"text" : {
"type" : "string"
2016-11-03 17:20:51 +00:00
} ,
2018-01-08 08:26:44 +00:00
"style" : {
"description" : "SVG style attribute" ,
"type" : "string"
} ,
"x" : {
"description" : "Relative X position of the label. If null center it" ,
2016-11-03 17:20:51 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"integer" ,
2016-11-03 17:20:51 +00:00
"null"
2018-01-08 08:26:44 +00:00
]
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +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" : [
2018-01-08 08:26:44 +00:00
"text" ,
"x" ,
"y"
] ,
"additionalProperties" : false
2018-01-08 04:57:07 +00:00
} ,
2018-01-08 08:26:44 +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
] ,
2018-01-08 08:26:44 +00:00
"minLength" : 1
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"width" : {
"description" : "Width of the node (Read only)" ,
"type" : "integer"
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"height" : {
"description" : "Height of the node (Read only)" ,
"type" : "integer"
2016-09-27 15:15:40 +00:00
} ,
2018-01-08 08:26:44 +00:00
"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" ,
"minimum" : 0
} ,
"first_port_name" : {
"description" : "Name of the first port" ,
2017-03-06 13:35:39 +00:00
"type" : [
2018-01-08 08:26:44 +00:00
"string" ,
2017-03-06 13:35:39 +00:00
"null"
2018-01-08 08:26:44 +00:00
]
2017-03-06 13:35:39 +00:00
} ,
2018-01-08 08:26:44 +00:00
"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-06-29 15:14:09 +00:00
"additionalProperties" : false ,
"required" : [
2018-01-08 08:26:44 +00:00
"name" ,
"node_type" ,
"compute_id"
]
}
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
] ,
2018-01-08 08:26:44 +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"
2018-01-08 08:26:44 +00:00
] ,
"additionalProperties" : false
2016-07-11 13:37:57 +00:00
}