1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 16:58:28 +00:00
gns3-server/docs/gns3_file.json
Julien Duponchelle b5cb625169
Rebuild doc
2016-07-14 15:33:09 +02:00

447 lines
20 KiB
JSON

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