ec.set(node, "cleanProcesses", True)
return node
-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)
## Create The topology ##
host1 = add_node(ec, hostname_host1, user)
-tap1 = add_tap(ec, "192.168.3.1", 24, "192.168.3.2", host1)
+tap1 = add_tap(ec, "192.168.3.1", "24", "192.168.3.2", host1)
switch1 = add_node(ec, hostname_switch1, user)
-tap2 = add_tap(ec, "192.168.3.2", 24, "192.168.3.1", switch1)
-tap102 = add_tap(ec, "192.168.3.102", 29, "192.168.3.104", switch1)
-tap152 = add_tap(ec, "192.168.3.152", 29, "192.168.3.156", switch1)
+tap2 = add_tap(ec, "192.168.3.2", "24", "192.168.3.1", switch1)
+tap102 = add_tap(ec, "192.168.3.102", "29", "192.168.3.104", switch1)
+tap152 = add_tap(ec, "192.168.3.152", "29", "192.168.3.156", switch1)
host2 = add_node(ec, hostname_host2, user)
-tap13 = add_tap(ec, "192.168.3.13", 24, "192.168.3.14", host2)
+tap13 = add_tap(ec, "192.168.3.13", "24", "192.168.3.14", host2)
switch2 = add_node(ec, hostname_switch2, user)
-tap14 = add_tap(ec, "192.168.3.14", 24, "192.168.3.13", switch2)
-tap104 = add_tap(ec, "192.168.3.104", 29, "192.168.3.102", switch2)
-tap204 = add_tap(ec, "192.168.3.204", 29, "192.168.3.206", switch2)
+tap14 = add_tap(ec, "192.168.3.14", "24", "192.168.3.13", switch2)
+tap104 = add_tap(ec, "192.168.3.104", "29", "192.168.3.102", switch2)
+tap204 = add_tap(ec, "192.168.3.204", "29", "192.168.3.206", switch2)
host3 = add_node(ec, hostname_host3, user)
-tap25 = add_tap(ec, "192.168.3.25", 24, "192.168.3.26", host3)
+tap25 = add_tap(ec, "192.168.3.25", "24", "192.168.3.26", host3)
switch3 = add_node(ec, hostname_switch3, user)
-tap26 = add_tap(ec, "192.168.3.26", 24, "192.168.3.25", switch3)
-tap156 = add_tap(ec, "192.168.3.156", 29, "192.168.3.152", switch3)
-tap206 = add_tap(ec, "192.168.3.206", 29, "192.168.3.204", switch3)
+tap26 = add_tap(ec, "192.168.3.26", "24", "192.168.3.25", switch3)
+tap156 = add_tap(ec, "192.168.3.156", "29", "192.168.3.152", switch3)
+tap206 = add_tap(ec, "192.168.3.206", "29", "192.168.3.204", switch3)
## Create the UDP Tunnel ##
udptun1 = add_udptun(ec, tap1, tap2)