gns3-server/docs/gns3_file.json

495 lines
23 KiB
JSON
Raw Normal View History

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