Raise error if using a non linked clone VM twice

Fix https://github.com/GNS3/gns3-gui/issues/1593
This commit is contained in:
Julien Duponchelle
2016-10-24 21:39:35 +02:00
parent 597e1e618d
commit ae1e027031
20 changed files with 100 additions and 54 deletions

View File

@ -34,6 +34,7 @@ from ..config import Config
from ..utils.asyncio import wait_run_in_executor
from ..utils import force_unix_path
from .project_manager import ProjectManager
from .port_manager import PortManager
from .nios.nio_udp import NIOUDP
from .nios.nio_tap import NIOTAP
@ -102,7 +103,8 @@ class BaseManager:
:returns: Port manager
"""
if self._port_manager is None:
self._port_manager = PortManager.instance()
return self._port_manager
@port_manager.setter
@ -518,3 +520,9 @@ class BaseManager:
md5sum(path)
except OSError as e:
raise aiohttp.web.HTTPConflict(text="Could not write image: {} because {}".format(filename, e))
def reset(self):
"""
Reset module for tests
"""
self._nodes = {}