Change the name of ip4 and prefix4 into endpoint_ip and endpoint_prefix
authorJulien Tribino <julien.tribino@inria.fr>
Tue, 2 Sep 2014 13:23:23 +0000 (15:23 +0200)
committerJulien Tribino <julien.tribino@inria.fr>
Tue, 2 Sep 2014 13:23:23 +0000 (15:23 +0200)
16 files changed:
examples/openvswitch/ovs_ping_2switches.py
examples/openvswitch/ovs_ping_3switches_line.py
examples/openvswitch/ovs_ping_3switches_loop.py
examples/openvswitch/ping_over_udpTapTunnel_performance_test_triangleTopo.py
src/nepi/resources/linux/tap.py
src/nepi/resources/planetlab/openvswitch/tunnel.py
src/nepi/resources/planetlab/tap.py
src/nepi/resources/planetlab/vroute.py
test/resources/linux/gretunnel.py
test/resources/linux/tap.py
test/resources/linux/tun.py
test/resources/linux/udptunnel.py
test/resources/planetlab/gretunnel.py
test/resources/planetlab/tap.py
test/resources/planetlab/tun.py
test/resources/planetlab/udptunnel.py

index d1e4135..5b7a208 100644 (file)
@@ -61,10 +61,10 @@ def add_port(ec, port_name, ovs):
     ec.register_connection(port, ovs)
     return port
 
-def add_tap(ec, ip4, prefix4, pointopoint, node):
+def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node):
     tap = ec.register_resource("PlanetlabTap")
-    ec.set(tap, "ip4", ip4)
-    ec.set(tap, "prefix4", prefix4)
+    ec.set(tap, "endpoint_ip", endpoint_ip)
+    ec.set(tap, "endpoint_prefix", endpoint_prefix)
     ec.set(tap, "pointopoint", pointopoint)
     ec.set(tap, "up", True)
     ec.register_connection(tap, node)
index 6adc924..0dd1783 100644 (file)
@@ -59,10 +59,10 @@ def add_port(ec, port_name, ovs):
     ec.register_connection(port, ovs)
     return port
 
-def add_tap(ec, ip4, prefix4, pointopoint, node):
+def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node):
     tap = ec.register_resource("PlanetlabTap")
-    ec.set(tap, "ip4", ip4)
-    ec.set(tap, "prefix4", prefix4)
+    ec.set(tap, "endpoint_ip", endpoint_ip)
+    ec.set(tap, "endpoint_prefix", endpoint_prefix)
     ec.set(tap, "pointopoint", pointopoint)
     ec.set(tap, "up", True)
     ec.register_connection(tap, node)
index 2b04dd9..9544ba0 100644 (file)
@@ -69,10 +69,10 @@ def add_port(ec, port_name, ovs):
     ec.register_connection(port, ovs)
     return port
 
-def add_tap(ec, ip4, prefix4, pointopoint, node):
+def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node):
     tap = ec.register_resource("PlanetlabTap")
-    ec.set(tap, "ip4", ip4)
-    ec.set(tap, "prefix4", prefix4)
+    ec.set(tap, "endpoint_ip", endpoint_ip)
+    ec.set(tap, "endpoint_prefix", endpoint_prefix)
     ec.set(tap, "pointopoint", pointopoint)
     ec.set(tap, "up", True)
     ec.register_connection(tap, node)
index e85da45..f5941f1 100644 (file)
@@ -50,10 +50,10 @@ def add_node(ec, host, user):
     ec.set(node, "cleanProcesses", True)
     return node
 
-def add_tap(ec, ip4, prefix4, pointopoint, node):
+def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node):
     tap = ec.register_resource("PlanetlabTap")
-    ec.set(tap, "ip4", ip4)
-    ec.set(tap, "prefix4", prefix4)
+    ec.set(tap, "endpoint_ip", endpoint_ip)
+    ec.set(tap, "endpoint_prefix", endpoint_prefix)
     ec.set(tap, "pointopoint", pointopoint)
     ec.set(tap, "up", True)
     ec.register_connection(tap, node)
