X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F1.2.1%2Ftest_portmapping.py;h=909bc45b0e844c7a9102352fa6a4e32ffc17d37c;hb=531e5023a9545d72e75eabb98dcbabc94741092e;hp=b337f8a960a974346fe22a62845515805be9b04f;hpb=19f7543dad8aabe68925aaa01bcbbcfc17e6eb23;p=transportpce.git diff --git a/tests/transportpce_tests/1.2.1/test_portmapping.py b/tests/transportpce_tests/1.2.1/test_portmapping.py index b337f8a96..909bc45b0 100644 --- a/tests/transportpce_tests/1.2.1/test_portmapping.py +++ b/tests/transportpce_tests/1.2.1/test_portmapping.py @@ -18,6 +18,7 @@ import shutil import subprocess import time import unittest +import test_utils class TransportPCEPortMappingTesting(unittest.TestCase): @@ -29,42 +30,20 @@ class TransportPCEPortMappingTesting(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_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 ("starting opendaylight...") + cls.odl_process = test_utils.start_tpce() time.sleep(60) + print ("opendaylight started") @classmethod def tearDownClass(cls):