Utils¶
-
class
rumba.utils.
ExperimentManager
(experiment, swap_out_strategy=<SwapOutStrategy.AUTO: 1>, syslogs_strategy=<SyslogsStrategy.NO: 0>, syslogs=None)[source]¶ Helper class for running a Rumba experiment.
Parameters: - experiment (
rumba.model.Experiment
) – The experiment name. - swap_out_strategy – What action to perform on swap-out.
- syslogs_strategy – What system and prototype logs to retrieve before swap-out.
- syslogs (
str
) – The location of the syslogs in case of custom syslogs.
Note
Options for swap_out_strategy are
- NO_SWAPOUT == 0,
- AUTO_SWAPOUT == 1,
- PAUSE_SWAPOUT == 2,
- PROMPT_SWAPOUT == 3.
Note
Options for syslog_strategy are
- NO_SYSLOGS == 0,
- DEFAULT_SYSLOGS == 1,
- DMESG_SYSLOGS == 2,
- CUSTOM_SYSLOGS == 3.
- experiment (
Example usage of the class:
from rumba.utils import ExperimentManager, PROMPT_SWAPOUT
with ExperimentManager(exp, swap_out_strategy=PROMPT_SWAPOUT):
exp.swap_in()
exp.bootstrap_prototype()