gns3-server/docs/gns3_file.json

554 lines
26 KiB
JSON
Raw Normal View History

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