X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=test%2Fresources%2Fplanetlab%2Fgretunnel.py;h=460261f0125ab4c0fe87565582ba8194e6c394bf;hb=d50ba1a08e541ded7a8b322493ebb1d0cc59c6ff;hp=d0396a5512463923b4ab8b5249d05f996908566c;hpb=dceafc553de152296b99e8c2f4b3fef1321bd7ef;p=nepi.git diff --git a/test/resources/planetlab/gretunnel.py b/test/resources/planetlab/gretunnel.py index d0396a55..460261f0 100755 --- a/test/resources/planetlab/gretunnel.py +++ b/test/resources/planetlab/gretunnel.py @@ -45,7 +45,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -53,12 +53,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): 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, "prefix4", 24) + tap1 = ec.register_resource("planetlab::Tap") + 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") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -66,16 +66,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): 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, "prefix4", 24) + tap2 = ec.register_resource("planetlab::Tap") + 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") + gretun = ec.register_resource("linux::GRETunnel") ec.register_connection(tap1, gretun) ec.register_connection(tap2, gretun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -102,7 +102,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tun-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -110,12 +110,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): 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, "prefix4", 24) + tun1 = ec.register_resource("planetlab::Tun") + 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") + node2 = ec.register_resource("planetlab::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -123,16 +123,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): 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, "prefix4", 24) + tun2 = ec.register_resource("planetlab::Tun") + 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") + udptun = ec.register_resource("linux::GRETunnel") ec.register_connection(tun1, udptun) ec.register_connection(tun2, udptun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") cmd = "ping -c3 %s.2" % self.netblock ec.set(app, "command", cmd) ec.register_connection(app, node1) @@ -159,7 +159,7 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec = ExperimentController(exp_id = "test-tap-hybrid-gre-tunnel") - node1 = ec.register_resource("PlanetlabNode") + node1 = ec.register_resource("planetlab::Node") ec.set(node1, "hostname", host1) ec.set(node1, "username", user1) ec.set(node1, "identity", identity1) @@ -167,12 +167,12 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): 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, "prefix4", 24) + tun1 = ec.register_resource("planetlab::Tun") + 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") + node2 = ec.register_resource("linux::Node") ec.set(node2, "hostname", host2) ec.set(node2, "username", user2) ec.set(node2, "identity", identity2) @@ -180,16 +180,16 @@ class PlanetLabGRETunnelTestCase(unittest.TestCase): ec.set(node2, "cleanExperiment", True) ec.set(node2, "cleanProcesses", True) - tun2 = ec.register_resource("LinuxTun") - ec.set(tun2, "ip4", "%s.2" % self.netblock) - ec.set(tun2, "prefix4", 24) + tun2 = ec.register_resource("linux::Tun") + 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") + gretun = ec.register_resource("linux::GRETunnel") ec.register_connection(tun1, gretun) ec.register_connection(tun2, gretun) - app = ec.register_resource("LinuxApplication") + app = ec.register_resource("linux::Application") # It seems the hybrid tunnel takes some time to setup... we add a sleep 5 # XXX: Debug this to see if it can be fixed on the RMs cmd = "sleep 5; ping -c3 %s.2" % self.netblock