From 38268b9218270ef57402e3c306d8b3bfdcd5103a Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Mon, 6 Feb 2017 18:14:12 +0100 Subject: rhumba: add FakeTestbed to ease development --- rhumba.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/rhumba.py b/rhumba.py index 535b650..5940da0 100755 --- a/rhumba.py +++ b/rhumba.py @@ -41,7 +41,8 @@ class Testbed: @abc.abstractmethod def create_experiment(self, nodes, links): - return + raise Exception('create_experiment() not implemented') + # Represents an emulab testbed info # @@ -62,6 +63,7 @@ class EmulabTestbed: es.wait_until_nodes_up(self) es.complete_experiment_graph(self, nodes, links) + class jFedTestbed: def __init__(self, exp_name, username, cert_file, jfed_jar, exp_hours = "2", proj_name = "ARCFIRE", authority = "wall2.ilabt.iminds.be"): @@ -76,6 +78,17 @@ class jFedTestbed: def create_experiment(self, nodes, links): js.create_experiment(self, nodes, links) + +# Fake testbed, useful for testing +class FakeTestbed: + def __init__(self, exp_name, username, proj_name = "ARCFIRE", + password = ""): + Testbed.__init__(self, exp_name, username, password, proj_name) + + def create_experiment(self, nodes, links): + print("[Fake testbed] experiment swapped in") + + # Represents an interface on a node # # @name [string] interface name -- cgit v1.2.3