mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-23 14:42:28 +00:00
577 lines
27 KiB
JSON
577 lines
27 KiB
JSON
{
|
|
"properties": {
|
|
"auto_start": {
|
|
"type": "boolean",
|
|
"description": "Start the topology when opened"
|
|
},
|
|
"auto_open": {
|
|
"type": "boolean",
|
|
"description": "Open the topology with GNS3"
|
|
},
|
|
"topology": {
|
|
"properties": {
|
|
"drawings": {
|
|
"items": {
|
|
"properties": {
|
|
"rotation": {
|
|
"maximum": 360,
|
|
"type": "integer",
|
|
"description": "Rotation of the element",
|
|
"minimum": -359
|
|
},
|
|
"z": {
|
|
"type": "integer",
|
|
"description": "Z property"
|
|
},
|
|
"drawing_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Drawing UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"y": {
|
|
"type": "integer",
|
|
"description": "Y property"
|
|
},
|
|
"x": {
|
|
"type": "integer",
|
|
"description": "X property"
|
|
},
|
|
"project_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Project UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"svg": {
|
|
"type": "string",
|
|
"description": "SVG content of the drawing"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"description": "An drawing object",
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
},
|
|
"type": "array",
|
|
"description": "Drawings elements"
|
|
},
|
|
"nodes": {
|
|
"items": {
|
|
"properties": {
|
|
"properties": {
|
|
"type": "object",
|
|
"description": "Properties specific to an emulator"
|
|
},
|
|
"command_line": {
|
|
"type": [
|
|
"null",
|
|
"string"
|
|
],
|
|
"description": "Command line use to start the node"
|
|
},
|
|
"z": {
|
|
"type": "integer",
|
|
"description": "Z position of the node"
|
|
},
|
|
"first_port_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Name of the first port"
|
|
},
|
|
"console_host": {
|
|
"minLength": 1,
|
|
"type": "string",
|
|
"description": "Console host. Warning if the host is 0.0.0.0 or :: (listen on all interfaces) you need to use the same address you use to connect to the controller."
|
|
},
|
|
"console": {
|
|
"maximum": 65535,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "Console TCP port",
|
|
"minimum": 1
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"stopped",
|
|
"started",
|
|
"suspended"
|
|
],
|
|
"description": "Status of the node"
|
|
},
|
|
"project_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Project UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"port_segment_size": {
|
|
"type": "integer",
|
|
"description": "Size of the port segment",
|
|
"minimum": 0
|
|
},
|
|
"port_name_format": {
|
|
"type": "string",
|
|
"description": "Formating for port name {0} will be replace by port number"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"description": "Height of the node (Read only)"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"description": "Width of the node (Read only)"
|
|
},
|
|
"symbol": {
|
|
"minLength": 1,
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Symbol of the node"
|
|
},
|
|
"label": {
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"rotation": {
|
|
"maximum": 360,
|
|
"type": "integer",
|
|
"description": "Rotation of the label",
|
|
"minimum": -359
|
|
},
|
|
"y": {
|
|
"type": "integer",
|
|
"description": "Relative Y position of the label"
|
|
},
|
|
"x": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "Relative X position of the label. If null center it"
|
|
},
|
|
"style": {
|
|
"type": "string",
|
|
"description": "SVG style attribute"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"text",
|
|
"x",
|
|
"y"
|
|
]
|
|
},
|
|
"compute_id": {
|
|
"type": "string",
|
|
"description": "Compute identifier"
|
|
},
|
|
"console_type": {
|
|
"enum": [
|
|
"vnc",
|
|
"telnet",
|
|
"http",
|
|
null
|
|
],
|
|
"description": "Console type"
|
|
},
|
|
"ports": {
|
|
"items": {
|
|
"properties": {
|
|
"adapter_number": {
|
|
"type": "integer",
|
|
"description": "Adapter slot"
|
|
},
|
|
"link_type": {
|
|
"enum": [
|
|
"ethernet",
|
|
"serial"
|
|
],
|
|
"description": "Type of link"
|
|
},
|
|
"port_number": {
|
|
"type": "integer",
|
|
"description": "Port slot"
|
|
},
|
|
"data_link_types": {
|
|
"properties": {},
|
|
"type": "object",
|
|
"description": "Available PCAP type for capture"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Port name"
|
|
},
|
|
"short_name": {
|
|
"type": "string",
|
|
"description": "Short version of port name"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"description": "A node port"
|
|
},
|
|
"type": "array",
|
|
"description": "List of node ports READ only"
|
|
},
|
|
"name": {
|
|
"minLength": 1,
|
|
"type": "string",
|
|
"description": "Node name"
|
|
},
|
|
"node_type": {
|
|
"enum": [
|
|
"cloud",
|
|
"nat",
|
|
"ethernet_hub",
|
|
"ethernet_switch",
|
|
"frame_relay_switch",
|
|
"atm_switch",
|
|
"docker",
|
|
"dynamips",
|
|
"vpcs",
|
|
"virtualbox",
|
|
"vmware",
|
|
"iou",
|
|
"qemu"
|
|
],
|
|
"description": "Type of node"
|
|
},
|
|
"node_directory": {
|
|
"type": [
|
|
"null",
|
|
"string"
|
|
],
|
|
"description": "Working directory of the node. Read only"
|
|
},
|
|
"y": {
|
|
"type": "integer",
|
|
"description": "Y position of the node"
|
|
},
|
|
"x": {
|
|
"type": "integer",
|
|
"description": "X position of the node"
|
|
},
|
|
"node_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Node UUID",
|
|
"maxLength": 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}$"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"description": "A node object",
|
|
"additionalProperties": false,
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
},
|
|
"type": "array",
|
|
"description": "Nodes elements"
|
|
},
|
|
"links": {
|
|
"items": {
|
|
"properties": {
|
|
"link_type": {
|
|
"enum": [
|
|
"ethernet",
|
|
"serial"
|
|
],
|
|
"description": "Type of link"
|
|
},
|
|
"link_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Link UUID",
|
|
"maxLength": 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_path": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Read only property. The full path of the capture file if capture is running"
|
|
},
|
|
"capture_file_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Read only property. The name of the capture file if capture is running"
|
|
},
|
|
"project_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Project UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"nodes": {
|
|
"items": {
|
|
"properties": {
|
|
"adapter_number": {
|
|
"type": "integer",
|
|
"description": "Adapter number"
|
|
},
|
|
"label": {
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"rotation": {
|
|
"maximum": 360,
|
|
"type": "integer",
|
|
"description": "Rotation of the label",
|
|
"minimum": -359
|
|
},
|
|
"y": {
|
|
"type": "integer",
|
|
"description": "Relative Y position of the label"
|
|
},
|
|
"x": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "Relative X position of the label. If null center it"
|
|
},
|
|
"style": {
|
|
"type": "string",
|
|
"description": "SVG style attribute"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"text",
|
|
"x",
|
|
"y"
|
|
]
|
|
},
|
|
"node_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Node UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"port_number": {
|
|
"type": "integer",
|
|
"description": "Port number"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"required": [
|
|
"node_id",
|
|
"adapter_number",
|
|
"port_number"
|
|
]
|
|
},
|
|
"type": "array",
|
|
"description": "List of the VMS"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"description": "A link object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"nodes"
|
|
],
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
},
|
|
"type": "array",
|
|
"description": "Link elements"
|
|
},
|
|
"computes": {
|
|
"items": {
|
|
"properties": {
|
|
"port": {
|
|
"type": "integer",
|
|
"description": "Server port"
|
|
},
|
|
"user": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "User for authentication"
|
|
},
|
|
"memory_usage_percent": {
|
|
"maximum": 100,
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "RAM usage of the compute. Read only",
|
|
"minimum": 0
|
|
},
|
|
"protocol": {
|
|
"enum": [
|
|
"http",
|
|
"https"
|
|
],
|
|
"description": "Server protocol"
|
|
},
|
|
"compute_id": {
|
|
"type": "string",
|
|
"description": "Server identifier"
|
|
},
|
|
"capabilities": {
|
|
"properties": {
|
|
"node_types": {
|
|
"items": {
|
|
"enum": [
|
|
"cloud",
|
|
"nat",
|
|
"ethernet_hub",
|
|
"ethernet_switch",
|
|
"frame_relay_switch",
|
|
"atm_switch",
|
|
"docker",
|
|
"dynamips",
|
|
"vpcs",
|
|
"virtualbox",
|
|
"vmware",
|
|
"iou",
|
|
"qemu"
|
|
],
|
|
"description": "Type of node"
|
|
},
|
|
"type": "array",
|
|
"description": "Node type supported by the compute"
|
|
},
|
|
"platform": {
|
|
"type": "string",
|
|
"description": "Platform where the compute is running"
|
|
},
|
|
"version": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Version number"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"description": "Get what a server support",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"version",
|
|
"node_types"
|
|
],
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
},
|
|
"host": {
|
|
"type": "string",
|
|
"description": "Server host"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Server name"
|
|
},
|
|
"cpu_usage_percent": {
|
|
"maximum": 100,
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "CPU usage of the compute. Read only",
|
|
"minimum": 0
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"type": "object",
|
|
"description": "The topology content",
|
|
"required": [
|
|
"nodes",
|
|
"links",
|
|
"drawings",
|
|
"computes"
|
|
]
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"topology"
|
|
],
|
|
"description": "Type of file. It's always topology"
|
|
},
|
|
"revision": {
|
|
"type": "integer",
|
|
"description": "Version of the .gns3 specification."
|
|
},
|
|
"auto_close": {
|
|
"type": "boolean",
|
|
"description": "Close the topology when no client is connected"
|
|
},
|
|
"scene_height": {
|
|
"type": "integer",
|
|
"description": "Height of the drawing area"
|
|
},
|
|
"scene_width": {
|
|
"type": "integer",
|
|
"description": "Width of the drawing area"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Name of the project"
|
|
},
|
|
"project_id": {
|
|
"minLength": 36,
|
|
"type": "string",
|
|
"description": "Project UUID",
|
|
"maxLength": 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}$"
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "Version of the GNS3 software which have update the file for the last time"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"description": "The topology",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"project_id",
|
|
"type",
|
|
"revision",
|
|
"version",
|
|
"name",
|
|
"topology"
|
|
],
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
} |