1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-15 12:59:06 +00:00

Fix Deleting a docker VM gives console error message "Not connected"

Fix #446
This commit is contained in:
Julien Duponchelle 2016-03-01 20:25:50 +01:00
parent eae6f33e29
commit c833a20a8c
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -512,7 +512,7 @@ class DockerVM(BaseVM):
:param adapter_number: adapter number
"""
if not self._ubridge_hypervisor:
if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
return
yield from self._ubridge_hypervisor.send("bridge delete bridge{name}".format(
@ -634,7 +634,7 @@ class DockerVM(BaseVM):
"""
adapter = "bridge{}".format(adapter_number)
if not self._ubridge_hypervisor:
if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
raise VMwareError("Cannot start the packet capture: uBridge is not running")
yield from self._ubridge_hypervisor.send('bridge start_capture {name} "{output_file}"'.format(name=adapter, output_file=output_file))
@ -647,7 +647,7 @@ class DockerVM(BaseVM):
"""
adapter = "bridge{}".format(adapter_number)
if not self._ubridge_hypervisor:
if not self._ubridge_hypervisor or not self._ubridge_hypervisor.is_running():
raise VMwareError("Cannot stop the packet capture: uBridge is not running")
yield from self._ubridge_hypervisor.send("bridge stop_capture {name}".format(name=adapter))