Schemas review.

pull/565/head
grossmj 8 years ago
parent d21fa9e961
commit be1efe8327

@ -95,7 +95,7 @@ class Controller:
:param kwargs: See the documentation of Compute :param kwargs: See the documentation of Compute
""" """
# We dissallow to create from the outside the # We disallow to create from the outside the
if compute_id == 'local': if compute_id == 'local':
return self._createLocalCompute() return self._createLocalCompute()

@ -38,11 +38,11 @@ COMPUTE_CREATE_SCHEMA = {
"type": "integer" "type": "integer"
}, },
"user": { "user": {
"description": "User for auth", "description": "User for authentication",
"type": "string" "type": "string"
}, },
"password": { "password": {
"description": "Password for auth", "description": "Password for authentication",
"type": "string" "type": "string"
} }
}, },
@ -72,15 +72,15 @@ COMPUTE_OBJECT_SCHEMA = {
"type": "integer" "type": "integer"
}, },
"user": { "user": {
"description": "User for auth", "description": "User for authentication",
"type": "string" "type": "string"
}, },
"connected": { "connected": {
"description": "True if controller is connected to the compute", "description": "Whether the controller is connected to the compute server or not",
"type": "boolean" "type": "boolean"
}, },
"version": { "version": {
"description": "Version of the GNS3 remote compute", "description": "Version of the GNS3 remote compute server",
"type": ["string", "null"] "type": ["string", "null"]
} }
}, },

