aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThijs Paelman <thijs@ouroboros.rocks>2026-01-14 22:29:41 +0100
committerThijs Paelman <thijs@ouroboros.rocks>2026-01-14 22:29:41 +0100
commitec20869ae48c80fb62f2db2135f167763ad21f67 (patch)
tree8c160eaecabdc2bd09dd9252bc7455f94a164898 /examples
parentc08ef7b956c3a04fee975bd7264e9e76a41e2af5 (diff)
downloadrumba-ec20869ae48c80fb62f2db2135f167763ad21f67.tar.gz
rumba-ec20869ae48c80fb62f2db2135f167763ad21f67.zip
examples: Add swapout CLI argument to scalingtimeHEADmaster
Add some methods to the enum for nicer reporting when printing the help documentation or when errors occur due to incorrect values on the command line. Signed-off-by: Thijs Paelman <thijs@ouroboros.rocks>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/scalingtime.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/scalingtime.py b/examples/scalingtime.py
index ff3c2ed..547622f 100755
--- a/examples/scalingtime.py
+++ b/examples/scalingtime.py
@@ -37,6 +37,10 @@ argparser.add_argument('--verbosity', metavar='VERBOSITY', type=str,
choices=['DEBUG', 'INFO', 'WARNING',
'ERROR', 'CRITICAL'],
help='Logging verbosity level')
+argparser.add_argument('--swapout', type=SwapOutStrategy.from_string,
+ default=PROMPT_SWAPOUT,
+ choices=list(SwapOutStrategy),
+ help='What action to perform on swap-out')
argparser.add_argument('--prototype', type=str, required=True,
choices=['irati', 'ouroboros', 'rlite'],
help='The kind of prototype plugin to use to run'
@@ -239,7 +243,7 @@ exp = exp_class(testbed, nodes=nodes)
if __name__ == "__main__":
draw_experiment(exp)
- with ExperimentManager(exp, swap_out_strategy=PROMPT_SWAPOUT):
+ with ExperimentManager(exp, swap_out_strategy=args.swapout):
exp.swap_in()
if not isinstance(testbed, docker.Testbed) \
and not isinstance(testbed, qemu.Testbed) \