aboutsummaryrefslogtreecommitdiff
path: root/rumba/utils.py
diff options
context:
space:
mode:
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