diff options
-rwxr-xr-x | rhumba.py | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -280,10 +280,16 @@ class Experiment: def add_node(self, node): self.nodes.remove(node) - def run(self): + # Realize the experiment topology, using a testbed-specific setup + def realize(self): self.links = get_links(self.nodes) self.testbed.create_experiment(self.nodes, self.links) + @abc.abstractmethod + def run(self): + raise Exception('run() method not implemented') + + # An experiment over the IRATI implementation class IRATIExperiment(Experiment): def __init__(self, testbed, nodes = list()): @@ -291,7 +297,7 @@ class IRATIExperiment(Experiment): def run(self): print("[IRATI experiment] start") - Experiment.run(self) + self.realize() print("[IRATI experiment] end") @@ -302,7 +308,7 @@ class RLITEExperiment(Experiment): def run(self): print("[RLITE experiment] start") - Experiment.run(self) + self.realize() print("[RLITE experiment] end") @@ -314,7 +320,7 @@ class OuroborosExperiment(Experiment): def run(self): print("[Ouroboros experiment] start") print("Creating resources...") - Experiment.run(self) + self.realize() print("Setting up Ouroboros...") our.setup_ouroboros(self.testbed, self.nodes) print("Binding names...") |