X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=transportpce.git;a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F1.2.1%2Ftest_topoPortMapping.py;h=ab46c0df96422ef4916b648b322a8d0414a0fdfc;hp=b9b4bccd7bce25e6cd070f9c1b69574eefbe4e09;hb=f9bb9e323c48640b14908cbc4101c2ad41b1de60;hpb=f5b631df0de2c7388150840d6e1c54e9c2e49941 diff --git a/tests/transportpce_tests/1.2.1/test_topoPortMapping.py b/tests/transportpce_tests/1.2.1/test_topoPortMapping.py index b9b4bccd7..ab46c0df9 100644 --- a/tests/transportpce_tests/1.2.1/test_topoPortMapping.py +++ b/tests/transportpce_tests/1.2.1/test_topoPortMapping.py @@ -20,8 +20,8 @@ import test_utils class TransportPCEtesting(unittest.TestCase): - honeynode_process1 = None - honeynode_process2 = None + sim_process1 = None + sim_process2 = None odl_process = None restconf_baseurl = "http://localhost:8181/restconf" @@ -29,15 +29,12 @@ class TransportPCEtesting(unittest.TestCase): @classmethod def setUpClass(cls): - print("starting honeynode1...") - cls.honeynode_process1 = test_utils.start_xpdra_honeynode() + cls.sim_process1 = test_utils.start_sim('xpdra') time.sleep(20) - print("starting honeynode2...") - cls.honeynode_process2 = test_utils.start_roadma_honeynode() + cls.sim_process2 = test_utils.start_sim('roadma') time.sleep(20) - print("starting opendaylight...") cls.odl_process = test_utils.start_tpce() time.sleep(60) print("opendaylight started") @@ -49,16 +46,16 @@ class TransportPCEtesting(unittest.TestCase): child.wait() cls.odl_process.send_signal(signal.SIGINT) cls.odl_process.wait() - for child in psutil.Process(cls.honeynode_process1.pid).children(): + for child in psutil.Process(cls.sim_process1.pid).children(): child.send_signal(signal.SIGINT) child.wait() - cls.honeynode_process1.send_signal(signal.SIGINT) - cls.honeynode_process1.wait() - for child in psutil.Process(cls.honeynode_process2.pid).children(): + cls.sim_process1.send_signal(signal.SIGINT) + cls.sim_process1.wait() + for child in psutil.Process(cls.sim_process2.pid).children(): child.send_signal(signal.SIGINT) child.wait() - cls.honeynode_process2.send_signal(signal.SIGINT) - cls.honeynode_process2.wait() + cls.sim_process2.send_signal(signal.SIGINT) + cls.sim_process2.wait() def setUp(self): time.sleep(10) @@ -76,7 +73,7 @@ class TransportPCEtesting(unittest.TestCase): "netconf-node-topology:username": "admin", "netconf-node-topology:password": "admin", "netconf-node-topology:host": "127.0.0.1", - "netconf-node-topology:port": "17831", + "netconf-node-topology:port": test_utils.sims['roadma']['port'], "netconf-node-topology:tcp-only": "false", "netconf-node-topology:pass-through": {}}]} headers = {'content-type': 'application/json'} @@ -143,7 +140,7 @@ class TransportPCEtesting(unittest.TestCase): "netconf-node-topology:username": "admin", "netconf-node-topology:password": "admin", "netconf-node-topology:host": "127.0.0.1", - "netconf-node-topology:port": "17830", + "netconf-node-topology:port": test_utils.sims['xpdra']['port'], "netconf-node-topology:tcp-only": "false", "netconf-node-topology:pass-through": {}}]} headers = {'content-type': 'application/json'}