Update topology functional tests
[transportpce.git] / tests / transportpce_tests / 1.2.1 / test_olm.py
index 3ac186a05332e46a36b9a31ad191d738a4106b15..8a37b4a3581382e6b57a306afcaaf12b6c752b2b 100644 (file)
@@ -39,7 +39,7 @@ class TransportOlmTesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode1.log', 'w') as outfile:
                 cls.honeynode_process1 = subprocess.Popen(
-                    [executable, "17840", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
+                    [executable, "17830", "sample_configs/openroadm/2.1/oper-XPDRA.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -49,7 +49,7 @@ class TransportOlmTesting(unittest.TestCase):
         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-XPDRA.xml"],
+                    [executable, "17831", "sample_configs/openroadm/2.1/oper-ROADMA-full.xml"],
                     stdout=outfile)
 
     @classmethod
@@ -59,7 +59,7 @@ class TransportOlmTesting(unittest.TestCase):
         if os.path.isfile(executable):
             with open('honeynode3.log', 'w') as outfile:
                 cls.honeynode_process3 = subprocess.Popen(
-                    [executable, "17843", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
+                    [executable, "17833", "sample_configs/openroadm/2.1/oper-ROADMC-full.xml"],
                     stdout=outfile)
     @classmethod
     def __start_honeynode4(cls):
@@ -135,7 +135,7 @@ class TransportOlmTesting(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": "17830",
             "netconf-node-topology:tcp-only": "false",
             "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
@@ -173,7 +173,7 @@ class TransportOlmTesting(unittest.TestCase):
              "netconf-node-topology:username": "admin",
              "netconf-node-topology:password": "admin",
              "netconf-node-topology:host": "127.0.0.1",
-             "netconf-node-topology:port": "17840",
+             "netconf-node-topology:port": "17831",
              "netconf-node-topology:tcp-only": "false",
              "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
@@ -192,7 +192,7 @@ class TransportOlmTesting(unittest.TestCase):
              "netconf-node-topology:username": "admin",
              "netconf-node-topology:password": "admin",
              "netconf-node-topology:host": "127.0.0.1",
-             "netconf-node-topology:port": "17843",
+             "netconf-node-topology:port": "17833",
              "netconf-node-topology:tcp-only": "false",
              "netconf-node-topology:pass-through": {}}]}
         headers = {'content-type': 'application/json'}
@@ -496,7 +496,8 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
-        time.sleep(40)
+        #time.sleep(40)
+        time.sleep(10)
 
     def test_18_servicePath_create_ZToA(self):
         url = "{}/operations/transportpce-device-renderer:service-path".format(self.restconf_baseurl)
@@ -537,7 +538,8 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
-        time.sleep(40)
+        #time.sleep(40)
+        time.sleep(10)
 
     def test_19_service_power_setup_XPDRA_XPDRC(self):
         url = "{}/operations/transportpce-olm:service-power-setup".format(self.restconf_baseurl)
@@ -659,7 +661,7 @@ class TransportOlmTesting(unittest.TestCase):
             "GET", url, headers=headers, auth=('admin', 'admin'))
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
-        self.assertEqual(-5, res['org-openroadm-optical-channel-interfaces:och']['transmit-power'])
+        self.assertEqual(0, res['org-openroadm-optical-channel-interfaces:och']['transmit-power'])
         self.assertEqual(1, res['org-openroadm-optical-channel-interfaces:och']['wavelength-number'])
 
     def test_25_get_roadmconnection_ROADMC(self):
@@ -892,7 +894,8 @@ class TransportOlmTesting(unittest.TestCase):
         self.assertEqual(response.status_code, requests.codes.ok)
         res = response.json()
         self.assertIn('Roadm-connection successfully created for nodes', res["output"]["result"])
-        time.sleep(40)
+        #time.sleep(40)
+        time.sleep(10)
 
     def test_34_get_interface_XPDRA_XPDR1_NETWORK2(self):
         url = ("{}/config/network-topology:network-topology/topology/topology-netconf/node/XPDRA/yang-ext:mount/"