Ticket #58: remove the emulation flag, instead, pick correctly configured nodes only
[nepi.git] / src / nepi / testbeds / planetlab / node.py
index 2afdd47..99ba2aa 100644 (file)
@@ -54,7 +54,6 @@ class Node(object):
         self.operatingSystem = None
         self.pl_distro = None
         self.site = None
-        self.emulation = None
         self.minReliability = None
         self.maxReliability = None
         self.minBandwidth = None
@@ -459,7 +458,7 @@ class Node(object):
             for dev in devs:
                 if dev.routes_here(route):
                     # Schedule rule
-                    dest, prefix, nexthop = route
+                    dest, prefix, nexthop, metric = route
                     rules.append(
                         "add %s%s gw %s %s" % (
                             dest,
@@ -475,6 +474,8 @@ class Node(object):
                 raise RuntimeError, "Route %s cannot be bound to any virtual interface " \
                     "- PL can only handle rules over virtual interfaces. Candidates are: %s" % (route,devs)
         
+        print >>sys.stderr, "Setting up routes for", self.hostname
+        
         (out,err),proc = server.popen_ssh_command(
             "( sudo -S bash -c 'cat /vsys/vroute.out >&2' & ) ; sudo -S bash -c 'cat > /vsys/vroute.in' ; sleep 0.1" % dict(
                 home = server.shell_escape(self.home_path)),