Changing ResourceManager naming for platform::ResourceName
[nepi.git] / test / resources / linux / ns3 / ns3simulation.py
index 8501f64..f663e1f 100755 (executable)
@@ -136,7 +136,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_p2p_ping(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-p2p-ping")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -147,7 +147,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.register_connection(simu, node)
 
@@ -187,7 +187,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_csma_ping(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-csma-ping")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -198,7 +198,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.register_connection(simu, node)
 
@@ -238,7 +238,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_user_sources(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-user-sources")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -249,7 +249,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         sources = os.path.join(os.path.dirname(os.path.realpath(__file__)), 
                 "ns-3.18-user.tar.gz")
@@ -293,7 +293,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_compile_debug_mode(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-debug-mode")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", host)
         else:
@@ -304,7 +304,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.set(simu, "nsLog", "V4Ping:Node")
         ec.set(simu, "buildMode", "debug")
@@ -350,7 +350,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_real_time(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-real-time")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -361,7 +361,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
 
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "simulatorImplementationType", "ns3::RealtimeSimulatorImpl")
         ec.set(simu, "checksumEnabled", True)
         ec.set(simu, "verbose", True)
@@ -411,7 +411,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_traces(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-traces")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -422,7 +422,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.register_connection(simu, node)
 
@@ -494,7 +494,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
 
         ec = ExperimentController(exp_id = "test-ns3-wifi-ping")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -505,7 +505,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.register_connection(simu, node)
 
@@ -557,7 +557,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         """
         ec = ExperimentController(exp_id = "test-ns3-routes")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", host)
         else:
@@ -568,7 +568,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.register_connection(simu, node)
 
@@ -674,7 +674,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         """
         ec = ExperimentController(exp_id = "test-ns3-routing")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", "localhost")
         else:
@@ -685,7 +685,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.set(simu, "populateRoutingTables", True)
         ec.register_connection(simu, node)
@@ -756,7 +756,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
     def t_dce(self, host, user = None, identity = None):
         ec = ExperimentController(exp_id = "test-ns3-dce")
         
-        node = ec.register_resource("LinuxNode")
+        node = ec.register_resource("linux::Node")
         if host == "localhost":
             ec.set(node, "hostname", host)
         else:
@@ -767,7 +767,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set(node, "cleanProcesses", True)
         #ec.set(node, "cleanHome", True)
 
-        simu = ec.register_resource("LinuxNS3Simulation")
+        simu = ec.register_resource("linux::ns3::Simulation")
         ec.set(simu, "verbose", True)
         ec.set(simu, "buildMode", "debug")
         ec.set(simu, "nsLog", "DceApplication")
@@ -789,7 +789,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.register_connection(chan, p2p2)
 
         ### create applications
-        udp_perf = ec.register_resource("ns3::DceApplication")
+        udp_perf = ec.register_resource("linux::ns3::dce::Application")
         ec.set (udp_perf, "binary", "udp-perf")
         ec.set (udp_perf, "stackSize", 1<<20)
         ec.set (udp_perf, "arguments", "--duration=10;--nodes=2")
@@ -797,7 +797,7 @@ class LinuxNS3SimulationTest(unittest.TestCase):
         ec.set (udp_perf, "StopTime", "20s")
         ec.register_connection(udp_perf, nsnode1)
 
-        udp_perf_client = ec.register_resource("ns3::DceApplication")
+        udp_perf_client = ec.register_resource("linux::ns3::dce::Application")
         ec.set (udp_perf_client, "binary", "udp-perf")
         ec.set (udp_perf_client, "stackSize", 1<<20)
         ec.set (udp_perf_client, "arguments", "--client;--nodes=2;--host=10.0.0.1;--duration=10")