index 6b3dce6..91640df 100644 (file)
@@ -37,13 +37,13 @@ class LinuxTap(LinuxApplication):
 
     @classmethod
     def _register_attributes(cls):
-        ip4 = Attribute("ip4", "IPv4 Address",
+        endpoint_ip = Attribute("endpoint_ip", "IPv4 Address",
               flags = Flags.Design)
 
         mac = Attribute("mac", "MAC Address",
                 flags = Flags.Design)
 
-        prefix4 = Attribute("prefix4", "IPv4 network prefix",
+        endpoint_prefix = Attribute("endpoint_prefix", "IPv4 network prefix",
                 type = Types.Integer,
                 flags = Flags.Design)
 
@@ -83,9 +83,9 @@ class LinuxTap(LinuxApplication):
                 "Bash script to be executed before releasing the resource",
                 flags = Flags.Design)
 
-        cls._register_attribute(ip4)
+        cls._register_attribute(endpoint_ip)
         cls._register_attribute(mac)
-        cls._register_attribute(prefix4)
+        cls._register_attribute(endpoint_prefix)
         cls._register_attribute(mtu)
         cls._register_attribute(devname)
         cls._register_attribute(up)
@@ -326,7 +326,7 @@ class LinuxTap(LinuxApplication):
             cipher, cipher_key, bwlimit, txqueuelen):
 
         # Set the remote endpoint
-        self.set("pointopoint", remote_endpoint.get("ip4"))
+        self.set("pointopoint", remote_endpoint.get("endpoint_ip"))
         
         # Planetlab TAPs always use PI headers
         from nepi.resources.planetlab.tap import PlanetlabTap
@@ -382,7 +382,7 @@ class LinuxTap(LinuxApplication):
 
     def _gre_connect_command(self, remote_endpoint, connection_run_home): 
         # Set the remote endpoint
-        self.set("pointopoint", remote_endpoint.get("ip4"))
+        self.set("pointopoint", remote_endpoint.get("endpoint_ip"))
         self.set("greRemote", remote_endpoint.node.get("ip"))
 
         # Generate GRE connect command
@@ -411,8 +411,8 @@ class LinuxTap(LinuxApplication):
                 "pi" if self.get("pi") else ""))
             start_command.append("sudo -S ip link set %s up" % self.get("deviceName"))
             start_command.append("sudo -S ip addr add %s/%d dev %s" % (
-                self.get("ip4"),
-                self.get("prefix4"),
+                self.get("endpoint_ip"),
+                self.get("endpoint_prefix"),
                 self.get("deviceName"),
                 ))
 
@@ -445,10 +445,10 @@ class LinuxTap(LinuxApplication):
                 self.get("greKey")
             ))
         command.append("sudo -S ip addr add %s/%d peer %s/%d dev %s" % (
-                self.get("ip4"),
-                self.get("prefix4"),
+                self.get("endpoint_ip"),
+                self.get("endpoint_prefix"),
                 self.get("pointopoint"),
-                self.get("prefix4"),
+                self.get("endpoint_prefix"),
                 self.get("deviceName"),
                 ))
         command.append("sudo -S ip link set %s up " % self.get("deviceName"))
index 6257565..682d796 100644 (file)
@@ -159,7 +159,7 @@ class OVSTunnel(LinuxApplication):
             if hasattr(rm, "create_port"):
                 connected[position] = rm
                 position += 1
-            elif hasattr(rm, "udp_connect_command"):
+            elif hasattr(rm, "udp_connect"):
                 connected[1] = rm
         return connected
 
@@ -247,29 +247,34 @@ class OVSTunnel(LinuxApplication):
             remote_ip = socket.gethostbyname(rm_node.get("hostname"))
 
         # Collect info from endpoint
