gns3-server/docs/gns3_file.json

447 lines
20 KiB
JSON
Raw Normal View History

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