Return status in all cases

pull/565/head
Julien Duponchelle 8 years ago
parent c4ebdc0e37
commit f052299eb1
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -108,6 +108,7 @@ class DockerVM(BaseNode):
"console_http_path": self.console_http_path,
"aux": self.aux,
"start_command": self.start_command,
"status": self.status,
"environment": self.environment,
"node_directory": self.working_dir
}

@ -132,6 +132,7 @@ class Router(BaseNode):
"disk0": self._disk0,
"disk1": self._disk1,
"auto_delete_disks": self._auto_delete_disks,
"status": self.status,
"console": self.console,
"console_type": "telnet",
"aux": self.aux,

@ -205,6 +205,8 @@ class IOUVM(BaseNode):
"node_id": self.id,
"node_directory": self.working_dir,
"console": self._console,
"console_type": "telnet",
"status": self.status,
"project_id": self.project.id,
"path": self.path,
"md5sum": gns3server.utils.images.md5sum(self.path),

@ -85,6 +85,7 @@ class VirtualBoxVM(BaseNode):
"adapters": self._adapters,
"adapter_type": self.adapter_type,
"ram": self.ram,
"status": self.status,
"use_any_adapter": self.use_any_adapter}
if self._linked_clone:
json["node_directory"] = self.working_dir

@ -91,6 +91,7 @@ class VMwareVM(BaseNode):
"adapter_type": self.adapter_type,
"use_ubridge": self.use_ubridge,
"use_any_adapter": self.use_any_adapter,
"status": self.status,
"node_directory": self.working_dir}
return json

@ -233,7 +233,11 @@ DOCKER_OBJECT_SCHEMA = {
"node_directory": {
"description": "Path to the node working directory",
"type": "string"
}
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
},
"additionalProperties": False,
"required": ["node_id",
@ -247,7 +251,8 @@ DOCKER_OBJECT_SCHEMA = {
"console_resolution",
"start_command",
"environment",
"node_directory"]
"node_directory",
"status"]
}

@ -544,6 +544,10 @@ VM_OBJECT_SCHEMA = {
"type": "string",
"minLength": 1,
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
"platform": {
"description": "Cisco router platform",
"type": "string",

@ -206,12 +206,20 @@ IOU_OBJECT_SCHEMA = {
"description": "Path to the node working directory",
"type": "string"
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
"console": {
"description": "Console TCP port",
"minimum": 1,
"maximum": 65535,
"type": "integer"
},
"console_type": {
"description": "Console type",
"enum": ["telnet"]
},
"project_id": {
"description": "Project UUID",
"type": "string",

@ -397,6 +397,10 @@ QEMU_OBJECT_SCHEMA = {
"type": "string",
"minLength": 1,
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
"usage": {
"description": "How to use the QEMU VM",
"type": "string",
@ -603,7 +607,8 @@ QEMU_OBJECT_SCHEMA = {
"process_priority",
"options",
"node_directory",
"command_line"]
"command_line",
"status"]
}
QEMU_BINARY_FILTER_SCHEMA = {

@ -177,6 +177,10 @@ VBOX_OBJECT_SCHEMA = {
"type": "string",
"minLength": 1,
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
"node_directory": {
"decription": "Path to the VM working directory",
"type": ["string", "null"]

@ -158,6 +158,10 @@ VMWARE_OBJECT_SCHEMA = {
"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}$"
},
"status": {
"description": "VM status",
"enum": ["started", "stopped", "suspended"]
},
"node_directory": {
"decription": "Path to the node working directory",
"type": ["string", "null"]

@ -110,7 +110,7 @@ VPCS_OBJECT_SCHEMA = {
},
"status": {
"description": "VM status",
"enum": ["started", "stopped"]
"enum": ["started", "stopped", "suspended"]
},
"console": {
"description": "Console TCP port",

@ -63,7 +63,8 @@ def test_json(vm, project):
'aux': vm.aux,
'start_command': vm.start_command,
'environment': vm.environment,
'node_directory': vm.working_dir
'node_directory': vm.working_dir,
'status': 'stopped'
}

Loading…
Cancel
Save