X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Fplanetlab%2Fudptunnel.py;h=1254d19aed49c21f2a26053bb628a8cfcb1d1f49;hb=38575a0f27f26511965771dde8320060b10252dd;hp=9dd7d5b4743ea37406a473ea0cb83ab5e3e4ed11;hpb=88c5b86c62dbaef9e3b2a73bf08b6c21075e12a3;p=nepi.git diff --git a/test/resources/planetlab/udptunnel.py b/test/resources/planetlab/udptunnel.py index 9dd7d5b4..1254d19a 100755 --- a/test/resources/planetlab/udptunnel.py +++ b/test/resources/planetlab/udptunnel.py @@ -26,12 +26,13 @@ import os import time import unittest -class UdpTunnelTestCase(unittest.TestCase): +class PlanetlabUdpTunnelTestCase(unittest.TestCase): def setUp(self): #self.host1 = "nepi2.pl.sophia.inria.fr" #self.host2 = "nepi5.pl.sophia.inria.fr" + #self.host2 = "planetlab1.informatik.uni-goettingen.de" self.host1 = "planetlab1.informatik.uni-erlangen.de" - self.host2 = "planetlab1.informatik.uni-goettingen.de" + self.host2 = "planck227ple.test.ibbt.be" self.user = "inria_nepi" self.identity = "%s/.ssh/id_rsa_planetlab" % (os.environ['HOME']) #self.netblock = "192.168.1" @@ -47,29 +48,29 @@ class UdpTunnelTestCase(unittest.TestCase): ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + #ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) tap1 = ec.register_resource("PlanetlabTap") - ec.set(tap1, "ip4", "%s.1" % self.netblock) - ec.set(tap1, "pointopoint", "%s.2" % 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") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + #ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) tap2 = ec.register_resource("PlanetlabTap") - ec.set(tap2, "ip4", "%s.2" % self.netblock) - ec.set(tap2, "pointopoint", "%s.1" % 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("UdpTunnel") + udptun = ec.register_resource("LinuxUdpTunnel") ec.register_connection(tap1, udptun) ec.register_connection(tap2, udptun) @@ -86,46 +87,46 @@ class UdpTunnelTestCase(unittest.TestCase): expected = """3 packets transmitted, 3 received, 0% packet loss""" self.assertTrue(ping.find(expected) > -1) - if_name = ec.get(tap1, "deviceName") - self.assertTrue(if_name.startswith("tap")) + vif_name = ec.get(tap1, "deviceName") + self.assertTrue(vif_name.startswith("tap")) - if_name = ec.get(tap2, "deviceName") - self.assertTrue(if_name.startswith("tap")) + vif_name = ec.get(tap2, "deviceName") + self.assertTrue(vif_name.startswith("tap")) ec.shutdown() @skipIfAnyNotAliveWithIdentity def t_tun_udp_tunnel(self, user1, host1, identity1, user2, host2, identity2): - ec = ExperimentController(exp_id = "test-tap-udp-tunnel") + ec = ExperimentController(exp_id = "test-tun-udp-tunnel") node1 = ec.register_resource("PlanetlabNode") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) - ec.set(node1, "cleanHome", True) + #ec.set(node1, "cleanHome", True) + ec.set(node1, "cleanExperiment", True) ec.set(node1, "cleanProcesses", True) tun1 = ec.register_resource("PlanetlabTun") - ec.set(tun1, "ip4", "%s.1" % self.netblock) - ec.set(tun1, "pointopoint", "%s.2" % 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") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) - ec.set(node2, "cleanHome", True) + #ec.set(node2, "cleanHome", True) + ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) tun2 = ec.register_resource("PlanetlabTun") - ec.set(tun2, "ip4", "%s.2" % self.netblock) - ec.set(tun2, "pointopoint", "%s.1" % 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("UdpTunnel") + udptun = ec.register_resource("LinuxUdpTunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) @@ -142,11 +143,11 @@ class UdpTunnelTestCase(unittest.TestCase): expected = """3 packets transmitted, 3 received, 0% packet loss""" self.assertTrue(ping.find(expected) > -1) - if_name = ec.get(tun1, "deviceName") - self.assertTrue(if_name.startswith("tun")) + vif_name = ec.get(tun1, "deviceName") + self.assertTrue(vif_name.startswith("tun")) - if_name = ec.get(tun2, "deviceName") - self.assertTrue(if_name.startswith("tun")) + vif_name = ec.get(tun2, "deviceName") + self.assertTrue(vif_name.startswith("tun")) ec.shutdown()