From: Alina Quereilhac Date: Tue, 20 Jan 2015 12:55:40 +0000 (+0100) Subject: Updated example scripts (Fedora repo update + ovsswitch) X-Git-Tag: nepi-3.2.0~16 X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=commitdiff_plain;h=4e04f60c0ce34381630bb0604a9d47d326374e0b Updated example scripts (Fedora repo update + ovsswitch) --- diff --git a/examples/openvswitch/ovs_ping.py b/examples/openvswitch/ovs_ping.py index ab3ea2e0..e33e8dbf 100644 --- a/examples/openvswitch/ovs_ping.py +++ b/examples/openvswitch/ovs_ping.py @@ -130,7 +130,6 @@ tap = ec.register_resource("planetlab::Tap") ec.set(tap, "ip", ip2) ec.set(tap, "prefix", prefix) ec.set(tap, "pointopoint", ip1) -ec.set(tap, "up", True) ec.register_connection(tap, node2) # Add ports on OVS diff --git a/examples/openvswitch/ovs_ping_2_switches.py b/examples/openvswitch/ovs_ping_2_switches.py index fe9962e4..6519dd24 100644 --- a/examples/openvswitch/ovs_ping_2_switches.py +++ b/examples/openvswitch/ovs_ping_2_switches.py @@ -106,7 +106,7 @@ def parse_args(): switch1 = "planetlab2.virtues.fi" switch2 = "planetlab2.upc.es" - host1 = "planetlab2.ionio.gr" + host1 = "planetlab2.s3.kth.se" host2 = "iraplab2.iralab.uni-karlsruhe.de" parser = OptionParser(usage = usage) diff --git a/examples/planetlab/update_fedora_repo.py b/examples/planetlab/update_fedora_repo.py index 7b5d88c6..63b6f1d6 100644 --- a/examples/planetlab/update_fedora_repo.py +++ b/examples/planetlab/update_fedora_repo.py @@ -86,6 +86,7 @@ for hostname in hosts: # site. Replace with your own user and password account information. ec.set(node, "pluser", pl_user) ec.set(node, "plpassword", pl_password) + ec.set(node, "critical", False) # Remove previous results ec.set(node, "cleanExperiment", True) ec.set(node, "cleanProcesses", True) @@ -101,6 +102,7 @@ for hostname in hosts: ec.set(app, "command", "cp /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.old; " "cp ${SHARE}/fedora.repo /etc/yum.repos.d/fedora.repo") + ec.set(app, "critical", False) ec.register_connection(node, app) apps.append(app) @@ -116,6 +118,7 @@ for hostname in hosts: ec.set(app, "command", "cp /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.old; " "cp ${SHARE}/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo") + ec.set(app, "critical", False) ec.register_connection(node, app) apps.append(app) @@ -126,7 +129,10 @@ ec.deploy() ec.wait_finished(apps) for app in apps: - print ec.trace(app, "stderr") + try: + print ec.trace(app, "stderr") + except: + print "NO stderr" ec.shutdown() diff --git a/src/nepi/resources/linux/tunnel.py b/src/nepi/resources/linux/tunnel.py index b2a6f0f8..7a78dc4d 100644 --- a/src/nepi/resources/linux/tunnel.py +++ b/src/nepi/resources/linux/tunnel.py @@ -65,7 +65,7 @@ class LinuxTunnel(LinuxApplication): return os.path.join(self.app_home(endpoint), self.ec.run_id) def endpoint_mkdir(self, endpoint): - self.endpoint.node.mkdir(self.run_home(self.endpoint)) + endpoint.node.mkdir(self.run_home(endpoint)) def initiate_connection(self, endpoint, remote_endpoint): raise NotImplementedError diff --git a/src/nepi/resources/planetlab/openvswitch/ovsport.py b/src/nepi/resources/planetlab/openvswitch/ovsport.py index f80db457..f4f7c7a9 100644 --- a/src/nepi/resources/planetlab/openvswitch/ovsport.py +++ b/src/nepi/resources/planetlab/openvswitch/ovsport.py @@ -190,8 +190,6 @@ class OVSPort(LinuxApplication): self.ec.set(self._vroute, "nexthop", remote_endpoint.get("pointopoint")) self.ec.set(self._vroute, "network", self.get("network")) - print "Vroute Guid :" + str(self._vroute) - self.ec.register_connection(self._vroute, remote_endpoint.guid) self.ec.deploy(guids=[self._vroute], group = self.deployment_group)