X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F2.2.1%2Ftest_renderer_service_path_nominal.py;h=436e769db09b84e3413e11f57a17ccd21be08ff3;hb=34cbca4ad81fbd29e833197f0e4b09128daa8b95;hp=ee79b2edc36c4c4c378b4c9d60cade49c20eae68;hpb=938fbefcf61e04c00bc409088dc741369fa845d2;p=transportpce.git diff --git a/tests/transportpce_tests/2.2.1/test_renderer_service_path_nominal.py b/tests/transportpce_tests/2.2.1/test_renderer_service_path_nominal.py index ee79b2edc..436e769db 100644 --- a/tests/transportpce_tests/2.2.1/test_renderer_service_path_nominal.py +++ b/tests/transportpce_tests/2.2.1/test_renderer_service_path_nominal.py @@ -19,6 +19,7 @@ import os import psutil import shutil from unittest.result import failfast +import test_utils class TransportPCERendererTesting(unittest.TestCase): @@ -30,42 +31,21 @@ class TransportPCERendererTesting(unittest.TestCase): #START_IGNORE_XTESTING - @classmethod - def __start_honeynode1(cls): - executable = ("./honeynode/2.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, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"], - stdout=outfile) - - @classmethod - def __start_honeynode2(cls): - executable = ("./honeynode/2.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, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.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_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): @@ -159,13 +139,13 @@ class TransportPCERendererTesting(unittest.TestCase): self.assertIn( {'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network', - 'port-direction': 'bidirectional', 'associated-lcp': 'XPDR1-CLIENT1'}, + 'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1'}, res['nodes'][0]['mapping']) self.assertIn( {'supporting-port': 'C1', 'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT', 'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional', - 'associated-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client'}, + 'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client'}, res['nodes'][0]['mapping']) def test_05_service_path_create(self):