diff options
author | Vincenzo Maffione <[email protected]> | 2017-02-06 18:14:12 +0100 |
---|---|---|
committer | Vincenzo Maffione <[email protected]> | 2017-02-06 18:14:12 +0100 |
commit | 38268b9218270ef57402e3c306d8b3bfdcd5103a (patch) | |
tree | ec124012fde1c4b64a5dfd3fa2f03bc93ef9ae2a | |
parent | cc5ad5953f29e3e9374827b0e63f12a67b3a7d7d (diff) | |
download | rumba-38268b9218270ef57402e3c306d8b3bfdcd5103a.tar.gz rumba-38268b9218270ef57402e3c306d8b3bfdcd5103a.zip |
rhumba: add FakeTestbed to ease development
-rwxr-xr-x | rhumba.py | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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 |