FdNetDevice working with PlanetLab TAPs
[nepi.git] / examples / planetlab / update_fedora_repo.py
index 8d4b604..7b5d88c 100644 (file)
@@ -77,7 +77,9 @@ for hostname in hosts:
     node = ec.register_resource("planetlab::Node")
     # The username in this case is the slice name, the one to use for login in 
     # via ssh into PlanetLab nodes. Replace with your own slice name.
-    ec.set(node, "hostname", hostname)
+    if hostname != "any":
+        ec.set(node, "hostname", hostname)
+
     ec.set(node, "username", pl_slice)
     ec.set(node, "identity", pl_ssh_key)
     # The pluser and plpassword are the ones used to login in the PlanetLab web 
@@ -94,11 +96,11 @@ for hostname in hosts:
             "fedora.repo")
 
     app = ec.register_resource("linux::Application")
-    ec.set(app, "sources", path_to_repo)
+    ec.set(app, "files", path_to_repo)
     ec.set(app, "sudo", True) 
     ec.set(app, "command", 
         "cp /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.old; "
-        "cp ${SRC}/fedora.repo /etc/yum.repos.d/fedora.repo")
+        "cp ${SHARE}/fedora.repo /etc/yum.repos.d/fedora.repo")
     ec.register_connection(node, app)
 
     apps.append(app)
@@ -109,11 +111,11 @@ for hostname in hosts:
             "fedora-updates.repo")
 
     app = ec.register_resource("linux::Application")
-    ec.set(app, "sources", path_to_repo)
+    ec.set(app, "files", path_to_repo)
     ec.set(app, "sudo", True) 
     ec.set(app, "command", 
         "cp /etc/yum.repos.d/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo.old; "
-        "cp ${SRC}/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo")
+        "cp ${SHARE}/fedora-updates.repo /etc/yum.repos.d/fedora-updates.repo")
     ec.register_connection(node, app)
     
     apps.append(app)