mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Fix creation of link when reloading a project
Fix https://github.com/GNS3/gns3-gui/issues/1457
This commit is contained in:
8 files changed
+192
-107
No files matched your search
@@ -41,6 +41,14 @@ class Link:
|
||||
self._capturing = False
|
||||
self._capture_file_name = None
|
||||
self._streaming_pcap = None
|
||||
self._created = False
|
||||
|
||||
@property
|
||||
def created(self):
|
||||
"""
|
||||
:returns: True the link has been created on the computes
|
||||
"""
|
||||
return self._created
|
||||
|
||||
@asyncio.coroutine
|
||||
def add_node(self, node, adapter_number, port_number, label=None):
|
||||
@@ -70,6 +78,8 @@ class Link:
|
||||
})
|
||||
|
||||
if len(self._nodes) == 2:
|
||||
yield from self.create()
|
||||
self._created = True
|
||||
self._project.controller.notification.emit("link.created", self.__json__())
|
||||
|
||||
self._project.dump()
|
||||
|
||||
Reference in new issue
Block a user