diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-02-13 15:00:07 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-02-13 15:00:07 +0100 |
commit | 59ddcc618e901d14c47a8c1f97bb8589f6a4d5e0 (patch) | |
tree | 2f03681bc8a655c2a05f2ed1a52accc1b788d1d4 | |
parent | 78217ab203ca247ae8dea1cd673c3174953ef4ae (diff) | |
download | rumba-59ddcc618e901d14c47a8c1f97bb8589f6a4d5e0.tar.gz rumba-59ddcc618e901d14c47a8c1f97bb8589f6a4d5e0.zip |
testbeds, prototypes: Omit dir name from class name
The directory name was always prepended to the class name, but since
they are in distinct namespaces this could be easily removed.
-rwxr-xr-x | examples/example.py | 11 | ||||
-rw-r--r-- | rumba/prototypes/irati.py | 9 | ||||
-rw-r--r-- | rumba/prototypes/ouroboros.py | 6 | ||||
-rw-r--r-- | rumba/prototypes/rlite.py | 9 | ||||
-rw-r--r-- | rumba/testbeds/emulab.py | 6 | ||||
-rw-r--r-- | rumba/testbeds/faketestbed.py | 6 | ||||
-rw-r--r-- | rumba/testbeds/jfed.py | 6 |
7 files changed, 27 insertions, 26 deletions
diff --git a/examples/example.py b/examples/example.py index 4430fb5..2222ee0 100755 --- a/examples/example.py +++ b/examples/example.py @@ -29,13 +29,12 @@ b = Node("b", difs = [e1, n1], dif_registrations = {n1 : [e1]}) -tb = jfed.jFedTestbed(exp_name = "letest", - username = "sander", - cert_file = "cert.pem", - jfed_jar = "jfed_cli/experimenter-cli.jar") -#tb = fake.FakeTestbed(exp_name = "x", username = "yy") +tb = jfed.Testbed(exp_name = "letest", + username = "sander", + cert_file = "cert.pem", + jfed_jar = "jfed_cli/experimenter-cli.jar") -exp = irati.IRATIExperiment(tb, nodes = [a, b]) +exp = irati.Experiment(tb, nodes = [a, b]) print(exp) diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index af98f2e..28f8ab3 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -19,12 +19,12 @@ # MA 02110-1301 USA import rumba.ssh_support as ssh -from rumba.model import Experiment +import rumba.model as mod # An experiment over the IRATI implementation -class IRATIExperiment(Experiment): +class Experiment(mod.Experiment): def __init__(self, testbed, nodes = list()): - Experiment.__init__(self, testbed, nodes) + mod.Experiment.__init__(self, testbed, nodes) def setup(self): cmds = list() @@ -38,7 +38,8 @@ class IRATIExperiment(Experiment): cmds.append("sudo nohup ipcm &> ipcm.log &") for node in self.nodes: - ssh.execute_commands(self.testbed, node.full_name, cmds, time_out = None) + ssh.execute_commands(self.testbed, node.full_name, + cmds, time_out = None) def run(self): print("[IRATI experiment] start") diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 0f60ee8..172d69a 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -19,12 +19,12 @@ # MA 02110-1301 USA import rumba.ssh_support as ssh -from rumba.model import Experiment +import rumba.model as mod # An experiment over the Ouroboros implementation -class OuroborosExperiment(Experiment): +class Experiment(mod.Experiment): def __init__(self, testbed, nodes = list()): - Experiment.__init__(self, testbed, nodes) + mod.Experiment.__init__(self, testbed, nodes) def setup_ouroboros(self): cmds = list() diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index 9148bfa..adb0036 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -19,12 +19,12 @@ # MA 02110-1301 USA import rumba.ssh_support as ssh -from rumba.model import Experiment +import rumba.model as mod # An experiment over the RLITE implementation -class RLITEExperiment(Experiment): +class Experiment(mod.Experiment): def __init__(self, testbed, nodes = list()): - Experiment.__init__(self, testbed, nodes) + mod.Experiment.__init__(self, testbed, nodes) def setup(self): cmds = list() @@ -39,7 +39,8 @@ class RLITEExperiment(Experiment): cmds.append("sudo nohup rlite-uipcps -v DBG -k 0 -U -A &> uipcp.log &") for node in self.nodes: - ssh.execute_commands(self.testbed, node.full_name, cmds, time_out = None) + ssh.execute_commands(self.testbed, node.full_name, + cmds, time_out = None) def run(self): print("[RLITE experiment] start") diff --git a/rumba/testbeds/emulab.py b/rumba/testbeds/emulab.py index b7c0c51..cbaa730 100644 --- a/rumba/testbeds/emulab.py +++ b/rumba/testbeds/emulab.py @@ -25,7 +25,7 @@ import re from ast import literal_eval import rumba.ssh_support as ssh -from rumba.model import Testbed +import rumba.model as mod import warnings warnings.filterwarnings("ignore") @@ -35,11 +35,11 @@ warnings.filterwarnings("ignore") # @url [string] URL of the testbed # @image [string] specific image to use # -class EmulabTestbed(Testbed): +class Testbed(mod.Testbed): def __init__(self, exp_name, username, password = "", proj_name = "ARCFIRE", url = "wall1.ilabt.iminds.be", image = "UBUNTU14-64-STD"): - Testbed.__init__(self, exp_name, username, password, proj_name) + mod.Testbed.__init__(self, exp_name, username, password, proj_name) self.url = url self.image = image diff --git a/rumba/testbeds/faketestbed.py b/rumba/testbeds/faketestbed.py index f163411..e47eb85 100644 --- a/rumba/testbeds/faketestbed.py +++ b/rumba/testbeds/faketestbed.py @@ -18,13 +18,13 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA -from rumba.model import Testbed +import rumba.model as mod # Fake testbed, useful for testing -class FakeTestbed(Testbed): +class Testbed(mod.Testbed): def __init__(self, exp_name, username, proj_name = "ARCFIRE", password = ""): - Testbed.__init__(self, exp_name, username, password, proj_name) + mod.Testbed.__init__(self, exp_name, username, password, proj_name) def create_experiment(self, nodes, links): print("[Fake testbed] experiment swapped in") diff --git a/rumba/testbeds/jfed.py b/rumba/testbeds/jfed.py index 5f4d496..92e615f 100644 --- a/rumba/testbeds/jfed.py +++ b/rumba/testbeds/jfed.py @@ -22,13 +22,13 @@ import subprocess import getpass import xml.dom.minidom as xml -from rumba.model import Testbed +import rumba.model as mod -class jFedTestbed(Testbed): +class Testbed(mod.Testbed): def __init__(self, exp_name, username, cert_file, jfed_jar, exp_hours = "2", proj_name = "ARCFIRE", authority = "wall2.ilabt.iminds.be"): passwd = getpass.getpass(prompt = "Password for certificate file: ") - Testbed.__init__(self, exp_name, username, passwd, proj_name) + mod.Testbed.__init__(self, exp_name, username, passwd, proj_name) self.authority = "urn:publicid:IDN+" + authority + "+authority+cm" self.auth_name = authority self.cert_file = cert_file |