diff options
-rw-r--r-- | rumba/prototypes/rlite.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/rumba/prototypes/rlite.py b/rumba/prototypes/rlite.py index e1e3729..25ae943 100644 --- a/rumba/prototypes/rlite.py +++ b/rumba/prototypes/rlite.py @@ -1,7 +1,7 @@ # # Commands to setup and instruct rlite # -# Vincenzo Maffione <v.maffione@nextworks.it> +# Author: Vincenzo Maffione <v.maffione@nextworks.it> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,11 +22,16 @@ import rumba.ssh_support as ssh import rumba.model as mod import time -# An experiment over the RLITE implementation +# An experiment over the rlite implementation class Experiment(mod.Experiment): + def __init__(self, testbed, nodes=None): mod.Experiment.__init__(self, testbed, nodes) + def execute_commands(self, node, cmds): + ssh.execute_commands(self.testbed, node.ssh_config, + cmds, time_out=None) + def init(self): cmds = [] @@ -50,8 +55,7 @@ class Experiment(mod.Experiment): cmds.append("rlite-uipcps -v DBG -k 0 &> uipcp.log &") for node in self.nodes: - ssh.execute_commands(self.testbed, node.ssh_config, - cmds, time_out=None) + self.execute_commands(node, cmds) def create_ipcps(self): for node in self.nodes: @@ -79,8 +83,7 @@ class Experiment(mod.Experiment): cmds.append("rlite-ctl ipcp-config %s netdev %s" \ % (ipcp.name, ipcp.ifname)) - ssh.execute_commands(self.testbed, node.ssh_config, cmds, - time_out = None) + self.execute_commands(node, cmds) def register_ipcps(self): for node in self.nodes: @@ -91,8 +94,7 @@ class Experiment(mod.Experiment): cmds.append("rlite-ctl ipcp-register %s %s" \ % (ipcp.name, lower.name)) - ssh.execute_commands(self.testbed, node.ssh_config, cmds, - time_out = None) + self.execute_commands(node, cmds) def run_prototype(self): print("rlite: setting up") |