-            local_port_file = os.path.join(self.run_home(local_node), "local_port")
-            rem_port_file = os.path.join(self.run_home(local_node), "remote_port")
-            ret_file = os.path.join(self.run_home(local_node), "ret_file")
+            connection_run_home = self.run_home(local_node)
+            connection_app_home = self.app_home(local_node)
             cipher = self.get("cipher")
             cipher_key = self.get("cipherKey")
             bwlimit = self.get("bwLimit")
             txqueuelen = self.get("txQueueLen")
 
-            rem_port = str(self.get_port_info(rm_endpoint,local_endpoint))
-   
+           
         # Upload the remote port in a file
+            rem_port = str(self.get_port_info(rm_endpoint,local_endpoint))
+            rem_port_file = os.path.join(self.run_home(local_node), "remote_port")
             local_node.upload(rem_port, rem_port_file,
                  text = True,
                  overwrite = False)
        
-            connect_command = local_endpoint.udp_connect_command(
-                 remote_ip, local_port_file, rem_port_file,
-                 ret_file, cipher, cipher_key, bwlimit, txqueuelen) 
+            self._pid, self._ppid = local_endpoint.udp_connect(
+                 rm_node, connection_run_home, connection_app_home,
+                 cipher, cipher_key, bwlimit, txqueuelen) 
+
+
+#            connect_command = local_endpoint.udp_connect_command(
+#                 remote_ip, local_port_file, rem_port_file,
+#                 ret_file, cipher, cipher_key, bwlimit, txqueuelen) 
 
-            self.connection_command(connect_command, local_node, rm_node)
+#            self.connection_command(connect_command, local_node, rm_node)
 
-        # Wait for pid file to be generated
-            self._pid, self._ppid = local_node.wait_pid(self.run_home(local_node))
+#        # Wait for pid file to be generated
+#            self._pid, self._ppid = local_node.wait_pid(self.run_home(local_node))
 
             if not self._pid or not self._ppid:
                 (out, err), proc = local_node.check_errors(self.run_home(local_node))
index 49ec41f..5a47663 100644 (file)
@@ -37,13 +37,15 @@ class PlanetlabTap(LinuxApplication):
 
     @classmethod
     def _register_attributes(cls):
-        ip4 = Attribute("ip4", "IPv4 Address",
+        endpoint_ip = Attribute("endpoint_ip", "IP of the endpoint. This is the attribute " 
+                                "you should use to establish a tunnel or a remote "
+                                "connection between endpoint",
               flags = Flags.Design)
 
         mac = Attribute("mac", "MAC Address",
                 flags = Flags.Design)
 
-        prefix4 = Attribute("prefix4", "IPv4 network prefix",
+        endpoint_prefix = Attribute("endpoint_prefix", "IPv4 network prefix of the endpoint",
                 type = Types.Integer,
                 flags = Flags.Design)
 
@@ -83,9 +85,9 @@ class PlanetlabTap(LinuxApplication):
                 "Bash script to be executed before releasing the resource",
                 flags = Flags.Design)
 
-        cls._register_attribute(ip4)
+        cls._register_attribute(endpoint_ip)
         cls._register_attribute(mac)
-        cls._register_attribute(prefix4)
+        cls._register_attribute(endpoint_prefix)
         cls._register_attribute(mtu)
         cls._register_attribute(devname)
         cls._register_attribute(up)
@@ -383,7 +385,7 @@ class PlanetlabTap(LinuxApplication):
             cipher, cipher_key, bwlimit, txqueuelen):
 
         # Set the remote endpoint
-        self.set("pointopoint", remote_endpoint.get("ip4"))
+        self.set("pointopoint", remote_endpoint.get("endpoint_ip"))
 
         remote_ip = remote_endpoint.node.get("ip")
 
@@ -432,7 +434,7 @@ class PlanetlabTap(LinuxApplication):
 
     def _gre_connect_command(self, remote_endpoint, connection_run_home): 
         # Set the remote endpoint
-        self.set("pointopoint", remote_endpoint.get("ip4"))
+        self.set("pointopoint", remote_endpoint.get("endpoint_ip"))
         self.set("greRemote", remote_endpoint.node.get("ip"))
 
         # Generate GRE connect command