@ -22,7 +22,7 @@ DOCKER_CREATE_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "Docker VM instance identifier", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -34,22 +34,22 @@ DOCKER_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet", "vnc", "http", "https"] "enum": ["telnet", "vnc", "http", "https"]
}, },
"console_resolution": { "console_resolution": {
"description": "console resolution for VNC", "description": "Console resolution for VNC",
"type": ["string", "null"], "type": ["string", "null"],
"pattern": "^[0-9]+x[0-9]+$" "pattern": "^[0-9]+x[0-9]+$"
}, },
"console_http_port": { "console_http_port": {
"description": "Internal port in the container of the HTTP server", "description": "Internal port in the container for the HTTP server",
"type": "integer", "type": "integer",
}, },
"console_http_path": { "console_http_path": {
@ -57,7 +57,7 @@ DOCKER_CREATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"aux": { "aux": {
"description": "auxilary TCP port", "description": "Auxiliary TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
@ -73,13 +73,13 @@ DOCKER_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 0, "minimum": 0,
"maximum": 99, "maximum": 99,
}, },
"environment": { "environment": {
"description": "Docker environment", "description": "Docker environment variables",
"type": ["string", "null"], "type": ["string", "null"],
"minLength": 0, "minLength": 0,
} }
@ -91,7 +91,7 @@ DOCKER_CREATE_SCHEMA = {
DOCKER_UPDATE_SCHEMA = { DOCKER_UPDATE_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request validation to create a new Docker container", "description": "Request validation to update a Docker container",
"type": "object", "type": "object",
"properties": { "properties": {
"name": { "name": {
@ -100,13 +100,13 @@ DOCKER_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_resolution": { "console_resolution": {
"description": "console resolution for VNC", "description": "Console resolution for VNC",
"type": ["string", "null"], "type": ["string", "null"],
"pattern": "^[0-9]+x[0-9]+$" "pattern": "^[0-9]+x[0-9]+$"
}, },
@ -115,7 +115,7 @@ DOCKER_UPDATE_SCHEMA = {
"enum": ["telnet", "vnc", "http", "https"] "enum": ["telnet", "vnc", "http", "https"]
}, },
"console_http_port": { "console_http_port": {
"description": "Internal port in the container of the HTTP server", "description": "Internal port in the container for the HTTP server",
"type": "integer", "type": "integer",
}, },
"console_http_path": { "console_http_path": {
@ -123,7 +123,7 @@ DOCKER_UPDATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"aux": { "aux": {
"description": "auxilary TCP port", "description": "Auxiliary TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
@ -134,12 +134,12 @@ DOCKER_UPDATE_SCHEMA = {
"minLength": 0, "minLength": 0,
}, },
"environment": { "environment": {
"description": "Docker environment", "description": "Docker environment variables",
"type": ["string", "null"], "type": ["string", "null"],
"minLength": 0, "minLength": 0,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 0, "minimum": 0,
"maximum": 99, "maximum": 99,
@ -150,7 +150,7 @@ DOCKER_UPDATE_SCHEMA = {
DOCKER_OBJECT_SCHEMA = { DOCKER_OBJECT_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Docker instance", "description": "Docker container instance",
"type": "object", "type": "object",
"properties": { "properties": {
"name": { "name": {
@ -159,35 +159,35 @@ DOCKER_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "Docker container instance UUID", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "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}$" "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}$"
}, },
"aux": { "aux": {
"description": "auxilary TCP port", "description": "Auxiliary TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"console_resolution": { "console_resolution": {
"description": "console resolution for VNC", "description": "Console resolution for VNC",
"type": "string", "type": "string",
"pattern": "^[0-9]+x[0-9]+$" "pattern": "^[0-9]+x[0-9]+$"
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet", "vnc", "http", "https"] "enum": ["telnet", "vnc", "http", "https"]
}, },
"console_http_port": { "console_http_port": {
"description": "Internal port in the container of the HTTP server", "description": "Internal port in the container for the HTTP server",
"type": "integer", "type": "integer",
}, },
"console_http_path": { "console_http_path": {
@ -230,12 +230,23 @@ DOCKER_OBJECT_SCHEMA = {
"minLength": 0, "minLength": 0,
}, },
"node_directory": { "node_directory": {
"decription": "Path to the VM working directory", "description": "Path to the node working directory",
"type": "string" "type": "string"
} }
}, },
"additionalProperties": False, "additionalProperties": False,
"required": ["node_id", "project_id", "image", "container_id", "adapters", "aux", "console", "console_type", "console_resolution", "start_command", "environment", "node_directory"] "required": ["node_id",
"project_id",
"image",
"container_id",
"adapters",
"aux",
"console",
"console_type",
"console_resolution",
"start_command",
"environment",
"node_directory"]
} }

@ -27,7 +27,7 @@ DEVICE_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"device_id": { "device_id": {
"description": "Dynamips device instance identifier", "description": "Dynamips device UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,

@ -22,7 +22,7 @@ VM_CREATE_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "Node identifier", "description": "Node UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,
@ -32,7 +32,7 @@ VM_CREATE_SCHEMA = {
] ]
}, },
"dynamips_id": { "dynamips_id": {
"description": "ID to use with Dynamips", "description": "Dynamips ID",
"type": "integer" "type": "integer"
}, },
"name": { "name": {
@ -41,29 +41,29 @@ VM_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"platform": { "platform": {
"description": "platform", "description": "Cisco router platform",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^c[0-9]{4}$" "pattern": "^c[0-9]{4}$"
}, },
"chassis": { "chassis": {
"description": "router chassis model", "description": "Cisco router chassis model",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^[0-9]{4}(XM)?$" "pattern": "^[0-9]{4}(XM)?$"
}, },
"image": { "image": {
"description": "path to the IOS image", "description": "Path to the IOS image",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"image_md5sum": { "image_md5sum": {
"description": "checksum of the IOS image", "description": "Checksum of the IOS image",
"type": ["string", "null"], "type": ["string", "null"],
"minLength": 1, "minLength": 1,
}, },
"startup_config": { "startup_config": {
"description": "path to the IOS startup configuration file", "description": "Path to the IOS startup configuration file",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -72,7 +72,7 @@ VM_CREATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"private_config": { "private_config": {
"description": "path to the IOS private configuration file", "description": "Path to the IOS private configuration file",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -81,11 +81,11 @@ VM_CREATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": "integer" "type": "integer"
}, },
"nvram": { "nvram": {
"description": "amount of NVRAM in KB", "description": "Amount of NVRAM in KB",
"type": "integer" "type": "integer"
}, },
"mmap": { "mmap": {
@ -93,11 +93,11 @@ VM_CREATE_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"sparsemem": { "sparsemem": {
"description": "sparse memory feature", "description": "Sparse memory feature",
"type": "boolean" "type": "boolean"
}, },
"clock_divisor": { "clock_divisor": {
"description": "clock divisor", "description": "Clock divisor",
"type": "integer" "type": "integer"
}, },
"idlepc": { "idlepc": {
@ -106,53 +106,53 @@ VM_CREATE_SCHEMA = {
"pattern": "^(0x[0-9a-fA-F]+)?$" "pattern": "^(0x[0-9a-fA-F]+)?$"
}, },
"idlemax": { "idlemax": {
"description": "idlemax value", "description": "Idlemax value",
"type": "integer", "type": "integer",
}, },
"idlesleep": { "idlesleep": {
"description": "idlesleep value", "description": "Idlesleep value",
"type": "integer", "type": "integer",
}, },
"exec_area": { "exec_area": {
"description": "exec area value", "description": "Exec area value",
"type": "integer", "type": "integer",
}, },
"disk0": { "disk0": {
"description": "disk0 size in MB", "description": "Disk0 size in MB",
"type": "integer" "type": "integer"
}, },
"disk1": { "disk1": {
"description": "disk1 size in MB", "description": "Disk1 size in MB",
"type": "integer" "type": "integer"
}, },
"auto_delete_disks": { "auto_delete_disks": {
"description": "automatically delete nvram and disk files", "description": "Automatically delete nvram and disk files",
"type": "boolean" "type": "boolean"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"aux": { "aux": {
"description": "auxiliary console TCP port", "description": "Auxiliary console TCP port",
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"mac_addr": { "mac_addr": {
"description": "base MAC address", "description": "Base MAC address",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$" "pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$"
}, },
"system_id": { "system_id": {
"description": "system ID", "description": "System ID",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -227,11 +227,11 @@ VM_CREATE_SCHEMA = {
] ]
}, },
"startup_config_base64": { "startup_config_base64": {
"description": "startup configuration base64 encoded", "description": "Startup configuration base64 encoded",
"type": "string" "type": "string"
}, },
"private_config_base64": { "private_config_base64": {
"description": "private configuration base64 encoded", "description": "Private configuration base64 encoded",
"type": "string" "type": "string"
}, },
# C7200 properties # C7200 properties
@ -281,24 +281,24 @@ VM_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"platform": { "platform": {
"description": "platform", "description": "Cisco router platform",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^c[0-9]{4}$" "pattern": "^c[0-9]{4}$"
}, },
"chassis": { "chassis": {
"description": "router chassis model", "description": "Cisco router chassis model",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^[0-9]{4}(XM)?$" "pattern": "^[0-9]{4}(XM)?$"
}, },
"image": { "image": {
"description": "path to the IOS image", "description": "Path to the IOS image",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"image_md5sum": { "image_md5sum": {
"description": "checksum of the IOS image", "description": "Checksum of the IOS image",
"type": ["string", "null"], "type": ["string", "null"],
"minLength": 1, "minLength": 1,
}, },
@ -311,11 +311,11 @@ VM_UPDATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": "integer" "type": "integer"
}, },
"nvram": { "nvram": {
"description": "amount of NVRAM in KB", "description": "Amount of NVRAM in KB",
"type": "integer" "type": "integer"
}, },
"mmap": { "mmap": {
@ -323,11 +323,11 @@ VM_UPDATE_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"sparsemem": { "sparsemem": {
"description": "sparse memory feature", "description": "Sparse memory feature",
"type": "boolean" "type": "boolean"
}, },
"clock_divisor": { "clock_divisor": {
"description": "clock divisor", "description": "Clock divisor",
"type": "integer" "type": "integer"
}, },
"idlepc": { "idlepc": {
@ -336,53 +336,53 @@ VM_UPDATE_SCHEMA = {
"pattern": "^(0x[0-9a-fA-F]+)?$" "pattern": "^(0x[0-9a-fA-F]+)?$"
}, },
"idlemax": { "idlemax": {
"description": "idlemax value", "description": "Idlemax value",
"type": "integer", "type": "integer",
}, },
"idlesleep": { "idlesleep": {
"description": "idlesleep value", "description": "Idlesleep value",
"type": "integer", "type": "integer",
}, },
"exec_area": { "exec_area": {
"description": "exec area value", "description": "Exec area value",
"type": "integer", "type": "integer",
}, },
"disk0": { "disk0": {
"description": "disk0 size in MB", "description": "Disk0 size in MB",
"type": "integer" "type": "integer"
}, },
"disk1": { "disk1": {
"description": "disk1 size in MB", "description": "Disk1 size in MB",
"type": "integer" "type": "integer"
}, },
"auto_delete_disks": { "auto_delete_disks": {
"description": "automatically delete nvram and disk files", "description": "Automatically delete nvram and disk files",
"type": "boolean" "type": "boolean"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"aux": { "aux": {
"description": "auxiliary console TCP port", "description": "Auxiliary console TCP port",
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"mac_addr": { "mac_addr": {
"description": "base MAC address", "description": "Base MAC address",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$" "pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$"
}, },
"system_id": { "system_id": {
"description": "system ID", "description": "System ID",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -457,11 +457,11 @@ VM_UPDATE_SCHEMA = {
] ]
}, },
"startup_config_base64": { "startup_config_base64": {
"description": "startup configuration base64 encoded", "description": "Startup configuration base64 encoded",
"type": "string" "type": "string"
}, },
"private_config_base64": { "private_config_base64": {
"description": "private configuration base64 encoded", "description": "Private configuration base64 encoded",
"type": "string" "type": "string"
}, },
# C7200 properties # C7200 properties
@ -510,7 +510,7 @@ VM_OBJECT_SCHEMA = {
"type": "integer" "type": "integer"
}, },
"node_id": { "node_id": {
"description": "Node instance UUID", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -533,41 +533,41 @@ VM_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"platform": { "platform": {
"description": "platform", "description": "Cisco router platform",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^c[0-9]{4}$" "pattern": "^c[0-9]{4}$"
}, },
"chassis": { "chassis": {
"description": "router chassis model", "description": "Cisco router chassis model",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
"pattern": "^[0-9]{4}(XM)?$" "pattern": "^[0-9]{4}(XM)?$"
}, },
"image": { "image": {
"description": "path to the IOS image", "description": "Path to the IOS image",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"image_md5sum": { "image_md5sum": {
"description": "checksum of the IOS image", "description": "Checksum of the IOS image",
"type": ["string", "null"], "type": ["string", "null"],
"minLength": 1, "minLength": 1,
}, },
"startup_config": { "startup_config": {
"description": "path to the IOS startup configuration file", "description": "Path to the IOS startup configuration file",
"type": "string", "type": "string",
}, },
"private_config": { "private_config": {
"description": "path to the IOS private configuration file", "description": "Path to the IOS private configuration file",
"type": "string", "type": "string",
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": "integer" "type": "integer"
}, },
"nvram": { "nvram": {
"description": "amount of NVRAM in KB", "description": "Amount of NVRAM in KB",
"type": "integer" "type": "integer"
}, },
"mmap": { "mmap": {
@ -575,11 +575,11 @@ VM_OBJECT_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"sparsemem": { "sparsemem": {
"description": "sparse memory feature", "description": "Sparse memory feature",
"type": "boolean" "type": "boolean"
}, },
"clock_divisor": { "clock_divisor": {
"description": "clock divisor", "description": "Clock divisor",
"type": "integer" "type": "integer"
}, },
"idlepc": { "idlepc": {
@ -588,53 +588,53 @@ VM_OBJECT_SCHEMA = {
"pattern": "^(0x[0-9a-fA-F]+)?$" "pattern": "^(0x[0-9a-fA-F]+)?$"
}, },
"idlemax": { "idlemax": {
"description": "idlemax value", "description": "Idlemax value",
"type": "integer", "type": "integer",
}, },
"idlesleep": { "idlesleep": {
"description": "idlesleep value", "description": "Idlesleep value",
"type": "integer", "type": "integer",
}, },
"exec_area": { "exec_area": {
"description": "exec area value", "description": "Exec area value",
"type": "integer", "type": "integer",
}, },
"disk0": { "disk0": {
"description": "disk0 size in MB", "description": "Disk0 size in MB",
"type": "integer" "type": "integer"
}, },
"disk1": { "disk1": {
"description": "disk1 size in MB", "description": "Disk1 size in MB",
"type": "integer" "type": "integer"
}, },
"auto_delete_disks": { "auto_delete_disks": {
"description": "automatically delete nvram and disk files", "description": "Automatically delete nvram and disk files",
"type": "boolean" "type": "boolean"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"aux": { "aux": {
"description": "auxiliary console TCP port", "description": "Auxiliary console TCP port",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 1, "minimum": 1,
"maximum": 65535 "maximum": 65535
}, },
"mac_addr": { "mac_addr": {
"description": "base MAC address", "description": "Base MAC address",
"type": "string", "type": "string",
#"minLength": 1, #"minLength": 1,
#"pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$" #"pattern": "^([0-9a-fA-F]{4}\\.){2}[0-9a-fA-F]{4}$"
}, },
"system_id": { "system_id": {
"description": "system ID", "description": "System ID",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -709,11 +709,11 @@ VM_OBJECT_SCHEMA = {
] ]
}, },
"startup_config_base64": { "startup_config_base64": {
"description": "startup configuration base64 encoded", "description": "Startup configuration base64 encoded",
"type": "string" "type": "string"
}, },
"private_config_base64": { "private_config_base64": {
"description": "private configuration base64 encoded", "description": "Private configuration base64 encoded",
"type": "string" "type": "string"
}, },
# C7200 properties # C7200 properties

@ -27,7 +27,7 @@ IOU_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "IOU VM identifier", "description": "Node UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,
@ -37,7 +37,7 @@ IOU_CREATE_SCHEMA = {
] ]
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
@ -110,7 +110,7 @@ IOU_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
@ -195,11 +195,11 @@ IOU_OBJECT_SCHEMA = {
"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}$" "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}$"
}, },
"node_directory": { "node_directory": {
"decription": "Path to the VM working directory", "description": "Path to the node working directory",
"type": "string" "type": "string"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"

@ -22,7 +22,7 @@ LINK_OBJECT_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"link_id": { "link_id": {
"description": "Link identifier", "description": "Link UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -35,7 +35,7 @@ LINK_OBJECT_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "VM identifier", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -55,15 +55,15 @@ LINK_OBJECT_SCHEMA = {
} }
}, },
"capturing": { "capturing": {
"description": "Read only propertie. True if a capture running on the link", "description": "Read only property. True if a capture running on the link",
"type": "boolean" "type": "boolean"
}, },
"capture_file_name": { "capture_file_name": {
"description": "Read only propertie. The name of the capture file if capture is running", "description": "Read only property. The name of the capture file if capture is running",
"type": ["string", "null"] "type": ["string", "null"]
}, },
"capture_file_path": { "capture_file_path": {
"description": "Read only propertie. The full path of the capture file if capture is running", "description": "Read only property. The full path of the capture file if capture is running",
"type": ["string", "null"] "type": ["string", "null"]
} }
}, },
@ -82,7 +82,7 @@ LINK_CAPTURE_SCHEMA = {
"enum": ["DLT_ATM_RFC1483", "DLT_EN10MB", "DLT_FRELAY", "DLT_C_HDLC"] "enum": ["DLT_ATM_RFC1483", "DLT_EN10MB", "DLT_FRELAY", "DLT_C_HDLC"]
}, },
"capture_file_name": { "capture_file_name": {
"description": "Read only propertie. The name of the capture file if capture is running", "description": "Read only property. The name of the capture file if capture is running",
"type": "string" "type": "string"
} }
}, },

@ -73,11 +73,14 @@ NODE_OBJECT_SCHEMA = {
"type": "string" "type": "string"
}, },
"project_id": { "project_id": {
"description": "Project identifier", "description": "Project UUID",
"type": "string" "type": "string",
"minLength": 36,
"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}$"
}, },
"node_id": { "node_id": {
"description": "Node identifier", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,

@ -39,7 +39,7 @@ PROJECT_CREATE_SCHEMA = {
"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}$" "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}$"
}, },
"temporary": { "temporary": {
"description": "If project is a temporary project", "description": "Whether the project is a temporary project or not",
"type": "boolean" "type": "boolean"
}, },
}, },
@ -57,7 +57,7 @@ PROJECT_UPDATE_SCHEMA = {
"minLength": 1 "minLength": 1
}, },
"temporary": { "temporary": {
"description": "If project is a temporary project", "description": "Whether the project is a temporary project or not",
"type": "boolean" "type": "boolean"
}, },
"path": { "path": {
@ -86,7 +86,7 @@ PROJECT_OBJECT_SCHEMA = {
"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}$" "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}$"
}, },
"temporary": { "temporary": {
"description": "If project is a temporary project", "description": "Whether the project is a temporary project or not",
"type": "boolean" "type": "boolean"
}, },
"path": { "path": {

@ -24,7 +24,7 @@ QEMU_CREATE_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "QEMU VM identifier", "description": "Node UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,
@ -43,7 +43,7 @@ QEMU_CREATE_SCHEMA = {
"type": "string", "type": "string",
}, },
"linked_clone": { "linked_clone": {
"description": "either the VM is a linked clone or not", "description": "Whether the VM is a linked clone or not",
"type": "boolean" "type": "boolean"
}, },
"qemu_path": { "qemu_path": {
@ -56,13 +56,13 @@ QEMU_CREATE_SCHEMA = {
"enum": QEMU_PLATFORMS + ["null"] "enum": QEMU_PLATFORMS + ["null"]
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet", "vnc"] "enum": ["telnet", "vnc"]
}, },
"hda_disk_image": { "hda_disk_image": {
@ -126,17 +126,17 @@ QEMU_CREATE_SCHEMA = {
"enum": ["c", "d", "n", "cn", "cd"] "enum": ["c", "d", "n", "cn", "cd"]
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"cpus": { "cpus": {
"description": "number of vCPUs", "description": "Number of vCPUs",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 1, "minimum": 1,
"maximum": 255, "maximum": 255,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 0, "minimum": 0,
"maximum": 32, "maximum": 32,
@ -216,7 +216,7 @@ QEMU_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"usage": { "usage": {
"description": "How to use the qemu VM", "description": "How to use the QEMU VM",
"type": "string", "type": "string",
}, },
"qemu_path": { "qemu_path": {
@ -229,13 +229,13 @@ QEMU_UPDATE_SCHEMA = {
"enum": QEMU_PLATFORMS + ["null"] "enum": QEMU_PLATFORMS + ["null"]
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet", "vnc"] "enum": ["telnet", "vnc"]
}, },
"hda_disk_image": { "hda_disk_image": {
@ -299,17 +299,17 @@ QEMU_UPDATE_SCHEMA = {
"enum": ["c", "d", "n", "cn", "cd"] "enum": ["c", "d", "n", "cn", "cd"]
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"cpus": { "cpus": {
"description": "number of vCPUs", "description": "Number of vCPUs",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 1, "minimum": 1,
"maximum": 255, "maximum": 255,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 0, "minimum": 0,
"maximum": 32, "maximum": 32,
@ -383,12 +383,12 @@ QEMU_OBJECT_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "QEMU VM uuid", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"project_id": { "project_id": {
"description": "Project uuid", "description": "Project UUID",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -398,11 +398,11 @@ QEMU_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"usage": { "usage": {
"description": "How to use the qemu VM", "description": "How to use the QEMU VM",
"type": "string", "type": "string",
}, },
"qemu_path": { "qemu_path": {
"description": "path to QEMU", "description": "Path to QEMU",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
@ -475,17 +475,17 @@ QEMU_OBJECT_SCHEMA = {
"type": "string" "type": "string"
}, },
"ram": { "ram": {
"description": "amount of RAM in MB", "description": "Amount of RAM in MB",
"type": "integer" "type": "integer"
}, },
"cpus": { "cpus": {
"description": "number of vCPUs", "description": "Number of vCPUs",
"type": ["integer", "null"], "type": ["integer", "null"],
"minimum": 1, "minimum": 1,
"maximum": 255, "maximum": 255,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 32, "maximum": 32,
@ -502,13 +502,13 @@ QEMU_OBJECT_SCHEMA = {
"pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$" "pattern": "^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$"
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet", "vnc"] "enum": ["telnet", "vnc"]
}, },
"initrd": { "initrd": {
@ -608,10 +608,10 @@ QEMU_OBJECT_SCHEMA = {
QEMU_BINARY_FILTER_SCHEMA = { QEMU_BINARY_FILTER_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request validation for a list of qemu capabilities", "description": "Request validation for a list of QEMU capabilities",
"properties": { "properties": {
"archs": { "archs": {
"description": "Architectures to filter binaries by", "description": "Architectures to filter binaries with",
"type": "array", "type": "array",
"items": { "items": {
"enum": QEMU_PLATFORMS "enum": QEMU_PLATFORMS
@ -623,7 +623,7 @@ QEMU_BINARY_FILTER_SCHEMA = {
QEMU_BINARY_LIST_SCHEMA = { QEMU_BINARY_LIST_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request validation for a list of qemu binaries", "description": "Request validation for a list of QEMU binaries",
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/QemuPath" "$ref": "#/definitions/QemuPath"
@ -648,7 +648,7 @@ QEMU_BINARY_LIST_SCHEMA = {
QEMU_CAPABILITY_LIST_SCHEMA = { QEMU_CAPABILITY_LIST_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Request validation for a list of qemu capabilities", "description": "Request validation for a list of QEMU capabilities",
"properties": { "properties": {
"kvm": { "kvm": {
"description": "Architectures that KVM is enabled for", "description": "Architectures that KVM is enabled for",
@ -663,7 +663,7 @@ QEMU_CAPABILITY_LIST_SCHEMA = {
QEMU_IMAGE_CREATE_SCHEMA = { QEMU_IMAGE_CREATE_SCHEMA = {
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"description": "Create a new qemu image. Options can be specific to a format. Read qemu-img manual for more information", "description": "Create a new QEMU image. Options can be specific to a format. Read qemu-img manual for more information",
"type": "object", "type": "object",
"properties": { "properties": {
"qemu_img": { "qemu_img": {
@ -679,7 +679,7 @@ QEMU_IMAGE_CREATE_SCHEMA = {
"enum": ["qcow2", "qcow", "vpc", "vdi", "vmdk", "raw"] "enum": ["qcow2", "qcow", "vpc", "vdi", "vmdk", "raw"]
}, },
"size": { "size": {
"description": "Image size in M", "description": "Image size in Megabytes",
"type": "integer" "type": "integer"
}, },
"preallocation": { "preallocation": {

@ -22,11 +22,11 @@ VERSION_SCHEMA = {
"additionalProperties": False, "additionalProperties": False,
"properties": { "properties": {
"version": { "version": {
"description": "Version number human readable", "description": "Version number",
"type": "string", "type": "string",
}, },
"local": { "local": {
"description": "Either this is a local server", "description": "Whether this is a local server or not",
"type": "boolean", "type": "boolean",
} }
} }

@ -22,7 +22,7 @@ VBOX_CREATE_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "VirtualBox VM instance identifier", "description": "Node UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,
@ -32,7 +32,7 @@ VBOX_CREATE_SCHEMA = {
] ]
}, },
"linked_clone": { "linked_clone": {
"description": "either the VM is a linked clone or not", "description": "Whether the VM is a linked clone or not",
"type": "boolean" "type": "boolean"
}, },
"name": { "name": {
@ -46,13 +46,13 @@ VBOX_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 36, # maximum given by the ICH9 chipset in VirtualBox "maximum": 36, # maximum given by the ICH9 chipset in VirtualBox
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VirtualBox adapter", "description": "Allow GNS3 to use any VirtualBox adapter",
"type": "boolean", "type": "boolean",
}, },
"adapter_type": { "adapter_type": {
@ -61,13 +61,13 @@ VBOX_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"ram": { "ram": {
@ -77,7 +77,7 @@ VBOX_CREATE_SCHEMA = {
"type": "integer" "type": "integer"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -105,13 +105,13 @@ VBOX_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 36, # maximum given by the ICH9 chipset in VirtualBox "maximum": 36, # maximum given by the ICH9 chipset in VirtualBox
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VirtualBox adapter", "description": "Allow GNS3 to use any VirtualBox adapter",
"type": "boolean", "type": "boolean",
}, },
"adapter_type": { "adapter_type": {
@ -120,13 +120,13 @@ VBOX_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"ram": { "ram": {
@ -136,7 +136,7 @@ VBOX_UPDATE_SCHEMA = {
"type": "integer" "type": "integer"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -159,7 +159,7 @@ VBOX_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "VirtualBox VM instance UUID", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -182,11 +182,11 @@ VBOX_OBJECT_SCHEMA = {
"type": ["string", "null"] "type": ["string", "null"]
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -194,13 +194,13 @@ VBOX_OBJECT_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 36, # maximum given by the ICH9 chipset in VirtualBox "maximum": 36, # maximum given by the ICH9 chipset in VirtualBox
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VirtualBox adapter", "description": "Allow GNS3 to use any VirtualBox adapter",
"type": "boolean", "type": "boolean",
}, },
"adapter_type": { "adapter_type": {
@ -209,7 +209,7 @@ VBOX_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"

@ -22,14 +22,14 @@ VMWARE_CREATE_SCHEMA = {
"type": "object", "type": "object",
"properties": { "properties": {
"node_id": { "node_id": {
"description": "VMware VM instance identifier", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "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}$" "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}$"
}, },
"linked_clone": { "linked_clone": {
"description": "either the VM is a linked clone or not", "description": "Whether the VM is a linked clone or not",
"type": "boolean" "type": "boolean"
}, },
"name": { "name": {
@ -38,22 +38,22 @@ VMWARE_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"vmx_path": { "vmx_path": {
"description": "path to the vmx file", "description": "Path to the vmx file",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -61,7 +61,7 @@ VMWARE_CREATE_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 10, # maximum adapters support by VMware VMs "maximum": 10, # maximum adapters support by VMware VMs
@ -72,11 +72,11 @@ VMWARE_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"use_ubridge": { "use_ubridge": {
"description": "use uBridge for network connections", "description": "Use uBridge for network connections",
"type": "boolean", "type": "boolean",
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VMware adapter", "description": "Allow GNS3 to use any VMware adapter",
"type": "boolean", "type": "boolean",
}, },
}, },
@ -95,22 +95,22 @@ VMWARE_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"vmx_path": { "vmx_path": {
"description": "path to the vmx file", "description": "Path to the vmx file",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -118,7 +118,7 @@ VMWARE_UPDATE_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 10, # maximum adapters support by VMware VMs "maximum": 10, # maximum adapters support by VMware VMs
@ -129,11 +129,11 @@ VMWARE_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"use_ubridge": { "use_ubridge": {
"description": "use uBridge for network connections", "description": "Use uBridge for network connections",
"type": "boolean", "type": "boolean",
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VMware adapter", "description": "Allow GNS3 to use any VMware adapter",
"type": "boolean", "type": "boolean",
}, },
}, },
@ -152,14 +152,14 @@ VMWARE_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "VMware VM instance UUID", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "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}$" "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}$"
}, },
"node_directory": { "node_directory": {
"decription": "Path to the VM working directory", "decription": "Path to the node working directory",
"type": ["string", "null"] "type": ["string", "null"]
}, },
"project_id": { "project_id": {
@ -170,16 +170,16 @@ VMWARE_OBJECT_SCHEMA = {
"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}$" "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}$"
}, },
"vmx_path": { "vmx_path": {
"description": "path to the vmx file", "description": "Path to the vmx file",
"type": "string", "type": "string",
"minLength": 1, "minLength": 1,
}, },
"enable_remote_console": { "enable_remote_console": {
"description": "enable the remote console", "description": "Enable the remote console",
"type": "boolean" "type": "boolean"
}, },
"headless": { "headless": {
"description": "headless mode", "description": "Headless mode",
"type": "boolean" "type": "boolean"
}, },
"acpi_shutdown": { "acpi_shutdown": {
@ -187,7 +187,7 @@ VMWARE_OBJECT_SCHEMA = {
"type": "boolean" "type": "boolean"
}, },
"adapters": { "adapters": {
"description": "number of adapters", "description": "Number of adapters",
"type": "integer", "type": "integer",
"minimum": 0, "minimum": 0,
"maximum": 10, # maximum adapters support by VMware VMs "maximum": 10, # maximum adapters support by VMware VMs
@ -198,15 +198,15 @@ VMWARE_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"use_ubridge": { "use_ubridge": {
"description": "use uBridge for network connections", "description": "Use uBridge for network connections",
"type": "boolean", "type": "boolean",
}, },
"use_any_adapter": { "use_any_adapter": {
"description": "allow GNS3 to use any VMware adapter", "description": "Allow GNS3 to use any VMware adapter",
"type": "boolean", "type": "boolean",
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"

@ -27,7 +27,7 @@ VPCS_CREATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "VPCS VM identifier", "description": "Node UUID",
"oneOf": [ "oneOf": [
{"type": "string", {"type": "string",
"minLength": 36, "minLength": 36,
@ -37,13 +37,13 @@ VPCS_CREATE_SCHEMA = {
] ]
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"startup_script": { "startup_script": {
@ -66,13 +66,13 @@ VPCS_UPDATE_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": ["integer", "null"] "type": ["integer", "null"]
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"startup_script": { "startup_script": {
@ -98,7 +98,7 @@ VPCS_OBJECT_SCHEMA = {
"minLength": 1, "minLength": 1,
}, },
"node_id": { "node_id": {
"description": "VPCS VM UUID", "description": "Node UUID",
"type": "string", "type": "string",
"minLength": 36, "minLength": 36,
"maxLength": 36, "maxLength": 36,
@ -113,13 +113,13 @@ VPCS_OBJECT_SCHEMA = {
"enum": ["started", "stopped"] "enum": ["started", "stopped"]
}, },
"console": { "console": {
"description": "console TCP port", "description": "Console TCP port",
"minimum": 1, "minimum": 1,
"maximum": 65535, "maximum": 65535,
"type": "integer" "type": "integer"
}, },
"console_type": { "console_type": {
"description": "console type", "description": "Console type",
"enum": ["telnet"] "enum": ["telnet"]
}, },
"project_id": { "project_id": {

Loading…
Cancel
Save