From: Julien Tribino Date: Mon, 25 Nov 2013 17:26:08 +0000 (+0100) Subject: update OF code and examples X-Git-Tag: nepi-3.0.0~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=814c0648be6db5f3d3500645f9c6048814f0ba8b;p=nepi.git update OF code and examples --- diff --git a/examples/openvswitch/ovs_ping_exp.py b/examples/openvswitch/ovs_ping_exp.py index b73e8ae6..b07b3836 100644 --- a/examples/openvswitch/ovs_ping_exp.py +++ b/examples/openvswitch/ovs_ping_exp.py @@ -80,17 +80,17 @@ def add_app(ec, command, node): return app # Create the EC -ec = ExperimentController(exp_id = "one") +ec = ExperimentController(exp_id = "test") switch1 = "planetlab2.virtues.fi" switch2 = "planetlab2.upc.es" host1 = "planetlab2.ionio.gr" -host2 = "planetlab2.diku.dk" +host2 = "iraplab2.iralab.uni-karlsruhe.de" slicename = "inria_nepi" pl_user = os.environ.get("PL_USER") -pl_password = os.environ.get("PL_PASS") +pl_password = os.environ.get("PL_PASS") s1_node = add_node(ec, switch1, slicename, pl_user, pl_password) s2_node = add_node(ec, switch2, slicename, pl_user, pl_password) diff --git a/src/nepi/execution/ec.py b/src/nepi/execution/ec.py index 066e6b40..47110a43 100644 --- a/src/nepi/execution/ec.py +++ b/src/nepi/execution/ec.py @@ -250,7 +250,7 @@ class ExperimentController(object): have reached a state >= STOPPED (i.e. STOPPED, FAILED or RELEASED ), or until a failure in the experiment occurs (i.e. abort == True) - + :param guids: List of guids :type guids: list @@ -266,7 +266,7 @@ class ExperimentController(object): """ Blocking method that waits until all RMs in the 'guids' list have reached a state >= STARTED, or until a failure in the experiment occurs (i.e. abort == True) - + :param guids: List of guids :type guids: list @@ -281,7 +281,7 @@ class ExperimentController(object): def wait_released(self, guids): """ Blocking method that waits until all RMs in the 'guids' list have reached a state == RELEASED, or until the EC fails - + :param guids: List of guids :type guids: list @@ -297,7 +297,7 @@ class ExperimentController(object): """ Blocking method that waits until all RMs in the 'guids' list have reached a state >= READY, or until a failure in the experiment occurs (i.e. abort == True) - + :param guids: List of guids :type guids: list diff --git a/src/nepi/resources/linux/application.py b/src/nepi/resources/linux/application.py index a83393d7..5ae8f0b3 100644 --- a/src/nepi/resources/linux/application.py +++ b/src/nepi/resources/linux/application.py @@ -43,25 +43,25 @@ class LinuxApplication(ResourceManager): .. note:: - A LinuxApplication RM represents a process that can be executed in - a remote Linux host using SSH. + A LinuxApplication RM represents a process that can be executed in + a remote Linux host using SSH. - The LinuxApplication RM takes care of uploadin sources and any files - needed to run the experiment, to the remote host. - It also allows to provide source compilation (build) and installation - instructions, and takes care of automating the sources build and - installation tasks for the user. + The LinuxApplication RM takes care of uploadin sources and any files + needed to run the experiment, to the remote host. + It also allows to provide source compilation (build) and installation + instructions, and takes care of automating the sources build and + installation tasks for the user. - It is important to note that files uploaded to the remote host have - two possible scopes: single-experiment or multi-experiment. - Single experiment files are those that will not be re-used by other - experiments. Multi-experiment files are those that will. - Sources and shared files are always made available to all experiments. + It is important to note that files uploaded to the remote host have + two possible scopes: single-experiment or multi-experiment. + Single experiment files are those that will not be re-used by other + experiments. Multi-experiment files are those that will. + Sources and shared files are always made available to all experiments. - Directory structure: + Directory structure: - The directory structure used by LinuxApplication RM at the Linux - host is the following: + The directory structure used by LinuxApplication RM at the Linux + host is the following: ${HOME}/nepi-usr --> Base directory for multi-experiment files | diff --git a/src/nepi/resources/planetlab/openvswitch/ovs.py b/src/nepi/resources/planetlab/openvswitch/ovs.py index a201329e..b3ce59d8 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovs.py +++ b/src/nepi/resources/planetlab/openvswitch/ovs.py @@ -187,7 +187,7 @@ class OVSWitch(LinuxApplication): (out, err), proc = self.node.check_output(self.ovs_checks, 'start_srv_exitcode') if out != "0\n": - self.debug("Servers have not started") + self.error("Servers have not started") raise RuntimeError, msg cmd = "ps -A | grep ovsdb-server" @@ -204,7 +204,7 @@ class OVSWitch(LinuxApplication): (out, err), proc = self.node.check_output(self.ovs_checks, 'status_srv_exitcode') if out != "0\n": - self.debug("Servers are not running") + self.error("Servers are not running") raise RuntimeError, msg self.info("Servers started") @@ -293,7 +293,7 @@ class OVSWitch(LinuxApplication): from nepi.resources.planetlab.openvswitch.ovsport import OVSPort rm = self.get_connected(OVSPort.get_rtype()) - if rm[0].state < ResourceState.FINISHED: + if rm[0].state < ResourceState.STOPPED: self.ec.schedule(reschedule_delay, self.release) return diff --git a/src/nepi/resources/planetlab/openvswitch/ovsport.py b/src/nepi/resources/planetlab/openvswitch/ovsport.py index bb84af62..57b6f16c 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovsport.py +++ b/src/nepi/resources/planetlab/openvswitch/ovsport.py @@ -209,7 +209,7 @@ class OVSPort(LinuxApplication): from nepi.resources.planetlab.openvswitch.tunnel import OVSTunnel rm = self.get_connected(OVSTunnel.get_rtype()) - if rm and rm[0].state < ResourceState.FINISHED: + if rm and rm[0].state < ResourceState.STOPPED: self.ec.schedule(reschedule_delay, self.release) return