Changed the endpoint_ip and endpoint_prefix attributes of TAP/TUN endpoints for ip...
[nepi.git] / test / resources / planetlab / tun.py
index aa0def2..0125971 100755 (executable)
@@ -40,21 +40,21 @@ class PlanetlabTunTestCase(unittest.TestCase):
     @skipIfNotAlive
     def t_tun_create(self, host, user, identity):
 
-        ec = ExperimentController(exp_id = "test-un-create")
+        ec = ExperimentController(exp_id="test-un-create")
         
-        node = ec.register_resource("PlanetlabNode")
+        node = ec.register_resource("planetlab::Node")
         ec.set(node, "hostname", host)
         ec.set(node, "username", user)
         ec.set(node, "identity", identity)
-        ec.set(node, "cleanHome", True)
+        ec.set(node, "cleanExperiment", True)
         ec.set(node, "cleanProcesses", True)
 
-        tun = ec.register_resource("PlanetlabTun")
-        ec.set(tun, "endpoint_ip", "%s.1" % self.netblock)
-        ec.set(tun, "endpoint_prefix", 24)
+        tun = ec.register_resource("planetlab::Tun")
+        ec.set(tun, "ip", "%s.1" % self.netblock)
+        ec.set(tun, "prefix", "24")
         ec.register_connection(tun, node)
 
-        app = ec.register_resource("LinuxApplication")
+        app = ec.register_resource("linux::Application")
         cmd = "ping -c3 %s.1" % self.netblock
         ec.set(app, "command", cmd)
         ec.register_connection(app, node)
@@ -63,7 +63,7 @@ class PlanetlabTunTestCase(unittest.TestCase):
 
         ec.wait_finished(app)
 
-        ping = ec.trace(app, 'stdout')
+        ping = ec.trace(app, "stdout")
         expected = """3 packets transmitted, 3 received, 0% packet loss"""
         self.assertTrue(ping.find(expected) > -1)