1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-17 22:08:35 +00:00
gns3-server/docs/gns3_file.json
2016-08-15 17:39:08 +02:00

447 lines
20 KiB
JSON

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