Replace tpce-topology yang by existing ordmodels
[transportpce.git] / tests / transportpce_tests / 1.2.1 / test03_topology.py
index f9c4d1f2756acdf5ce7fdf3f354d8bd58ef33dc2..d6ac68084bd8f2c3af1e13d8360d29dd0325e424 100644 (file)
@@ -230,9 +230,11 @@ class TransportPCETopologyTesting(unittest.TestCase):
                     elif tpType == 'XPONDER-NETWORK':
                         network += 1
                     if tpId == 'XPDR1-NETWORK2':
-                        self.assertEqual(tp['transportpce-topology:associated-connection-map-port'], 'XPDR1-CLIENT3')
+                        self.assertEqual(
+                            tp['org-openroadm-common-network:associated-connection-map-tp'], ['XPDR1-CLIENT3'])
                     elif tpId == 'XPDR1-CLIENT3':
-                        self.assertEqual(tp['transportpce-topology:associated-connection-map-port'], 'XPDR1-NETWORK2')
+                        self.assertEqual(
+                            tp['org-openroadm-common-network:associated-connection-map-tp'], ['XPDR1-NETWORK2'])
                 self.assertTrue(client == 4)
                 self.assertTrue(network == 2)
                 listNode.remove(nodeId)
@@ -253,17 +255,19 @@ class TransportPCETopologyTesting(unittest.TestCase):
     # Connect the tail XPDRA to ROADMA and vice versa
     def test_10_connect_tail_xpdr_rdm(self):
         # Connect the tail: XPDRA to ROADMA
-        response = test_utils_rfc8040.connect_xpdr_to_rdm_request(
-            {'xpdr-node': 'XPDRA01', 'xpdr-num': '1', 'network-num': '1',
-             'rdm-node': 'ROADMA01', 'srg-num': '1', 'termination-point-num': 'SRG1-PP1-TXRX'})
-        self.assertEqual(response.status_code, requests.codes.ok)
+        response = test_utils_rfc8040.transportpce_api_rpc_request(
+            'transportpce-networkutils', 'init-xpdr-rdm-links',
+            {'links-input': {'xpdr-node': 'XPDRA01', 'xpdr-num': '1', 'network-num': '1',
+                             'rdm-node': 'ROADMA01', 'srg-num': '1', 'termination-point-num': 'SRG1-PP1-TXRX'}})
+        self.assertEqual(response['status_code'], requests.codes.ok)
 
     def test_11_connect_tail_rdm_xpdr(self):
         # Connect the tail: ROADMA to XPDRA
-        response = test_utils_rfc8040.connect_rdm_to_xpdr_request(
-            {'xpdr-node': 'XPDRA01', 'xpdr-num': '1', 'network-num': '1',
-             'rdm-node': 'ROADMA01', 'srg-num': '1', 'termination-point-num': 'SRG1-PP1-TXRX'})
-        self.assertEqual(response.status_code, requests.codes.ok)
+        response = test_utils_rfc8040.transportpce_api_rpc_request(
+            'transportpce-networkutils', 'init-rdm-xpdr-links',
+            {'links-input': {'xpdr-node': 'XPDRA01', 'xpdr-num': '1', 'network-num': '1',
+                             'rdm-node': 'ROADMA01', 'srg-num': '1', 'termination-point-num': 'SRG1-PP1-TXRX'}})
+        self.assertEqual(response['status_code'], requests.codes.ok)
 
     def test_12_getLinks_OpenRoadmTopology(self):
         response = test_utils_rfc8040.get_ietf_network_request('openroadm-topology', 'config')