From cd34f0b66e7981490bd50752abe68ea11481963c Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 12 Jun 2018 16:40:11 +0200 Subject: elements: Add terminate prototype and reboot nodes This adds functions to terminate the prototype gracefully or forcefully, and to reboot all nodes in the experiment. This is useful when running the experiment interactively, so swapping out and back in is not always required. --- rumba/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rumba/utils.py') diff --git a/rumba/utils.py b/rumba/utils.py index 88ea0d3..822deb3 100644 --- a/rumba/utils.py +++ b/rumba/utils.py @@ -29,6 +29,7 @@ import os import rumba.log as log import rumba.model as model +import rumba.testbeds.local as local # Fix input reordering try: @@ -204,7 +205,11 @@ class ExperimentManager(object): # Swap out if do_swap_out: - self.experiment.swap_out() + # Kill prototype in case of local testbed + if isinstance(self.experiment.testbed, local.Testbed): + self.experiment.terminate_prototype() + else: + self.experiment.swap_out() if exc_val is not None: logger.error('Something went wrong. ' 'Got %s: %s', -- cgit v1.2.3