aboutsummaryrefslogtreecommitdiff
path: root/rumba/elements
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2018-05-08 11:32:19 +0200
committerVincenzo Maffione <v.maffione@gmail.com>2018-05-08 11:32:19 +0200
commite7e81f30d8a6054e142cf7c77459532247a644d2 (patch)
treedf733b905852e2e0ce3d1a44855ca35f5feebd86 /rumba/elements
parent2e8cd8b8754384bef611efaadb18e1a977c5b30e (diff)
downloadrumba-e7e81f30d8a6054e142cf7c77459532247a644d2.tar.gz
rumba-e7e81f30d8a6054e142cf7c77459532247a644d2.zip
elements: Experiment: add missing dt_strategy argument
Diffstat (limited to 'rumba/elements')
-rw-r--r--rumba/elements/experimentation.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/rumba/elements/experimentation.py b/rumba/elements/experimentation.py
index 990f285..9890975 100644
--- a/rumba/elements/experimentation.py
+++ b/rumba/elements/experimentation.py
@@ -116,7 +116,8 @@ class Experiment(object):
git_branch=None,
log_dir=None,
prototype_logs=None,
- enrollment_strategy='minimal'):
+ enrollment_strategy='minimal',
+ dt_strategy='full-mesh'):
"""
:param testbed: The testbed of the experiment.
:param nodes: The list of nodes in the experiment.
@@ -125,6 +126,7 @@ class Experiment(object):
:param log_dir: Where to log output of the experiment.
:param prototype_logs: Where the prototype logs its output.
:param enrollment_strategy: Can be 'full-mesh', 'minimal' or 'manual'.
+ :param dt_strategy: For data flows, 'full-mesh', 'minimal' or 'manual'.
"""
if nodes is None:
nodes = list()
@@ -136,8 +138,8 @@ class Experiment(object):
# the different DIFs
self.enrollment_strategy = enrollment_strategy # 'full-mesh', 'manual'
# the strategy employed for setting up the data transfer
- # networks in the DIFs after enrollment
- self.dt_strategy = 'full-mesh' # 'minimal', 'manual'
+ # network in the DIFs after enrollment
+ self.dt_strategy = dt_strategy
self.dif_ordering = []
self.enrollments = [] # a list of per-DIF lists of enrollments
self.dt_flows = [] # a list of per-DIF lists of data transfer flows
@@ -145,7 +147,10 @@ class Experiment(object):
if self.enrollment_strategy not in ['full-mesh', 'minimal', 'manual']:
raise Exception('Unknown enrollment strategy "%s"'
- % enrollment_strategy)
+ % self.enrollment_strategy)
+ if self.dt_strategy not in ['full-mesh', 'minimal', 'manual']:
+ raise Exception('Unknown dt strategy "%s"'
+ % self.dt_strategy)
# Determine log directory
if log_dir is None: