gns3-server/docs/gns3_file.json

447 lines
20 KiB
JSON
Raw Normal View History

2016-07-11 13:37:57 +00:00
{
2016-07-26 17:57:53 +00:00
"type": "object",
"additionalProperties": false,
"required": [
"project_id",
"type",
"revision",
"version",
"name",
"topology"
],
"$schema": "http://json-schema.org/draft-04/schema#",
2016-07-11 13:37:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"type": {
"enum": [
"topology"
],
"description": "Type of file. It's always topology"
},
"name": {
"type": "string",
"description": "Name of the project"
},
"revision": {
"type": "integer",
"description": "Version of the .gns3 specification."
2016-07-14 13:31:49 +00:00
},
"topology": {
2016-07-26 17:57:53 +00:00
"type": "object",
2016-07-11 13:37:57 +00:00
"properties": {
"drawings": {
2016-07-26 17:57:53 +00:00
"type": "array",
2016-07-22 11:54:57 +00:00
"description": "Drawings elements",
2016-07-11 13:37:57 +00:00
"items": {
2016-07-26 17:57:53 +00:00
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
2016-07-11 13:37:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"x": {
2016-07-22 11:54:57 +00:00
"type": "integer",
2016-07-26 17:57:53 +00:00
"description": "X property"
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"z": {
"type": "integer",
"description": "Z property"
},
"svg": {
"type": "string",
"description": "SVG content of the drawing"
2016-07-14 13:31:49 +00:00
},
"drawing_id": {
2016-07-26 17:57:53 +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-07-14 13:31:49 +00:00
"description": "Drawing UUID",
2016-07-22 11:54:57 +00:00
"maxLength": 36,
2016-07-26 17:57:53 +00:00
"minLength": 36
2016-07-14 13:31:49 +00:00
},
"project_id": {
2016-07-26 17:57:53 +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-07-14 13:31:49 +00:00
"description": "Project UUID",
2016-07-22 11:54:57 +00:00
"maxLength": 36,
2016-07-26 17:57:53 +00:00
"minLength": 36
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"y": {
"type": "integer",
"description": "Y property"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"rotation": {
"type": "integer",
"maximum": 360,
"description": "Rotation of the element",
"minimum": 0
2016-07-11 13:37:57 +00:00
}
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"description": "An drawing object",
"additionalProperties": false
}
2016-07-11 13:37:57 +00:00
},
2016-07-22 11:54:57 +00:00
"nodes": {
2016-07-26 17:57:53 +00:00
"type": "array",
2016-07-22 11:54:57 +00:00
"description": "Nodes elements",
2016-07-11 13:37:57 +00:00
"items": {
2016-07-26 17:57:53 +00:00
"type": "object",
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-04/schema#",
2016-07-11 13:37:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"name": {
"type": "string",
"description": "Node name",
"minLength": 1
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"console_type": {
"enum": [
"serial",
"vnc",
"telnet",
null
],
"description": "Console type"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"node_type": {
"enum": [
"cloud",
"ethernet_hub",
"ethernet_switch",
"frame_relay_switch",
"atm_switch",
"docker",
"dynamips",
"vpcs",
"virtualbox",
"vmware",
"iou",
"qemu"
],
"description": "Type of node"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"x": {
"type": "integer",
"description": "X position of the node"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"z": {
"type": "integer",
"description": "Z position of the node"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"node_id": {
"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}$",
"description": "Node UUID",
"maxLength": 36,
"minLength": 36
},
"width": {
"type": "integer",
"description": "Width of the node"
},
"y": {
"type": "integer",
"description": "Y position of the node"
},
"command_line": {
2016-07-22 11:54:57 +00:00
"type": [
"null",
"string"
2016-07-26 17:57:53 +00:00
],
"description": "Command line use to start the node"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"symbol": {
"type": "string",
"description": "Symbol of the node",
"minLength": 1
2016-07-22 11:54:57 +00:00
},
"console": {
"type": [
"integer",
2016-07-14 13:31:49 +00:00
"null"
],
2016-07-26 17:57:53 +00:00
"maximum": 65535,
"description": "Console TCP port",
"minimum": 1
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"console_host": {
2016-07-14 13:31:49 +00:00
"type": "string",
2016-07-26 17:57:53 +00:00
"description": "Console host",
"minLength": 1
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"project_id": {
"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}$",
"description": "Project UUID",
"maxLength": 36,
"minLength": 36
2016-07-22 11:54:57 +00:00
},
"label": {
2016-07-26 17:57:53 +00:00
"type": "object",
2016-07-22 11:54:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"y": {
"type": "integer",
"description": "Relative Y position of the label"
2016-07-22 11:54:57 +00:00
},
"text": {
"type": "string"
},
"x": {
2016-07-26 17:57:53 +00:00
"type": "integer",
"description": "Relative X position of the label"
2016-07-22 11:54:57 +00:00
},
"style": {
2016-07-26 17:57:53 +00:00
"type": "string",
"description": "SVG style attribute"
},
"rotation": {
"type": "integer",
"description": "Rotation of the label"
2016-07-22 11:54:57 +00:00
}
},
"additionalProperties": false,
"required": [
"text",
"x",
"y"
]
},
2016-07-26 17:57:53 +00:00
"height": {
"type": "integer",
"description": "Height of the node"
2016-07-14 13:31:49 +00:00
},
2016-07-26 17:57:53 +00:00
"properties": {
"type": "object",
"description": "Properties specific to an emulator"
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"status": {
"enum": [
"stopped",
"started",
"suspended"
],
"description": "Status of the node"
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"node_directory": {
"type": [
"null",
"string"
],
"description": "Working directory of the node. Read only"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"compute_id": {
"type": "string",
"description": "Compute identifier"
2016-07-22 11:54:57 +00:00
}
},
2016-07-26 17:57:53 +00:00
"description": "A node object"
}
2016-07-22 11:54:57 +00:00
},
"links": {
2016-07-26 17:57:53 +00:00
"type": "array",
2016-07-22 11:54:57 +00:00
"description": "Link elements",
"items": {
2016-07-26 17:57:53 +00:00
"type": "object",
"additionalProperties": false,
"required": [
"nodes"
],
"$schema": "http://json-schema.org/draft-04/schema#",
2016-07-22 11:54:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"capture_file_path": {
"type": [
"string",
"null"
],
"description": "Read only property. The full path of the capture file if capture is running"
},
"capturing": {
"type": "boolean",
"description": "Read only property. True if a capture running on the link"
},
2016-07-11 13:37:57 +00:00
"nodes": {
2016-07-26 17:57:53 +00:00
"type": "array",
2016-07-22 11:54:57 +00:00
"description": "List of the VMS",
2016-07-11 13:37:57 +00:00
"items": {
2016-07-26 17:57:53 +00:00
"type": "object",
2016-07-11 13:37:57 +00:00
"properties": {
"label": {
2016-07-26 17:57:53 +00:00
"type": "object",
2016-07-11 13:37:57 +00:00
"properties": {
2016-07-26 17:57:53 +00:00
"y": {
"type": "integer",
"description": "Relative Y position of the label"
2016-07-22 11:54:57 +00:00
},
2016-07-14 13:31:49 +00:00
"text": {
2016-07-11 13:37:57 +00:00
"type": "string"
},
2016-07-22 11:54:57 +00:00
"x": {
2016-07-26 17:57:53 +00:00
"type": "integer",
"description": "Relative X position of the label"
2016-07-11 13:37:57 +00:00
},
2016-07-14 13:31:49 +00:00
"style": {
2016-07-26 17:57:53 +00:00
"type": "string",
"description": "SVG style attribute"
},
"rotation": {
"type": "integer",
"description": "Rotation of the label"
2016-07-11 13:37:57 +00:00
}
2016-07-14 13:31:49 +00:00
},
2016-07-22 11:54:57 +00:00
"additionalProperties": false,
2016-07-14 13:31:49 +00:00
"required": [
"text",
"x",
"y"
2016-07-22 11:54:57 +00:00
]
2016-07-14 13:31:49 +00:00
},
2016-07-26 17:57:53 +00:00
"node_id": {
"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}$",
"description": "Node UUID",
"maxLength": 36,
"minLength": 36
},
2016-07-22 11:54:57 +00:00
"port_number": {
2016-07-26 17:57:53 +00:00
"type": "integer",
"description": "Port number"
},
"adapter_number": {
"type": "integer",
"description": "Adapter number"
2016-07-11 13:37:57 +00:00
}
2016-07-14 13:31:49 +00:00
},
2016-07-22 11:54:57 +00:00
"additionalProperties": false,
2016-07-14 13:31:49 +00:00
"required": [
"node_id",
"adapter_number",
"port_number"
2016-07-22 11:54:57 +00:00
]
2016-07-26 17:57:53 +00:00
}
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"project_id": {
"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}$",
"description": "Project UUID",
"maxLength": 36,
"minLength": 36
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"capture_file_name": {
2016-07-14 13:31:49 +00:00
"type": [
"string",
"null"
2016-07-26 17:57:53 +00:00
],
"description": "Read only property. The name of the capture file if capture is running"
2016-07-11 13:37:57 +00:00
},
2016-07-22 11:54:57 +00:00
"link_id": {
2016-07-26 17:57:53 +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-07-22 11:54:57 +00:00
"description": "Link UUID",
"maxLength": 36,
2016-07-26 17:57:53 +00:00
"minLength": 36
}
},
"description": "A link object"
}
},
"computes": {
"type": "array",
"description": "Computes servers",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"compute_id",
"protocol",
"host",
"port",
"name"
],
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"name": {
2016-07-14 13:31:49 +00:00
"type": "string",
2016-07-26 17:57:53 +00:00
"description": "Server name"
2016-07-11 13:37:57 +00:00
},
2016-07-26 17:57:53 +00:00
"cpu_usage_percent": {
"type": [
"number",
"null"
],
"maximum": 100,
"description": "CPU usage of the compute. Read only",
"minimum": 0
},
"port": {
"type": "integer",
"description": "Server port"
},
"protocol": {
"enum": [
"http",
"https"
],
"description": "Server protocol"
},
"memory_usage_percent": {
"type": [
"number",
"null"
],
"maximum": 100,
"description": "RAM usage of the compute. Read only",
"minimum": 0
},
"connected": {
"type": "boolean",
"description": "Whether the controller is connected to the compute server or not"
},
"host": {
"type": "string",
"description": "Server host"
},
"user": {
2016-07-14 13:31:49 +00:00
"type": [
2016-07-22 11:54:57 +00:00
"string",
2016-07-14 13:31:49 +00:00
"null"
2016-07-26 17:57:53 +00:00
],
"description": "User for authentication"
},
"version": {
"type": [
"string",
"null"
],
"description": "Version of the GNS3 remote compute server"
},
"compute_id": {
"type": "string",
"description": "Server identifier"
2016-07-11 13:37:57 +00:00
}
},
2016-07-26 17:57:53 +00:00
"description": "Request validation to a GNS3 compute object instance"
}
2016-07-11 13:37:57 +00:00
}
2016-07-14 13:31:49 +00:00
},
2016-07-26 17:57:53 +00:00
"description": "The topology content",
2016-07-14 13:31:49 +00:00
"required": [
"nodes",
"links",
"drawings",
"computes"
2016-07-26 17:57:53 +00:00
],
"additionalProperties": false
2016-07-11 13:37:57 +00:00
},
2016-07-14 13:31:49 +00:00
"project_id": {
2016-07-26 17:57:53 +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-07-14 13:31:49 +00:00
"description": "Project UUID",
2016-07-22 11:54:57 +00:00
"maxLength": 36,
2016-07-26 17:57:53 +00:00
"minLength": 36
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"auto_start": {
"type": "boolean",
"description": "Start the topology when opened"
2016-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +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-07-22 11:54:57 +00:00
},
2016-07-26 17:57:53 +00:00
"description": "The topology"
2016-07-11 13:37:57 +00:00
}