Bump lighty.io core and add tests support for it
[transportpce.git] / tests / transportpce_tests / 1.2.1 / test_topology.py
index 3eabea7febe0eeed66f8e4dbd6b7df6e44abcb6c..81411b3bd7d4169fd73b6b037f65bb548fb0a171 100644 (file)
@@ -19,6 +19,7 @@ import subprocess
 import time
 import unittest
 import logging
+import test_utils
 
 class TransportPCETopologyTesting(unittest.TestCase):
 
@@ -31,66 +32,29 @@ class TransportPCETopologyTesting(unittest.TestCase):
 
 #START_IGNORE_XTESTING
 
-    @classmethod
-    def __start_honeynode1(cls):
-        executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
-                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
-        if os.path.isfile(executable):
-            with open('honeynode1.log', 'w') as outfile:
-                cls.honeynode_process1 = subprocess.Popen(
-                    [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
-                    stdout=outfile)
-
-    @classmethod
-    def __start_honeynode2(cls):
-        executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
-                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
-        if os.path.isfile(executable):
-            with open('honeynode2.log', 'w') as outfile:
-                cls.honeynode_process2 = subprocess.Popen(
-                    [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA.xml"],
-                    stdout=outfile)
-
-    @classmethod
-    def __start_honeynode3(cls):
-        executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
-                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
-        if os.path.isfile(executable):
-            with open('honeynode3.log', 'w') as outfile:
-                cls.honeynode_process3 = subprocess.Popen(
-                    [executable, "17832", "sample_configs/openroadm/2.1/oper-ROADMB.xml"],
-                    stdout=outfile)
-
-    @classmethod
-    def __start_honeynode4(cls):
-        executable = ("./honeynode/2.1/honeynode-distribution/target/honeynode-distribution-1.18.01-hc"
-                      "/honeynode-distribution-1.18.01/honeycomb-tpce")
-        if os.path.isfile(executable):
-            with open('honeynode4.log', 'w') as outfile:
-                cls.honeynode_process4 = subprocess.Popen(
-                    [executable, "17833", "sample_configs/openroadm/2.1/oper-ROADMC.xml"],
-                    stdout=outfile)
-
-    @classmethod
-    def __start_odl(cls):
-        executable = "../karaf/target/assembly/bin/karaf"
-        with open('odl.log', 'w') as outfile:
-            cls.odl_process = subprocess.Popen(
-                ["bash", executable, "server"], stdout=outfile,
-                stdin=open(os.devnull))
-
     @classmethod
     def setUpClass(cls):
-        cls.__start_honeynode1()
+        print ("starting honeynode1...")
+        cls.honeynode_process1 = test_utils.start_xpdra_honeynode()
         time.sleep(20)
-        cls.__start_honeynode2()
+
+        print ("starting honeynode2...")
+        cls.honeynode_process2 = test_utils.start_roadma_honeynode()
         time.sleep(20)
-        cls.__start_honeynode3()
+
+        print ("starting honeynode3...")
+        cls.honeynode_process3 = test_utils.start_roadmb_honeynode()
         time.sleep(20)
-        cls.__start_honeynode4()
+
+        print ("starting honeynode4...")
+        cls.honeynode_process4 = test_utils.start_roadmc_honeynode()
         time.sleep(20)
-        cls.__start_odl()
+        print ("all honeynodes started")
+
+        print ("starting opendaylight...")
+        cls.odl_process = test_utils.start_tpce()
         time.sleep(60)
+        print ("opendaylight started")
 
     @classmethod
     def tearDownClass(cls):