aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/NodePath.py
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2016-02-17 12:03:48 +0100
committerMatus Fabian <matfabia@cisco.com>2016-02-18 11:40:17 +0100
commit3936756adb84508ef7ada2cc9016eb449fba2024 (patch)
tree9b98b780c8695a28811d551d798ba106e7d0c2df /resources/libraries/python/NodePath.py
parentae0e807c1ea95d3f2ec16a4c7aa9ee027d18c854 (diff)
Bridge Domain tests update
Change-Id: I4ad1566fd23746c0a85d7abce2bbffd085ee397c Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'resources/libraries/python/NodePath.py')
-rw-r--r--resources/libraries/python/NodePath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/resources/libraries/python/NodePath.py b/resources/libraries/python/NodePath.py
index d1aa1f76d4..6700ddfe2a 100644
--- a/resources/libraries/python/NodePath.py
+++ b/resources/libraries/python/NodePath.py
@@ -115,6 +115,10 @@ class NodePath(object):
l_set = set(links).intersection(self._links)
else:
l_set = set(links).difference(self._links)
+ if not l_set:
+ raise RuntimeError(
+ 'No free link between {0} and {1}, all links already ' +
+ 'used'.format(node1['host'], node2['host']))
if not l_set:
link = links.pop()