Align 1.2.1 tests sims/tpce management to 2.2.1
[transportpce.git] / tests / transportpce_tests / common / test_utils.py
similarity index 88%
rename from tests/transportpce_tests/2.2.1/test_utils.py
rename to tests/transportpce_tests/common/test_utils.py
index 5402eae5b4610b236cb8de6a77e90a8932e1cc6c..b94c9de012a13a3298fb685af5d89179c8bd4376 100644 (file)
@@ -16,15 +16,11 @@ import subprocess
 import psutil
 import requests
 
-sims = {
-    'xpdra': {'port': '17840', 'configfile': 'oper-XPDRA.xml', 'logfile': 'oper-XPDRA.log'},
-    'roadma': {'port': '17841', 'configfile': 'oper-ROADMA.xml', 'logfile': 'oper-ROADMA.log'},
-    'roadmb': {'port': '17842', 'configfile': 'oper-ROADMB.xml', 'logfile': 'oper-ROADMB.log'},
-    'roadmc': {'port': '17843', 'configfile': 'oper-ROADMC.xml', 'logfile': 'oper-ROADMC.log'},
-    'xpdrc': {'port': '17844', 'configfile': 'oper-XPDRC.xml', 'logfile': 'oper-XPDRC.log'},
-    'spdrav2': {'port': '17845', 'configfile': 'oper-SPDRAv2.xml', 'logfile': 'oper-SPDRAv2.log'},
-    'spdrav1': {'port': '17846', 'configfile': 'oper-SPDRAv1.xml', 'logfile': 'oper-SPDRAv1.log'}
-}
+import simulators
+
+sims = simulators.sims
+honeynode_executable = simulators.honeynode_executable
+samples_directory = simulators.samples_directory
 
 HONEYNODE_OK_START_MSG = re.escape("Netconf SSH endpoint started successfully at 0.0.0.0")
 KARAF_OK_START_MSG = re.escape("Blueprint container for bundle "
@@ -32,14 +28,6 @@ KARAF_OK_START_MSG = re.escape("Blueprint container for bundle "
 
 TYPE_APPLICATION_JSON = {'content-type': 'application/json'}
 
-honeynode_executable = os.path.join(
-    os.path.dirname(os.path.realpath(__file__)),
-    "..", "..", "honeynode", "2.2.1", "honeynode-simulator", "honeycomb-tpce")
-
-samples_directory = os.path.join(
-    os.path.dirname(os.path.realpath(__file__)),
-    "..", "..", "sample_configs", "openroadm", "2.2.1")
-
 log_directory = os.path.dirname(os.path.realpath(__file__))
 
 karaf_log = os.path.join(
@@ -48,6 +36,7 @@ karaf_log = os.path.join(
 
 process_list = []
 
+
 def start_sims(sims_list):
     for sim in sims_list:
         print("starting simulator for " + sim + "...")