mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-22 06:07:51 +00:00
Fix VMware support
This commit is contained in:
parent
b98d4cb042
commit
fd0e8f89db
@ -88,7 +88,8 @@ class VMwareVM(BaseNode):
|
||||
"adapter_type": self.adapter_type,
|
||||
"use_any_adapter": self.use_any_adapter,
|
||||
"status": self.status,
|
||||
"node_directory": self.working_dir}
|
||||
"node_directory": self.working_dir,
|
||||
"linked_clone": self._linked_clone}
|
||||
return json
|
||||
|
||||
@property
|
||||
|
@ -26,7 +26,6 @@ from gns3server.compute.project_manager import ProjectManager
|
||||
|
||||
from gns3server.schemas.vmware import (
|
||||
VMWARE_CREATE_SCHEMA,
|
||||
VMWARE_UPDATE_SCHEMA,
|
||||
VMWARE_OBJECT_SCHEMA
|
||||
)
|
||||
|
||||
@ -100,7 +99,7 @@ class VMwareHandler:
|
||||
409: "Conflict"
|
||||
},
|
||||
description="Update a VMware VM instance",
|
||||
input=VMWARE_UPDATE_SCHEMA,
|
||||
input=VMWARE_OBJECT_SCHEMA,
|
||||
output=VMWARE_OBJECT_SCHEMA)
|
||||
def update(request, response):
|
||||
|
||||
|
@ -80,58 +80,6 @@ VMWARE_CREATE_SCHEMA = {
|
||||
"required": ["name", "vmx_path", "linked_clone"],
|
||||
}
|
||||
|
||||
VMWARE_UPDATE_SCHEMA = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"description": "Request validation to update a VMware VM instance",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "VMware VM instance name",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
},
|
||||
"vmx_path": {
|
||||
"description": "Path to the vmx file",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
},
|
||||
"console": {
|
||||
"description": "Console TCP port",
|
||||
"minimum": 1,
|
||||
"maximum": 65535,
|
||||
"type": "integer"
|
||||
},
|
||||
"enable_remote_console": {
|
||||
"description": "Enable the remote console",
|
||||
"type": "boolean"
|
||||
},
|
||||
"headless": {
|
||||
"description": "Headless mode",
|
||||
"type": "boolean"
|
||||
},
|
||||
"acpi_shutdown": {
|
||||
"description": "ACPI shutdown",
|
||||
"type": "boolean"
|
||||
},
|
||||
"adapters": {
|
||||
"description": "Number of adapters",
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 10, # maximum adapters support by VMware VMs
|
||||
},
|
||||
"adapter_type": {
|
||||
"description": "VMware adapter type",
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
},
|
||||
"use_any_adapter": {
|
||||
"description": "Allow GNS3 to use any VMware adapter",
|
||||
"type": "boolean",
|
||||
},
|
||||
},
|
||||
"additionalProperties": False,
|
||||
}
|
||||
|
||||
|
||||
VMWARE_OBJECT_SCHEMA = {
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
@ -203,7 +151,10 @@ VMWARE_OBJECT_SCHEMA = {
|
||||
"maximum": 65535,
|
||||
"type": "integer"
|
||||
},
|
||||
"linked_clone": {
|
||||
"description": "Whether the VM is a linked clone or not",
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": False,
|
||||
"required": ["name", "node_id", "project_id"]
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user