From dcc041595632c19eb29d8d37da99a2cc2a7a1c94 Mon Sep 17 00:00:00 2001 From: Balagangadhar Bathula Date: Mon, 3 May 2021 11:03:56 -0400 Subject: [PATCH] Port-mapping functional tests for B100G muxponder - Update the Honeynode 7.1 operational data to support muxponder client and network. - Add port-mapping functional tests to verify the port-mapping data for switch-client, switch-network. JIRA: TRNSPRTPCE-449 Change-Id: I6cd668befee96301ac48fbb8689ee536fac424be Signed-off-by: Balagangadhar Bathula --- .../openroadm/7.1/oper-XPDRA2.xml | 335 ++++++++++++++++-- .../7.1/test_portmapping.py | 48 ++- 2 files changed, 358 insertions(+), 25 deletions(-) diff --git a/tests/sample_configs/openroadm/7.1/oper-XPDRA2.xml b/tests/sample_configs/openroadm/7.1/oper-XPDRA2.xml index b7355eec1..59132c4e9 100644 --- a/tests/sample_configs/openroadm/7.1/oper-XPDRA2.xml +++ b/tests/sample_configs/openroadm/7.1/oper-XPDRA2.xml @@ -1,12 +1,12 @@ - - - OPENROADM - - - + + + OPENROADM + + + XPDR-A2 @@ -114,17 +114,35 @@ slot-2 1/0/1-PLUG-CLIENT + installed-prov-match slot-3 - empty-not-prov + 1/0/3-PLUG-CLIENT + installed-prov-match slot-4 empty-not-prov + + slot-5 + + empty-not-prov + + + slot-6 + + empty-not-prov + + + slot-7 + + 1/0/7-PLUG-NET + installed-prov-match + 1/0/1-PLUG-NET @@ -178,7 +196,9 @@ org-openroadm-port-types:if-otsi-otsigroup - otsigroup-profile1 + FOIC4.8-OTUC4 + FOIC3.6-OTUC3 + FOIC2.4-OTUC2 @@ -224,12 +244,6 @@ deployed inService inService - - -22.00 - -5.00 - 1.00 - 0.00 - org-openroadm-port-types:if-400GE @@ -237,6 +251,276 @@ + + 1/0/3-PLUG-CLIENT + client_pluggable + Client_P + deployed + inService + VendorA + QSFP28 + serial-1234 + client_pluggable + clientXPDR + 2007-10-10T00:00:00Z + 12345678901 + 0.1 + inService + + circuitPack + + not-reserved-available + NORMAL + 1 + 1 + 3 + true + true + true + xponder-XPDRA + + 1/0 + slot-3 + + + C3 + inService + inService + + + x:if-100GE-ODU4 + + + 1/0/7-PLUG-NETWORK + ABCD-4-BY-100G-1 + ABCD-3-BY-100G-1 + 1 + + + + + x:if-OCH-OTU4-ODU4 + + + 1/0/7-PLUG-NETWORK + ABCD-4-BY-100G-1 + ABCD-3-BY-100G-1 + 1 + + + + + QSFP28 + bidirectional + wavelength + switch-client + + + + 1/0/7-PLUG-NETWORK + CFP2-DCO + Line_NW_P + deployed + inService + VendorA + CFP2-DCO + serial-1234 + line_pluggable + lineXPDR + 2007-10-10T00:00:00Z + 12345678901 + 0.1 + inService + + circuitPack + + not-reserved-available + NORMAL + 1 + 1 + 7 + true + true + true + xponder-XPDRA + + 1/0 + slot-7 + + + L2 + inService + + + x:if-otsi-otsigroup + FOIC4.8-OTUC4 + FOIC3.6-OTUC3 + FOIC2.4-OTUC2 + + + CFP2-DCO + pluggable + true + inService + + 13.0 + -5.0 + -22.0 + 0.0 + + bidirectional + wavelength + switch-network + + + + FOIC2.4-OTUC2 + x:foic2.4 + one-stage-ODUCn-ODU4 + x:if-OTUCn-ODUCn + 2 + + + FOIC3.6-OTUC3 + x:foic3.6 + one-stage-ODUCn-ODU4 + x:if-OTUCn-ODUCn + 3 + + + FOIC4.8-OTUC4 + x:foic4.8 + one-stage-ODUCn-ODUflex-ODU4 + x:if-OTUCn-ODUCn + 4 + + + ABCD-4-BY-100G-1 + 1 + 1.3 + 1.2 + 1.5 + 1.4 + 1.1 + 1.18 + 1.17 + 1.16 + 1.15 + 1.7 + 1.6 + 1.9 + 1.19 + 1.8 + 1.10 + 1.20 + 1.14 + 1.13 + 1.12 + 1.11 + x:ODTUCn.ts + + + ABCD-4-BY-100G-2 + 2 + 2.2 + 2.1 + 2.4 + 2.3 + 2.9 + 2.16 + 2.6 + 2.17 + 2.5 + 2.18 + 2.8 + 2.19 + 2.7 + 2.12 + 2.13 + 2.14 + 2.15 + 2.20 + 2.10 + 2.11 + x:ODTUCn.ts + + + ABCD-4-BY-100G-3 + 3 + 3.1 + 3.3 + 3.2 + 3.9 + 3.8 + 3.17 + 3.5 + 3.18 + 3.4 + 3.19 + 3.7 + 3.6 + 3.13 + 3.14 + 3.15 + 3.16 + 3.20 + 3.10 + 3.11 + 3.12 + x:ODTUCn.ts + + + ABCD-4-BY-100G-4 + 4 + 4.2 + 4.1 + 4.8 + 4.7 + 4.9 + 4.19 + 4.4 + 4.18 + 4.3 + 4.6 + 4.5 + 4.15 + 4.14 + 4.17 + 4.16 + 4.11 + 4.10 + 4.13 + 4.12 + 4.20 + x:ODTUCn.ts + + + ABCD-3-BY-100G-1 + 3 + x:ODTUCn.ts + 1 + 1.3 + 1.2 + 1.5 + 1.4 + 1.1 + 1.18 + 1.17 + 1.16 + 1.15 + 1.7 + 1.6 + 1.9 + 1.8 + 1.19 + 1.10 + 1.20 + 1.14 + 1.13 + 1.12 + 1.11 + x:ODUCn + 1 tpdr @@ -254,6 +538,20 @@ 1 + + 2 + mpdr + + 1 + 1/0/7-PLUG-NETWORK + L2 + + + 2 + 1/0/3-PLUG-CLIENT + C3 + + 1 @@ -276,13 +574,6 @@ C1 - - otsigroup-profile1 - org-openroadm-port-types:if-OTUCn-ODUCn - 4 - org-openroadm-common-optical-channel-types:foic4.8 - one-stage-ODUCn-ODUflex-ODU4 - mc-capa-profile1 3.125 @@ -293,4 +584,4 @@ 14 - + \ No newline at end of file diff --git a/tests/transportpce_tests/7.1/test_portmapping.py b/tests/transportpce_tests/7.1/test_portmapping.py index a94da1f3c..e734f4bb5 100644 --- a/tests/transportpce_tests/7.1/test_portmapping.py +++ b/tests/transportpce_tests/7.1/test_portmapping.py @@ -106,11 +106,53 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): 'port-admin-state': 'InService', 'port-oper-state': 'InService'}, res['mapping']) - def test_06_xpdr_device_disconnection(self): + # Check the port-mapping for the switch-client and switch-network port-quals + def test_06_xpdr2_portmapping_NETWORK1(self): + response = test_utils.portmapping_request("XPDR-A2/mapping/XPDR2-NETWORK1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn( + {'supported-interface-capability': + ['org-openroadm-port-types:if-otsi-otsigroup'], + 'supporting-port': 'L2', + 'supporting-circuit-pack-name': '1/0/7-PLUG-NETWORK', + 'logical-connection-point': 'XPDR2-NETWORK1', + 'port-qual': 'switch-network', + 'port-direction': 'bidirectional', + 'lcp-hash-val': 'LY9PxYJqUbw=', + 'port-admin-state': 'InService', + 'port-oper-state': 'InService', + 'xponder-type': 'mpdr' + }, + res['mapping']) + + def test_07_xpdr2_portmapping_CLIENT1(self): + response = test_utils.portmapping_request("XPDR-A2/mapping/XPDR2-CLIENT1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn( + {'supported-interface-capability': + ['org-openroadm-port-types:if-100GE-ODU4', + 'org-openroadm-port-types:if-OCH-OTU4-ODU4'], + 'supporting-port': 'C3', + 'supporting-circuit-pack-name': '1/0/3-PLUG-CLIENT', + 'logical-connection-point': 'XPDR2-CLIENT1', + 'port-direction': 'bidirectional', + 'port-qual': 'switch-client', + 'lcp-hash-val': 'AK+Cna4EclRH', + 'port-admin-state': 'InService', + 'port-oper-state': 'InService', + "mpdr-restrictions": { + "min-trib-slot": "1.1", + "max-trib-slot": "1.20" + }}, + res['mapping']) + + def test_08_xpdr_device_disconnection(self): response = test_utils.unmount_device("XPDR-A2") self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) - def test_07_xpdr_device_disconnected(self): + def test_09_xpdr_device_disconnected(self): response = test_utils.get_netconf_oper_request("XPDR-A2") self.assertEqual(response.status_code, requests.codes.conflict) res = response.json() @@ -120,7 +162,7 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase): "relevant data model content does not exist"}, res['errors']['error']) - def test_08_xpdr_device_not_connected(self): + def test_10_xpdr_device_not_connected(self): response = test_utils.portmapping_request("XPDR-A2") self.assertEqual(response.status_code, requests.codes.conflict) res = response.json() -- 2.36.6