aboutsummaryrefslogtreecommitdiff
path: root/rumba/utils.py
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-03-27 16:40:59 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2018-03-28 16:41:40 +0200
commite694075c7fdcc9c4579d55b792da7a1391401b35 (patch)
treecc75c83e5ef17133c2f9e754be3eb0ebee4d6984 /rumba/utils.py
parenta1bddf0ab2cd7bee30b1f0dc1575c0b8c532e157 (diff)
downloadrumba-e694075c7fdcc9c4579d55b792da7a1391401b35.tar.gz
rumba-e694075c7fdcc9c4579d55b792da7a1391401b35.zip
testbeds, prototypes, model: Add docstrings
This adds docstrings for methods of in the testbeds, prototypes and certain things in the model.
Diffstat (limited to 'rumba/utils.py')
-rw-r--r--rumba/utils.py27
1 files changed, 24 insertions, 3 deletions
diff --git a/rumba/utils.py b/rumba/utils.py
index a522e94..f6d6c1c 100644
--- a/rumba/utils.py
+++ b/rumba/utils.py
@@ -47,7 +47,9 @@ logger = log.get_logger(__name__)
class SwapOutStrategy(enum.Enum):
-
+ """
+ What action to perform on swap-out.
+ """
NO = 0
AUTO = 1
PAUSE = 2
@@ -55,7 +57,9 @@ class SwapOutStrategy(enum.Enum):
class SyslogsStrategy(enum.Enum):
-
+ """
+ What prototype and system logs to retrieve.
+ """
NO = 0
DEFAULT = 1
DMESG = 2
@@ -75,12 +79,29 @@ CUSTOM_SYSLOGS = SyslogsStrategy.CUSTOM
class ExperimentManager(object):
-
+ """
+ Helper class for running a Rumba experiment.
+ """
def __init__(self,
experiment,
swap_out_strategy=AUTO_SWAPOUT,
syslogs_strategy=NO_SYSLOGS,
syslogs=None):
+ """
+ Initializes the ExperimentManager.
+
+ :param experiment: The experiment name.
+ :param swap_out_strategy: What action to perform on swap-out.
+ :param syslog_strategy: What system and prototype logs to retrieve
+ before swap-out.
+ :param syslogs: The location of the syslogs in case of custom syslogs.
+
+ .. note:: Options for swap_out_strategy are NO_SWAPOUT, AUTO_SWAPOUT,
+ PAUSE_SWAPOUT, PROMPT_SWAPOUT.
+
+ .. note:: Options for syslog_strategy are NO_SYSLOGS, DEFAULT_SYSLOGS,
+ DMESG_SYSLOGS, CUSTOM_SYSLOGS.
+ """
assert isinstance(experiment, model.Experiment), \
'An experiment instance is required.'
self.experiment = experiment