@@ -462,8 +464,8 @@ class PlanetlabTap(LinuxApplication):
             command = ["sudo -S python ${SRC}/pl-vif-create.py"]
             
             command.append("-t %s" % self.vif_type)
-            command.append("-a %s" % self.get("ip4"))
-            command.append("-n %d" % self.get("prefix4"))
+            command.append("-a %s" % self.get("endpoint_ip"))
+            command.append("-n %d" % self.get("endpoint_prefix"))
             command.append("-f %s " % self.vif_name_file)
             command.append("-S %s " % self.sock_name)
 
@@ -505,8 +507,8 @@ class PlanetlabTap(LinuxApplication):
         command.append("-u %s" % self.node.get("username"))
         command.append("-N %s" % device_name)
         command.append("-t %s" % self.vif_type)
-        command.append("-a %s" % self.get("ip4"))
-        command.append("-n %d" % self.get("prefix4"))
+        command.append("-a %s" % self.get("endpoint_ip"))
+        command.append("-n %d" % self.get("endpoint_prefix"))
 
         if self.get("snat") == True:
             command.append("-s")
index 7007561..ad0b83e 100644 (file)
@@ -148,7 +148,7 @@ class PlanetlabVroute(LinuxApplication):
         command = ["sudo -S python ${SRC}/pl-vroute.py"]
         command.append("-a %s" % self.get("action"))
         command.append("-n %s" % self.get("network"))
-        command.append("-p %d" % self.tap.get("prefix4"))
+        command.append("-p %d" % self.tap.get("endpoint_prefix"))
         command.append("-g %s" % self.tap.get("pointopoint"))
         command.append("-f %s" % self.tap.get("deviceName"))
         return " ".join(command)
@@ -158,7 +158,7 @@ class PlanetlabVroute(LinuxApplication):
         command = ["sudo -S python ${SRC}/pl-vroute.py"]
         command.append("-a %s" % "del")
         command.append("-n %s" % self.get("network"))
-        command.append("-p %d" % self.tap.get("prefix4"))
+        command.append("-p %d" % self.tap.get("endpoint_prefix"))
         command.append("-g %s" % self.tap.get("pointopoint"))
         command.append("-f %s" % self.tap.get("deviceName"))
         return " ".join(command)
index a267845..6317ae0 100755 (executable)
@@ -51,8 +51,8 @@ class LinuxGRETunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tap1 = ec.register_resource("LinuxTap")
-        ec.set(tap1, "ip4", "%s.1" % self.netblock)
-        ec.set(tap1, "prefix4", 32)
+        ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap1, "endpoint_prefix", 32)
         ec.register_connection(tap1, node1)
 
         node2 = ec.register_resource("LinuxNode")
@@ -63,8 +63,8 @@ class LinuxGRETunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tap2 = ec.register_resource("LinuxTap")
-        ec.set(tap2, "ip4", "%s.2" % self.netblock)
-        ec.set(tap2, "prefix4", 32)
+        ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tap2, "endpoint_prefix", 32)
         ec.register_connection(tap2, node2)
 
         gretun = ec.register_resource("LinuxGRETunnel")
@@ -106,8 +106,8 @@ class LinuxGRETunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tun1 = ec.register_resource("LinuxTun")
-        ec.set(tun1, "ip4", "%s.1" % self.netblock)
-        ec.set(tun1, "prefix4", 32)
+        ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun1, "endpoint_prefix", 32)
         ec.register_connection(tun1, node1)
 
         node2 = ec.register_resource("LinuxNode")
@@ -118,8 +118,8 @@ class LinuxGRETunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tun2 = ec.register_resource("LinuxTun")
-        ec.set(tun2, "ip4", "%s.2" % self.netblock)
-        ec.set(tun2, "prefix4", 32)
+        ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tun2, "endpoint_prefix", 32)
         ec.register_connection(tun2, node2)
 
         udptun = ec.register_resource("LinuxGRETunnel")
