mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Create link when loading topology on controller
This commit is contained in:
7 files changed
+61
-32
No files matched your search
@@ -30,9 +30,12 @@ class Link:
|
||||
Base class for links.
|
||||
"""
|
||||
|
||||
def __init__(self, project):
|
||||
def __init__(self, project, link_id=None):
|
||||
|
||||
self._id = str(uuid.uuid4())
|
||||
if link_id:
|
||||
self._id = link_id
|
||||
else:
|
||||
self._id = str(uuid.uuid4())
|
||||
self._nodes = []
|
||||
self._project = project
|
||||
self._capturing = False
|
||||
@@ -134,6 +137,10 @@ class Link:
|
||||
def id(self):
|
||||
return self._id
|
||||
|
||||
@property
|
||||
def nodes(self):
|
||||
return self._nodes
|
||||
|
||||
@property
|
||||
def capturing(self):
|
||||
return self._capturing
|
||||
|
||||
Reference in new issue
Block a user