1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-25 01:38:08 +00:00
gns3-server/docs/gns3_file.json

569 lines
27 KiB
JSON
Raw Normal View History

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