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)
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
""" 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
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
""" 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
.. 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
|
(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"
(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")
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
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