mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-13 04:48:22 +00:00
Make sure nodes send the right notification when started, stopped or suspended.
This commit is contained in:
@ -480,6 +480,7 @@ class VMwareVM(BaseNode):
|
||||
self._hw_virtualization = True
|
||||
|
||||
self._started = True
|
||||
self.status = "started"
|
||||
log.info("VMware VM '{name}' [{id}] started".format(name=self.name, id=self.id))
|
||||
|
||||
@asyncio.coroutine
|
||||
@ -502,6 +503,7 @@ class VMwareVM(BaseNode):
|
||||
yield from self._control_vm("stop")
|
||||
finally:
|
||||
self._started = False
|
||||
self.status = "stopped"
|
||||
|
||||
self._read_vmx_file()
|
||||
if self._use_ubridge:
|
||||
@ -538,6 +540,7 @@ class VMwareVM(BaseNode):
|
||||
if self.manager.host_type != "ws":
|
||||
raise VMwareError("Pausing a VM is only supported by VMware Workstation")
|
||||
yield from self._control_vm("pause")
|
||||
self.status = "suspended"
|
||||
log.info("VMware VM '{name}' [{id}] paused".format(name=self.name, id=self.id))
|
||||
|
||||
@asyncio.coroutine
|
||||
@ -549,6 +552,7 @@ class VMwareVM(BaseNode):
|
||||
if self.manager.host_type != "ws":
|
||||
raise VMwareError("Unpausing a VM is only supported by VMware Workstation")
|
||||
yield from self._control_vm("unpause")
|
||||
self.status = "started"
|
||||
log.info("VMware VM '{name}' [{id}] resumed".format(name=self.name, id=self.id))
|
||||
|
||||
@asyncio.coroutine
|
||||
|
Reference in New Issue
Block a user