aboutsummaryrefslogtreecommitdiff
path: root/rumba/elements
diff options
context:
space:
mode:
authorVincenzo Maffione <v.maffione@gmail.com>2018-05-08 11:03:05 +0200
committerVincenzo Maffione <v.maffione@gmail.com>2018-05-08 11:04:09 +0200
commit2e8cd8b8754384bef611efaadb18e1a977c5b30e (patch)
tree897ca8e5540b4eea18ab197b24281bb3db6a68de /rumba/elements
parentf6bf94ed0502a5812aaf72cfe8af0ef3471dadc7 (diff)
downloadrumba-2e8cd8b8754384bef611efaadb18e1a977c5b30e.tar.gz
rumba-2e8cd8b8754384bef611efaadb18e1a977c5b30e.zip
elements: Experiment: add missing enrollment_strategy argument
This is necessary to enable scripts to use full-mesh or manual enrollment strategies. Fixes #54.
Diffstat (limited to 'rumba/elements')
-rw-r--r--rumba/elements/experimentation.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/rumba/elements/experimentation.py b/rumba/elements/experimentation.py
index da81c6c..990f285 100644
--- a/rumba/elements/experimentation.py
+++ b/rumba/elements/experimentation.py
@@ -115,7 +115,8 @@ class Experiment(object):
git_repo=None,
git_branch=None,
log_dir=None,
- prototype_logs=None):
+ prototype_logs=None,
+ enrollment_strategy='minimal'):
"""
:param testbed: The testbed of the experiment.
:param nodes: The list of nodes in the experiment.
@@ -123,6 +124,7 @@ class Experiment(object):
:param git_branch: The git branch of the repository.
: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'.
"""
if nodes is None:
nodes = list()
@@ -132,7 +134,7 @@ class Experiment(object):
self.testbed = testbed
# the strategy employed for completing the enrollment phase in
# the different DIFs
- self.enrollment_strategy = 'minimal' # 'full-mesh', 'manual'
+ 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'
@@ -141,6 +143,10 @@ class Experiment(object):
self.dt_flows = [] # a list of per-DIF lists of data transfer flows
self.mgmt_flows = [] # a list of per-DIF lists of management flows
+ if self.enrollment_strategy not in ['full-mesh', 'minimal', 'manual']:
+ raise Exception('Unknown enrollment strategy "%s"'
+ % enrollment_strategy)
+
# Determine log directory
if log_dir is None:
# If it is None, use /tmp/rumba/{project}