gns3-server/docs/gns3_file.json

578 lines
27 KiB
JSON
Raw Normal View History

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