index faa950e..8536a32 100755 (executable)
@@ -46,8 +46,8 @@ class LinuxTapTestCase(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
 
         tap = ec.register_resource("LinuxTap")
-        ec.set(tap, "ip4", "%s.1" % self.netblock)
-        ec.set(tap, "prefix4", 24)
+        ec.set(tap, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap, "endpoint_prefix", 24)
         ec.register_connection(tap, node)
 
         app = ec.register_resource("LinuxApplication")
index 5a02be7..1f50158 100755 (executable)
@@ -46,8 +46,8 @@ class LinuxTunTestCase(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
 
         tun = ec.register_resource("LinuxTun")
-        ec.set(tun, "ip4", "%s.1" % self.netblock)
-        ec.set(tun, "prefix4", 24)
+        ec.set(tun, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun, "endpoint_prefix", 24)
         ec.register_connection(tun, node)
 
         app = ec.register_resource("LinuxApplication")
index 22f4f3d..fa93c3c 100755 (executable)
@@ -49,8 +49,8 @@ class LinuxUdpTunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tap1 = ec.register_resource("LinuxTap")
-        ec.set(tap1, "ip4", "%s.1" % self.netblock)
-        ec.set(tap1, "prefix4", 32)
+        ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap1, "endpoint_prefix", 32)
         ec.register_connection(tap1, node1)
 
         node2 = ec.register_resource("LinuxNode")
@@ -61,8 +61,8 @@ class LinuxUdpTunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tap2 = ec.register_resource("LinuxTap")
-        ec.set(tap2, "ip4", "%s.2" % self.netblock)
-        ec.set(tap2, "prefix4", 32)
+        ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tap2, "endpoint_prefix", 32)
         ec.register_connection(tap2, node2)
 
         udptun = ec.register_resource("LinuxUdpTunnel")
@@ -103,8 +103,8 @@ class LinuxUdpTunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tun1 = ec.register_resource("LinuxTun")
-        ec.set(tun1, "ip4", "%s.1" % self.netblock)
-        ec.set(tun1, "prefix4", 32)
+        ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun1, "endpoint_prefix", 32)
         ec.register_connection(tun1, node1)
 
         node2 = ec.register_resource("LinuxNode")
@@ -115,8 +115,8 @@ class LinuxUdpTunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tun2 = ec.register_resource("LinuxTun")
-        ec.set(tun2, "ip4", "%s.2" % self.netblock)
-        ec.set(tun2, "prefix4", 32)
+        ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tun2, "endpoint_prefix", 32)
         ec.register_connection(tun2, node2)
 
         udptun = ec.register_resource("LinuxUdpTunnel")
index d0396a5..98ad803 100755 (executable)
@@ -54,8 +54,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tap1 = ec.register_resource("PlanetlabTap")
-        ec.set(tap1, "ip4", "%s.1" % self.netblock)
-        ec.set(tap1, "prefix4", 24)
+        ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap1, "endpoint_prefix", 24)
         ec.register_connection(tap1, node1)
 
         node2 = ec.register_resource("PlanetlabNode")
@@ -67,8 +67,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tap2 = ec.register_resource("PlanetlabTap")
-        ec.set(tap2, "ip4", "%s.2" % self.netblock)
-        ec.set(tap2, "prefix4", 24)
+        ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tap2, "endpoint_prefix", 24)
         ec.register_connection(tap2, node2)
 
         gretun = ec.register_resource("LinuxGRETunnel")
@@ -111,8 +111,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tun1 = ec.register_resource("PlanetlabTun")
-        ec.set(tun1, "ip4", "%s.1" % self.netblock)
-        ec.set(tun1, "prefix4", 24)
+        ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun1, "endpoint_prefix", 24)
         ec.register_connection(tun1, node1)
 
         node2 = ec.register_resource("PlanetlabNode")
