Port-mapping to support regen capabilities
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test01_portmapping.py
index 4b34747437020e631d8668333a224c183d34cfff..7b28099915e289bbeae59aa5afa7d853fcd6a88c 100644 (file)
@@ -134,7 +134,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
              'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
              'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
-             'lcp-hash-val': 'AMkDwQ7xTmRI', 'xponder-type': 'tpdr',
+             'lcp-hash-val': 'AMkDwQ7xTmRI', 'xpdr-type': 'tpdr',
              'port-admin-state': 'InService', 'port-oper-state': 'InService'},
             response['mapping'])
 
@@ -146,7 +146,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
              'logical-connection-point': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
              'connection-map-lcp': 'XPDR1-CLIENT2', 'port-qual': 'xpdr-network',
-             'lcp-hash-val': 'AMkDwQ7xTmRL', 'xponder-type': 'tpdr',
+             'lcp-hash-val': 'AMkDwQ7xTmRL', 'xpdr-type': 'tpdr',
              'port-admin-state': 'InService', 'port-oper-state': 'InService'},
             response['mapping'])
 
@@ -159,7 +159,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
              'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
              'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AJUUr6I5fALj', 'xponder-type': 'tpdr',
+             'lcp-hash-val': 'AJUUr6I5fALj', 'xpdr-type': 'tpdr',
              'port-admin-state': 'InService', 'port-oper-state': 'InService'},
             response['mapping'])
 
@@ -172,7 +172,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              'supporting-circuit-pack-name': '1/0/2-PLUG-CLIENT',
              'logical-connection-point': 'XPDR1-CLIENT2', 'port-direction': 'bidirectional',
              'connection-map-lcp': 'XPDR1-NETWORK2', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AJUUr6I5fALg', 'xponder-type': 'tpdr',
+             'lcp-hash-val': 'AJUUr6I5fALg', 'xpdr-type': 'tpdr',
              'port-admin-state': 'InService', 'port-oper-state': 'InService'},
             response['mapping'])
 
@@ -206,7 +206,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
                          len(response['switching-pool-lcp'][0]['non-blocking-list']))
         self.assertIn(
             {'nbl-number': 11,
-             'lcp-list': ['XPDR1-CLIENT1', 'XPDR1-NETWORK1'],
+             'lcp-list': ['XPDR1-NETWORK1', 'XPDR1-CLIENT1'],
              'interconnect-bandwidth-unit': 1000000000,
              'interconnect-bandwidth': 0},
             response['switching-pool-lcp'][0]['non-blocking-list'])
@@ -220,9 +220,8 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
                          len(response['switching-pool-lcp'][0]['non-blocking-list']))
         self.assertIn(
             {'nbl-number': 2,
-             'lcp-list': ['XPDR2-NETWORK2', 'XPDR2-NETWORK3', 'XPDR2-CLIENT1',
-                          'XPDR2-CLIENT2', 'XPDR2-NETWORK1', 'XPDR2-CLIENT3',
-                          'XPDR2-CLIENT4', 'XPDR2-NETWORK4'],
+             'lcp-list': ['XPDR2-NETWORK3', 'XPDR2-NETWORK4', 'XPDR2-CLIENT1', 'XPDR2-CLIENT3',
+                          'XPDR2-CLIENT2', 'XPDR2-NETWORK1', 'XPDR2-CLIENT4', 'XPDR2-NETWORK2'],
              'interconnect-bandwidth-unit': 1000000000,
              'interconnect-bandwidth': 0},
             response['switching-pool-lcp'][0]['non-blocking-list'])
@@ -238,7 +237,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             {'nbl-number': 83,
              'interconnect-bandwidth': 0,
              'interconnect-bandwidth-unit': 1000000000,
-             'lcp-list': ['XPDR3-NETWORK1', 'XPDR3-CLIENT3']},
+             'lcp-list': ['XPDR3-CLIENT3', 'XPDR3-NETWORK1']},
             response['switching-pool-lcp'][0]['non-blocking-list'])
 
     def test_21_spdr_portmapping_mappings(self):
@@ -256,7 +255,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             "lcp-hash-val": "FqlcrxV7p30=",
             "port-direction": "bidirectional",
             "port-admin-state": "InService",
-            "xponder-type": "mpdr",
+            "xpdr-type": "mpdr",
             "port-qual": "xpdr-client",
             "port-oper-state": "InService"}
         expected_sorted_list = ["org-openroadm-port-types:if-10GE-ODU2",
@@ -276,7 +275,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              "lcp-hash-val": "Swfw02qXGyI=",
              "port-direction": "bidirectional",
              "port-admin-state": "InService",
-             "xponder-type": "mpdr",
+             "xpdr-type": "mpdr",
              "port-qual": "xpdr-network",
              "port-oper-state": "InService"},
             response['mapping'])
@@ -289,7 +288,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
             'supporting-port': 'CP2-QSFP2-P1',
             'lcp-hash-val': 'AN/WSSRXne3t',
             'port-direction': 'bidirectional',
-            'xponder-type': 'switch',
+            'xpdr-type': 'switch',
             'port-qual': 'switch-client',
             'supporting-circuit-pack-name': 'CP2-QSFP2',
             'port-admin-state': 'InService',
@@ -311,7 +310,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              "lcp-hash-val": "exT821pFtOQ=",
              "port-direction": "bidirectional",
              "port-admin-state": "InService",
-             "xponder-type": "switch",
+             "xpdr-type": "switch",
              "port-qual": "switch-network",
              "port-oper-state": "InService"},
             response['mapping'])
@@ -327,7 +326,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              "lcp-hash-val": "AKsQ/HRQdtdN",
              "port-direction": "bidirectional",
              "port-admin-state": "InService",
-             "xponder-type": "mpdr",
+             "xpdr-type": "mpdr",
              "port-qual": "xpdr-client",
              "port-oper-state": "InService"},
             response['mapping'])
@@ -343,7 +342,7 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
              "lcp-hash-val": "ANnxoi7K8q30",
              "port-direction": "bidirectional",
              "port-admin-state": "InService",
-             "xponder-type": "mpdr",
+             "xpdr-type": "mpdr",
              "port-qual": "xpdr-network",
              "port-oper-state": "InService"},
             response['mapping'])