gns3-server/docs/gns3_file.json

577 lines
27 KiB
JSON
Raw Normal View History

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