@@ -124,8 +124,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tun2 = ec.register_resource("PlanetlabTun")
-        ec.set(tun2, "ip4", "%s.2" % self.netblock)
-        ec.set(tun2, "prefix4", 24)
+        ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tun2, "endpoint_prefix", 24)
         ec.register_connection(tun2, node2)
 
         udptun = ec.register_resource("LinuxGRETunnel")
@@ -168,8 +168,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tun1 = ec.register_resource("PlanetlabTun")
-        ec.set(tun1, "ip4", "%s.1" % self.netblock)
-        ec.set(tun1, "prefix4", 24)
+        ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun1, "endpoint_prefix", 24)
         ec.register_connection(tun1, node1)
 
         node2 = ec.register_resource("LinuxNode")
@@ -181,8 +181,8 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tun2 = ec.register_resource("LinuxTun")
-        ec.set(tun2, "ip4", "%s.2" % self.netblock)
-        ec.set(tun2, "prefix4", 24)
+        ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tun2, "endpoint_prefix", 24)
         ec.register_connection(tun2, node2)
 
         gretun = ec.register_resource("LinuxGRETunnel")
index 2d90707..3c46513 100755 (executable)
@@ -50,8 +50,8 @@ class PlanetlabTapTestCase(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
 
         tap = ec.register_resource("PlanetlabTap")
-        ec.set(tap, "ip4", "%s.1" % self.netblock)
-        ec.set(tap, "prefix4", 24)
+        ec.set(tap, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap, "endpoint_prefix", 24)
         ec.register_connection(tap, node)
 
         app = ec.register_resource("LinuxApplication")
index 8dea839..aa0def2 100755 (executable)
@@ -50,8 +50,8 @@ class PlanetlabTunTestCase(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
 
         tun = ec.register_resource("PlanetlabTun")
-        ec.set(tun, "ip4", "%s.1" % self.netblock)
-        ec.set(tun, "prefix4", 24)
+        ec.set(tun, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun, "endpoint_prefix", 24)
         ec.register_connection(tun, node)
 
         app = ec.register_resource("LinuxApplication")
index da07718..1254d19 100755 (executable)
@@ -53,8 +53,8 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tap1 = ec.register_resource("PlanetlabTap")
-        ec.set(tap1, "ip4", "%s.1" % self.netblock)
-        ec.set(tap1, "prefix4", 24)
+        ec.set(tap1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tap1, "endpoint_prefix", 24)
         ec.register_connection(tap1, node1)
 
         node2 = ec.register_resource("PlanetlabNode")
@@ -66,8 +66,8 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tap2 = ec.register_resource("PlanetlabTap")
-        ec.set(tap2, "ip4", "%s.2" % self.netblock)
-        ec.set(tap2, "prefix4", 24)
+        ec.set(tap2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tap2, "endpoint_prefix", 24)
         ec.register_connection(tap2, node2)
 
         udptun = ec.register_resource("LinuxUdpTunnel")
@@ -109,8 +109,8 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase):
         ec.set(node1, "cleanProcesses", True)
 
         tun1 = ec.register_resource("PlanetlabTun")
-        ec.set(tun1, "ip4", "%s.1" % self.netblock)
-        ec.set(tun1, "prefix4", 24)
+        ec.set(tun1, "endpoint_ip", "%s.1" % self.netblock)
+        ec.set(tun1, "endpoint_prefix", 24)
         ec.register_connection(tun1, node1)
 
         node2 = ec.register_resource("PlanetlabNode")
@@ -122,8 +122,8 @@ class PlanetlabUdpTunnelTestCase(unittest.TestCase):
         ec.set(node2, "cleanProcesses", True)
 
         tun2 = ec.register_resource("PlanetlabTun")
-        ec.set(tun2, "ip4", "%s.2" % self.netblock)
-        ec.set(tun2, "prefix4", 24)
+        ec.set(tun2, "endpoint_ip", "%s.2" % self.netblock)
+        ec.set(tun2, "endpoint_prefix", 24)
         ec.register_connection(tun2, node2)
 
         udptun = ec.register_resource("LinuxUdpTunnel")