Create link when loading topology on controller

This commit is contained in:
Julien Duponchelle committed 2016-06-15 16:26:16 +02:00
1 parent 742243e9df
commit 0569480953
7 files changed
+61 -32

No files matched your search

+9 -2
View File
@@ -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