diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-05-08 17:07:17 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-05-08 17:07:17 +0200 |
commit | b786439780f04a3331f9c2d069427e1c111e7005 (patch) | |
tree | 493df0f5e5241a4e1f8a613a5def595f2e74c933 /rumba/elements | |
parent | d75418c2884e704cad16f4a354de973cb9208cc8 (diff) | |
parent | e7e81f30d8a6054e142cf7c77459532247a644d2 (diff) | |
download | rumba-b786439780f04a3331f9c2d069427e1c111e7005.tar.gz rumba-b786439780f04a3331f9c2d069427e1c111e7005.zip |
Merge branch 'master' into testing
Diffstat (limited to 'rumba/elements')
-rw-r--r-- | rumba/elements/experimentation.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/rumba/elements/experimentation.py b/rumba/elements/experimentation.py index da81c6c..9890975 100644 --- a/rumba/elements/experimentation.py +++ b/rumba/elements/experimentation.py @@ -115,7 +115,9 @@ class Experiment(object): git_repo=None, git_branch=None, log_dir=None, - prototype_logs=None): + prototype_logs=None, + enrollment_strategy='minimal', + dt_strategy='full-mesh'): """ :param testbed: The testbed of the experiment. :param nodes: The list of nodes in the experiment. @@ -123,6 +125,8 @@ 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'. + :param dt_strategy: For data flows, 'full-mesh', 'minimal' or 'manual'. """ if nodes is None: nodes = list() @@ -132,15 +136,22 @@ 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' + # 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 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"' + % 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: # If it is None, use /tmp/rumba/{project} |