mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-18 07:18:18 +00:00
Send command line used to start the VM to client
Add a command_line attribute to the VM object with the command line used to start the VM. Now /start return the object in order to get this new attribute. And the HTTP status code is 200 instead of 204 because 204 disallow body. Support: * Qemu * Dynamips * IOU Ref https://github.com/GNS3/gns3-gui/issues/513
This commit is contained in:
@ -146,11 +146,12 @@ class QEMUHandler:
|
||||
"vm_id": "UUID for the instance"
|
||||
},
|
||||
status_codes={
|
||||
204: "Instance started",
|
||||
200: "Instance started",
|
||||
400: "Invalid request",
|
||||
404: "Instance doesn't exist"
|
||||
},
|
||||
description="Start a Qemu VM instance")
|
||||
description="Start a Qemu VM instance",
|
||||
output=QEMU_OBJECT_SCHEMA)
|
||||
def start(request, response):
|
||||
|
||||
qemu_manager = Qemu.instance()
|
||||
@ -161,7 +162,7 @@ class QEMUHandler:
|
||||
if pm.check_hardware_virtualization(vm) is False:
|
||||
raise HTTPConflict(text="Cannot start VM with KVM enabled because hardware virtualization (VT-x/AMD-V) is already used by another software like VMware or VirtualBox")
|
||||
yield from vm.start()
|
||||
response.set_status(204)
|
||||
response.json(vm)
|
||||
|
||||
@classmethod
|
||||
@Route.post(
|
||||
|
Reference in New Issue
Block a user