Changed the endpoint_ip and endpoint_prefix attributes of TAP/TUN endpoints for ip...
[nepi.git] / examples / openvswitch / ovs_ping_3switches_loop.py
index 3052b78..72a6fad 100644 (file)
@@ -70,10 +70,10 @@ def add_port(ec, port_name, network, ovs):
     ec.register_connection(port, ovs)
     return port
 
-def add_tap(ec, endpoint_ip, endpoint_prefix, pointopoint, node):
+def add_tap(ec, ip, prefix, pointopoint, node):
     tap = ec.register_resource("planetlab::Tap")
-    ec.set(tap, "endpoint_ip", endpoint_ip)
-    ec.set(tap, "endpoint_prefix", endpoint_prefix)
+    ec.set(tap, "ip", ip)
+    ec.set(tap, "prefix", prefix)
     ec.set(tap, "pointopoint", pointopoint)
     ec.set(tap, "up", True)
     ec.register_connection(tap, node)
@@ -139,9 +139,9 @@ h2_node = add_node(ec, host2, slicename, pl_user, pl_password)
 h3_node = add_node(ec, host3, slicename, pl_user, pl_password)
 
 # Add tap devices
-tap1 = add_tap(ec, "192.168.3.1", 24, "192.168.3.2", h1_node)
-tap2 = add_tap(ec, "192.168.3.3", 24, "192.168.3.4", h2_node)
-tap3 = add_tap(ec, "192.168.3.5", 24, "192.168.3.6", h3_node)
+tap1 = add_tap(ec, "192.168.3.1", "24", "192.168.3.2", h1_node)
+tap2 = add_tap(ec, "192.168.3.3", "24", "192.168.3.4", h2_node)
+tap3 = add_tap(ec, "192.168.3.5", "24", "192.168.3.6", h3_node)
 
 # Connect the nodes
 tunnel1 = add_tunnel(ec, port1, tap1)