git://git.onelab.eu
/
nepi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9f095b0
)
Updated example scripts (Fedora repo update + ovsswitch)
author
Alina Quereilhac
<alina.quereilhac@inria.fr>
Tue, 20 Jan 2015 12:55:40 +0000
(13:55 +0100)
committer
Alina Quereilhac
<alina.quereilhac@inria.fr>
Tue, 20 Jan 2015 12:55:40 +0000
(13:55 +0100)
examples/openvswitch/ovs_ping.py
patch
|
blob
|
history
examples/openvswitch/ovs_ping_2_switches.py
patch
|
blob
|
history
examples/planetlab/update_fedora_repo.py
patch
|
blob
|
history
src/nepi/resources/linux/tunnel.py
patch
|
blob
|
history
src/nepi/resources/planetlab/openvswitch/ovsport.py
patch
|
blob
|
history
diff --git
a/examples/openvswitch/ovs_ping.py
b/examples/openvswitch/ovs_ping.py
index
ab3ea2e
..
e33e8db
100644
(file)
--- 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, "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
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
fe9962e
..
6519dd2
100644
(file)
--- 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"
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)
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
7b5d88c
..
63b6f1d
100644
(file)
--- 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)
# 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)
# 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, "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)
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, "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)
ec.register_connection(node, app)
apps.append(app)
@@
-126,7
+129,10
@@
ec.deploy()
ec.wait_finished(apps)
for app in apps:
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()
ec.shutdown()
diff --git
a/src/nepi/resources/linux/tunnel.py
b/src/nepi/resources/linux/tunnel.py
index
b2a6f0f
..
7a78dc4
100644
(file)
--- 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):
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
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
f80db45
..
f4f7c7a
100644
(file)
--- 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"))
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)
self.ec.register_connection(self._vroute, remote_endpoint.guid)
self.ec.deploy(guids=[self._vroute], group = self.deployment_group)