Updated example scripts (Fedora repo update + ovsswitch)
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Tue, 20 Jan 2015 12:55:40 +0000 (13:55 +0100)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Tue, 20 Jan 2015 12:55:40 +0000 (13:55 +0100)
examples/openvswitch/ovs_ping.py
examples/openvswitch/ovs_ping_2_switches.py
examples/planetlab/update_fedora_repo.py
src/nepi/resources/linux/tunnel.py
src/nepi/resources/planetlab/openvswitch/ovsport.py

index ab3ea2e..e33e8db 100644 (file)
@@ -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
index fe9962e..6519dd2 100644 (file)
@@ -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)
index 7b5d88c..63b6f1d 100644 (file)
@@ -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()
 
index b2a6f0f..7a78dc4 100644 (file)
@@ -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
index f80db45..f4f7c7a 100644 (file)
@@ -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)