mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Refactor aux port allocation
This move the allocation of aux port to the base vm. Also now the free of console port during the close is in the base VM. An aux port is allocated to the docker container but not used for the moment. Ref https://github.com/GNS3/gns3-gui/issues/1039
This commit is contained in:
12 files changed
+190
-132
No files matched your search
@@ -542,14 +542,8 @@ class VMwareVM(BaseVM):
|
||||
Closes this VMware VM.
|
||||
"""
|
||||
|
||||
if self._closed:
|
||||
# VM is already closed
|
||||
return
|
||||
|
||||
log.debug("VMware VM '{name}' [{id}] is closing".format(name=self.name, id=self.id))
|
||||
if self._console:
|
||||
self._manager.port_manager.release_tcp_port(self._console, self._project)
|
||||
self._console = None
|
||||
if not (yield from super().close()):
|
||||
return False
|
||||
|
||||
for adapter in self._ethernet_adapters.values():
|
||||
if adapter is not None:
|
||||
@@ -567,9 +561,6 @@ class VMwareVM(BaseVM):
|
||||
if self._linked_clone:
|
||||
yield from self.manager.remove_from_vmware_inventory(self._vmx_path)
|
||||
|
||||
log.info("VirtualBox VM '{name}' [{id}] closed".format(name=self.name, id=self.id))
|
||||
self._closed = True
|
||||
|
||||
@property
|
||||
def headless(self):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user