2016-07-11 13:37:57 +00:00
{
2018-08-16 14:31:56 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
2018-11-20 06:04:27 +00:00
"description" : "The topology" ,
2018-08-16 14:31:56 +00:00
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2018-11-20 06:04:27 +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}$"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"type" : {
"description" : "Type of file. It's always topology" ,
"enum" : [
"topology"
]
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"auto_start" : {
"description" : "Start the topology when opened" ,
"type" : "boolean"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"auto_close" : {
"description" : "Close the topology when no client is connected" ,
"type" : "boolean"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"auto_open" : {
"description" : "Open the topology with GNS3" ,
"type" : "boolean"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"revision" : {
"description" : "Version of the .gns3 specification." ,
"type" : "integer"
2018-08-16 14:31:56 +00:00
} ,
"version" : {
2018-11-20 06:04:27 +00:00
"description" : "Version of the GNS3 software which have update the file for the last time" ,
"type" : "string"
2018-08-16 14:31:56 +00:00
} ,
"name" : {
"type" : "string" ,
"description" : "Name of the project"
} ,
2018-11-20 06:04:27 +00:00
"scene_height" : {
2018-08-16 14:31:56 +00:00
"type" : "integer" ,
2018-11-20 06:04:27 +00:00
"description" : "Height of the drawing area"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"scene_width" : {
"type" : "integer" ,
"description" : "Width of the drawing area"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"zoom" : {
2018-08-16 14:31:56 +00:00
"type" : "integer" ,
2018-11-20 06:04:27 +00:00
"description" : "Zoom of the drawing area"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"show_layers" : {
2018-08-16 14:31:56 +00:00
"type" : "boolean" ,
2018-11-20 06:04:27 +00:00
"description" : "Show layers on the drawing area"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"snap_to_grid" : {
"type" : "boolean" ,
"description" : "Snap to grid on the drawing area"
2018-08-16 14:31:56 +00:00
} ,
2018-01-08 08:26:44 +00:00
"show_grid" : {
2018-08-16 14:31:56 +00:00
"type" : "boolean" ,
"description" : "Show the grid on the drawing area"
} ,
2018-11-20 06:04:27 +00:00
"grid_size" : {
"type" : "integer" ,
2018-11-28 09:12:57 +00:00
"description" : "Grid size for the drawing area for nodes"
} ,
"drawing_grid_size" : {
"type" : "integer" ,
"description" : "Grid size for the drawing area for drawings"
2018-11-20 06:04:27 +00:00
} ,
"show_interface_labels" : {
2018-08-16 14:31:56 +00:00
"type" : "boolean" ,
2018-11-20 06:04:27 +00:00
"description" : "Show interface labels on the drawing area"
2018-08-16 14:31:56 +00:00
} ,
"supplier" : {
"type" : [
"object" ,
"null"
] ,
2018-11-20 06:04:27 +00:00
"description" : "Supplier of the project" ,
2018-08-16 14:31:56 +00:00
"properties" : {
"logo" : {
"type" : "string" ,
"description" : "Path to the project supplier logo"
} ,
"url" : {
"type" : "string" ,
"description" : "URL to the project supplier site"
}
2018-11-20 06:04:27 +00:00
}
} ,
"variables" : {
"type" : [
"array" ,
"null"
] ,
"description" : "Variables required to run the project" ,
"items" : {
"properties" : {
"name" : {
"type" : "string" ,
"description" : "Variable name"
} ,
"value" : {
"type" : "string" ,
"description" : "Variable value"
}
} ,
"required" : [
"name"
]
}
2018-06-07 08:26:06 +00:00
} ,
2016-07-14 13:31:49 +00:00
"topology" : {
2018-11-20 06:04:27 +00:00
"description" : "The topology content" ,
2018-08-16 14:31:56 +00:00
"type" : "object" ,
2016-07-11 13:37:57 +00:00
"properties" : {
2018-11-20 06:04:27 +00:00
"computes" : {
"description" : "Computes servers" ,
2018-08-16 14:31:56 +00:00
"type" : "array" ,
2016-10-20 08:54:07 +00:00
"items" : {
2018-11-20 06:04:27 +00:00
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Request validation to a GNS3 compute object instance" ,
2018-08-16 14:31:56 +00:00
"type" : "object" ,
2016-10-20 08:54:07 +00:00
"properties" : {
2018-11-20 06:04:27 +00:00
"compute_id" : {
"description" : "Server identifier" ,
"type" : "string"
2018-01-08 08:26:44 +00:00
} ,
2018-11-20 06:04:27 +00:00
"name" : {
"description" : "Server name" ,
"type" : "string"
2018-01-08 08:26:44 +00:00
} ,
2018-11-20 06:04:27 +00:00
"protocol" : {
"description" : "Server protocol" ,
2018-08-16 14:31:56 +00:00
"enum" : [
2018-11-20 06:04:27 +00:00
"http" ,
"https"
]
2018-01-08 08:26:44 +00:00
} ,
2018-11-20 06:04:27 +00:00
"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-11-20 06:04:27 +00:00
]
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"connected" : {
2018-11-27 11:14:51 +00:00
"description" : "Whether the controller is connected to the compute or not" ,
2018-11-20 06:04:27 +00:00
"type" : "boolean"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"cpu_usage_percent" : {
"description" : "CPU usage of the compute. Read only" ,
2018-08-16 14:31:56 +00:00
"type" : [
2018-11-20 06:04:27 +00:00
"number" ,
2018-08-16 14:31:56 +00:00
"null"
] ,
2018-11-20 06:04:27 +00:00
"maximum" : 100 ,
"minimum" : 0
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"memory_usage_percent" : {
"description" : "RAM usage of the compute. Read only" ,
2018-08-16 14:31:56 +00:00
"type" : [
2018-11-20 06:04:27 +00:00
"number" ,
"null"
2018-08-16 14:31:56 +00:00
] ,
2018-11-20 06:04:27 +00:00
"maximum" : 100 ,
"minimum" : 0
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"last_error" : {
"description" : "Last error on the compute" ,
2018-08-16 14:31:56 +00:00
"type" : [
"string" ,
"null"
2018-11-20 06:04:27 +00:00
]
} ,
"capabilities" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Get what a server support" ,
"type" : "object" ,
"required" : [
"version" ,
"node_types"
2018-08-16 14:31:56 +00:00
] ,
2018-11-20 06:04:27 +00:00
"properties" : {
"version" : {
"description" : "Version number" ,
"type" : [
"string" ,
"null"
]
} ,
"node_types" : {
"type" : "array" ,
"items" : {
"description" : "Type of node" ,
"enum" : [
"cloud" ,
"nat" ,
"ethernet_hub" ,
"ethernet_switch" ,
"frame_relay_switch" ,
"atm_switch" ,
"docker" ,
"dynamips" ,
"vpcs" ,
"traceng" ,
"virtualbox" ,
"vmware" ,
"iou" ,
"qemu"
]
} ,
"description" : "Node type supported by the compute"
} ,
"platform" : {
"type" : "string" ,
"description" : "Platform where the compute is running"
}
} ,
"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-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"project_id" : {
"description" : "Project UUID" ,
2018-06-14 08:39:31 +00:00
"type" : "string" ,
2018-11-20 06:04:27 +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-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"x" : {
"description" : "X property" ,
"type" : "integer"
} ,
"y" : {
"description" : "Y property" ,
"type" : "integer"
} ,
"z" : {
"description" : "Z property" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the element" ,
"type" : "integer" ,
"minimum" : -359 ,
"maximum" : 360
} ,
"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}$"
} ,
"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" ,
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"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}$"
} ,
"adapter_number" : {
"description" : "Adapter number" ,
"type" : "integer"
} ,
"port_number" : {
"description" : "Port number" ,
"type" : "integer"
} ,
"label" : {
"type" : "object" ,
"properties" : {
"text" : {
"type" : "string"
} ,
"style" : {
"description" : "SVG style attribute. Apply default style if null" ,
"type" : [
"string" ,
"null"
]
} ,
"x" : {
"description" : "Relative X position of the label. Center it if null" ,
"type" : [
"integer" ,
"null"
]
} ,
"y" : {
"description" : "Relative Y position of the label" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the label" ,
"type" : "integer" ,
"minimum" : -359 ,
"maximum" : 360
}
} ,
"required" : [
"text" ,
"x" ,
"y"
] ,
"additionalProperties" : false
}
} ,
"required" : [
"node_id" ,
"adapter_number" ,
"port_number"
] ,
"additionalProperties" : false
}
} ,
"suspend" : {
2018-08-16 14:31:56 +00:00
"type" : "boolean" ,
2018-11-20 06:04:27 +00:00
"description" : "Suspend the link"
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"filters" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "Packet filter. This allow to simulate latency and errors" ,
"type" : "object"
} ,
"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"
]
}
} ,
"additionalProperties" : false
}
} ,
"nodes" : {
"description" : "Nodes elements" ,
"type" : "array" ,
"items" : {
"$schema" : "http://json-schema.org/draft-04/schema#" ,
"description" : "A node object" ,
"type" : "object" ,
"properties" : {
"compute_id" : {
"description" : "Compute identifier" ,
"type" : "string"
} ,
"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}$"
} ,
2018-11-28 09:12:57 +00:00
"template_id" : {
"description" : "Template UUID from which the node has been created. Read only" ,
2016-10-20 08:54:07 +00:00
"type" : [
2018-08-16 14:31:56 +00:00
"null" ,
"string"
2016-11-03 17:20:51 +00:00
] ,
2018-11-20 06:04:27 +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-10-20 08:54:07 +00:00
} ,
2018-11-20 06:04:27 +00:00
"node_type" : {
"description" : "Type of node" ,
"enum" : [
"cloud" ,
"nat" ,
"ethernet_hub" ,
"ethernet_switch" ,
"frame_relay_switch" ,
"atm_switch" ,
"docker" ,
"dynamips" ,
"vpcs" ,
"traceng" ,
"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"
]
2018-06-14 08:39:31 +00:00
} ,
2018-08-16 14:31:56 +00:00
"name" : {
"description" : "Node name" ,
2018-11-20 06:04:27 +00:00
"type" : "string" ,
2018-08-16 14:31:56 +00:00
"minLength" : 1
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"console" : {
"description" : "Console TCP port" ,
"minimum" : 1 ,
"maximum" : 65535 ,
"type" : [
"integer" ,
"null"
]
} ,
"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" ,
"enum" : [
"vnc" ,
"telnet" ,
"http" ,
"https" ,
"spice" ,
"spice+agent" ,
"none" ,
null
]
} ,
"console_auto_start" : {
"description" : "Automatically start the console when the node has started" ,
"type" : "boolean"
} ,
"properties" : {
"description" : "Properties specific to an emulator" ,
"type" : "object"
} ,
"status" : {
"description" : "Status of the node" ,
"enum" : [
"stopped" ,
"started" ,
"suspended"
]
} ,
2018-08-16 14:31:56 +00:00
"label" : {
"type" : "object" ,
2016-08-29 13:58:29 +00:00
"properties" : {
2018-08-16 14:31:56 +00:00
"text" : {
"type" : "string"
} ,
"style" : {
2018-11-20 06:04:27 +00:00
"description" : "SVG style attribute. Apply default style if null" ,
"type" : [
"string" ,
"null"
]
2018-08-16 14:31:56 +00:00
} ,
"x" : {
2018-11-20 06:04:27 +00:00
"description" : "Relative X position of the label. Center it if null" ,
2016-08-29 13:58:29 +00:00
"type" : [
2018-08-16 14:31:56 +00:00
"integer" ,
2016-08-29 13:58:29 +00:00
"null"
2018-11-20 06:04:27 +00:00
]
} ,
"y" : {
"description" : "Relative Y position of the label" ,
"type" : "integer"
} ,
"rotation" : {
"description" : "Rotation of the label" ,
"type" : "integer" ,
"minimum" : -359 ,
"maximum" : 360
2018-01-08 04:57:07 +00:00
}
} ,
2018-06-14 08:39:31 +00:00
"required" : [
2018-08-16 14:31:56 +00:00
"text" ,
"x" ,
"y"
] ,
2018-11-20 06:04:27 +00:00
"additionalProperties" : false
2018-06-14 08:39:31 +00:00
} ,
2018-11-20 06:04:27 +00:00
"symbol" : {
"description" : "Symbol of the node" ,
2017-03-06 13:35:39 +00:00
"type" : [
2018-11-20 06:04:27 +00:00
"string" ,
2017-03-06 13:35:39 +00:00
"null"
2018-06-14 08:39:31 +00:00
] ,
2018-11-20 06:04:27 +00:00
"minLength" : 1
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"width" : {
"description" : "Width of the node (Read only)" ,
"type" : "integer"
2018-08-16 14:31:56 +00:00
} ,
"height" : {
2018-11-20 06:04:27 +00:00
"description" : "Height of the node (Read only)" ,
"type" : "integer"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"x" : {
"description" : "X position of the node" ,
"type" : "integer"
2017-03-06 13:35:39 +00:00
} ,
2018-11-20 06:04:27 +00:00
"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" ,
2018-06-14 08:39:31 +00:00
"type" : [
2018-11-20 06:04:27 +00:00
"string" ,
"null"
]
} ,
"custom_adapters" : {
"type" : "array" ,
"default" : [ ] ,
"items" : {
"type" : "object" ,
"description" : "Custom properties" ,
"properties" : {
"adapter_number" : {
"type" : "integer" ,
"description" : "Adapter number"
} ,
"port_name" : {
"type" : "string" ,
"description" : "Custom port name" ,
"minLength" : 1
} ,
"adapter_type" : {
"type" : "string" ,
"description" : "Custom adapter type" ,
"minLength" : 1
} ,
"mac_address" : {
"description" : "Custom MAC address" ,
"type" : "string" ,
"minLength" : 1 ,
"pattern" : "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
}
} ,
"additionalProperties" : false ,
"required" : [
"adapter_number"
]
}
2018-08-16 14:31:56 +00:00
} ,
"ports" : {
2018-11-20 06:04:27 +00:00
"description" : "List of node ports READ only" ,
2018-08-16 14:31:56 +00:00
"type" : "array" ,
"items" : {
"type" : "object" ,
2018-11-20 06:04:27 +00:00
"description" : "A node port" ,
2018-08-16 14:31:56 +00:00
"properties" : {
2018-11-20 06:04:27 +00:00
"name" : {
"type" : "string" ,
"description" : "Port name"
2018-08-16 14:31:56 +00:00
} ,
"short_name" : {
"type" : "string" ,
"description" : "Short version of port name"
} ,
2018-11-20 06:04:27 +00:00
"adapter_number" : {
"type" : "integer" ,
"description" : "Adapter slot"
2018-08-16 14:31:56 +00:00
} ,
2018-11-20 06:04:27 +00:00
"adapter_type" : {
"description" : "Adapter type" ,
2018-08-16 14:31:56 +00:00
"type" : [
"string" ,
"null"
] ,
"minLength" : 1
} ,
"port_number" : {
"type" : "integer" ,
"description" : "Port slot"
} ,
2018-11-20 06:04:27 +00:00
"link_type" : {
"description" : "Type of link" ,
"enum" : [
"ethernet" ,
"serial"
]
} ,
"data_link_types" : {
"type" : "object" ,
"description" : "Available PCAP types for capture" ,
"properties" : { }
} ,
"mac_address" : {
"description" : "MAC address (if available)" ,
2018-08-16 14:31:56 +00:00
"type" : [
"string" ,
"null"
] ,
2018-11-20 06:04:27 +00:00
"minLength" : 1 ,
"pattern" : "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
2018-08-16 14:31:56 +00:00
}
} ,
2018-11-20 06:04:27 +00:00
"additionalProperties" : false
2018-08-16 14:31:56 +00:00
}
}
} ,
"additionalProperties" : false ,
"required" : [
2018-11-20 06:04:27 +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"
2018-11-20 06:04:27 +00:00
] ,
"additionalProperties" : false
2016-07-11 13:37:57 +00:00
}
2016-09-27 15:15:40 +00:00
} ,
2018-11-20 06:04:27 +00:00
"required" : [
"project_id" ,
"type" ,
"revision" ,
"version" ,
"name" ,
"topology"
] ,
"additionalProperties" : false
2016-07-11 13:37:57 +00:00
}