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:
Julien Duponchelle
2016-02-02 18:25:17 +01:00
parent 71c3bda0a5
commit fd22cd8361
16 changed files with 67 additions and 31 deletions

View File

@ -58,6 +58,7 @@ class BaseVM:
self._hw_virtualization = False
self._ubridge_hypervisor = None
self._vm_status = "stopped"
self._command_line = ""
if self._console is not None:
if console_type == "vnc":
@ -94,6 +95,17 @@ class BaseVM:
self._vm_status = status
self._project.emit("vm.{}".format(status), self)
@property
def command_line(self):
"""Return command used to start the VM"""
return self._command_line
@command_line.setter
def command_line(self, command_line):
self._command_line = command_line
@property
def project(self):
"""