From d1b49132f669cf1df4367103ebad63029793a127 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Thu, 1 Jun 2017 17:24:25 +0200 Subject: model: Experiment: add prototype_name() --- rumba/model.py | 8 ++++++-- rumba/prototypes/irati.py | 3 +++ rumba/prototypes/ouroboros.py | 3 +++ rumba/prototypes/rlite.py | 3 +++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/rumba/model.py b/rumba/model.py index 9fbda57..8631a9d 100644 --- a/rumba/model.py +++ b/rumba/model.py @@ -514,11 +514,15 @@ class Experiment: @abc.abstractmethod def install_prototype(self): - raise Exception('run_prototype() method not implemented') + raise Exception('install_prototype() method not implemented') @abc.abstractmethod def bootstrap_prototype(self): - raise Exception('run_prototype() method not implemented') + raise Exception('bootstrap_prototype() method not implemented') + + @abc.abstractmethod + def prototype_name(self): + raise Exception('prototype_name() method not implemented') def swap_in(self): # Realize the experiment testbed (testbed-specific) diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index f9c715f..750d6aa 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -38,6 +38,9 @@ logger = log.get_logger(__name__) # An experiment over the IRATI implementation class Experiment(mod.Experiment): + def prototype_name(self): + return 'irati' + @staticmethod def real_sudo(s): return 'sudo ' + s diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 01b8b72..9ac1425 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -32,6 +32,9 @@ class Experiment(mod.Experiment): def __init__(self, testbed, nodes=None): mod.Experiment.__init__(self, testbed, nodes) + def prototype_name(self): + return 'ouroboros' + def setup_ouroboros(self): for node in self.nodes: ssh.execute_command(self.testbed, node.ssh_config, diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index 625668d..098125a 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -34,6 +34,9 @@ class Experiment(mod.Experiment): def __init__(self, testbed, nodes=None): mod.Experiment.__init__(self, testbed, nodes) + def prototype_name(self): + return 'rlite' + def execute_commands(self, node, cmds): ssh.execute_commands(self.testbed, node.ssh_config, cmds, time_out=None) -- cgit v1.2.3