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:
Julien Duponchelle committed 2016-02-29 10:44:08 +01:00
1 parent c333e9451f
commit 9d28f4c0c3
12 files changed
+190 -132

No files matched your search

+2 -5
View File
@@ -97,11 +97,8 @@ class IOUVM(BaseVM):
Closes this IOU VM.
"""
log.debug('IOU "{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
adapters = self._ethernet_adapters + self._serial_adapters
for adapter in adapters: