You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gns3-server/docs/gns3_file.json

447 lines
20 KiB

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