aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2018-04-25 17:01:24 +0200
committerSander Vrijders <[email protected]>2018-04-25 17:01:24 +0200
commit620b4eb343098864c54fc26086556dc97cca8e63 (patch)
treee7556c5c72428d82c001107e276f2d95ee236eb7
parent94cebef59c46404e20c6d71752ebfb80147d122a (diff)
parentcea750e4aa73b3b2c80bc77fea039d3d2862d21f (diff)
downloadrumba-620b4eb343098864c54fc26086556dc97cca8e63.tar.gz
rumba-620b4eb343098864c54fc26086556dc97cca8e63.zip
Merge branch 'master' into testing
-rw-r--r--rumba/elements/experimentation.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/rumba/elements/experimentation.py b/rumba/elements/experimentation.py
index e8e3c27..da81c6c 100644
--- a/rumba/elements/experimentation.py
+++ b/rumba/elements/experimentation.py
@@ -307,6 +307,7 @@ class Experiment(object):
# breadth-first traversal.
enrolled = {first}
frontier = {first}
+ dt_connected = set()
while len(frontier):
cur = frontier.pop()
for edge in dif_graphs[dif][cur]:
@@ -323,9 +324,9 @@ class Experiment(object):
'lower_dif': edge[1]})
self.mgmt_flows[-1].append({'src': enrollee,
'dst': enroller})
- if self.dt_strategy == 'minimal':
- self.dt_flows[-1].append({'src': enrollee,
- 'dst': enroller})
+ self.dt_flows[-1].append({'src': enrollee,
+ 'dst': enroller})
+ dt_connected.add((enrollee, enroller))
frontier.add(edge[0])
if len(dif.members) != len(enrolled):
raise Exception("Disconnected DIF found: %s" % (dif,))
@@ -344,8 +345,10 @@ class Experiment(object):
'enroller': enroller,
'lower_dif': edge[1]})
if self.dt_strategy == 'full-mesh':
- self.dt_flows[-1].append({'src': enrollee,
- 'dst': enroller})
+ if ((enrollee, enroller) not in dt_connected and
+ (enroller, enrollee) not in dt_connected):
+ self.dt_flows[-1].append({'src': enrollee,
+ 'dst': enroller})
if not (self.dt_strategy == 'minimal'
or self.dt_strategy == 'full-mesh') \