From 7ecb4bf912a8555f88b07da62fcec106b6311a54 Mon Sep 17 00:00:00 2001 From: Gilles Thouenon Date: Wed, 15 Sep 2021 11:48:35 +0200 Subject: [PATCH] New functional test suite of otn-swith 2.2.1 Create a new functional test suite testing the end-to-end 100GE service management over two (or more) otn-switch. Two uses cases are verified: - when two otn-switch are used as "AZ" node, at the termination of the service - when a thrid otn-switch is used as "intermediate" node, serving as an otn-regenerator. In such a case, the 100GE/ODU4 service is supported by two OTU4 server links. Also update simulator configuration files to perform such a network configuration with 3 ROADMs and 3 otn-switches. Adapt some functional tests consequently. Finally, rename tapi functional test to keep sequence logical. JIRA: TRNSPRTPCE-530 Signed-off-by: Gilles Thouenon Change-Id: I117a1426d6ecabeeb2a170779846f08201f32d02 --- .../openroadm/2.2.1/oper-ROADMA.xml | 60 + .../openroadm/2.2.1/oper-ROADMB.xml | 242 + .../openroadm/2.2.1/oper-ROADMC.xml | 60 + .../openroadm/2.2.1/oper-SPDRB.xml | 4301 +++++++++++++++++ .../2.2.1/test03_topology.py | 2 +- tests/transportpce_tests/2.2.1/test10_tapi.py | 14 +- ...yer.py => test13_tapi_full_multi_layer.py} | 0 .../2.2.1/test14_otn_switch_end2end.py | 1520 ++++++ tests/transportpce_tests/common/simulators.py | 1 + 9 files changed, 6197 insertions(+), 3 deletions(-) create mode 100644 tests/sample_configs/openroadm/2.2.1/oper-SPDRB.xml rename tests/transportpce_tests/2.2.1/{test12_tapi_full_multi_layer.py => test13_tapi_full_multi_layer.py} (100%) create mode 100644 tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py diff --git a/tests/sample_configs/openroadm/2.2.1/oper-ROADMA.xml b/tests/sample_configs/openroadm/2.2.1/oper-ROADMA.xml index b1d63133d..d17bf8ca6 100644 --- a/tests/sample_configs/openroadm/2.2.1/oper-ROADMA.xml +++ b/tests/sample_configs/openroadm/2.2.1/oper-ROADMA.xml @@ -814,6 +814,66 @@ + + /d:org-openroadm-device/d:interface[d:name='OTS-DEG1-TTP-TXRX'] + interface + + 2018-06-07T13:22:58+00:00 + + opticalPowerOutput + + nearEnd + tx + + 15min + 2.5 + dBm + complete + + + 24Hour + 2.23 + dBm + complete + + + + opticalPowerInput + + nearEnd + rx + + 15min + -21.1 + dBm + complete + + + 24Hour + -49.3 + dBm + complete + + + + opticalReturnLoss + + nearEnd + rx + + 15min + 40 + dBm + complete + + + 24Hour + 44 + dBm + complete + + + diff --git a/tests/sample_configs/openroadm/2.2.1/oper-ROADMB.xml b/tests/sample_configs/openroadm/2.2.1/oper-ROADMB.xml index 65d9b627a..d2eee9535 100644 --- a/tests/sample_configs/openroadm/2.2.1/oper-ROADMB.xml +++ b/tests/sample_configs/openroadm/2.2.1/oper-ROADMB.xml @@ -378,6 +378,113 @@ inService + + true + 3/0 + ADDDROP + SRGRx + inService + vendorA + WSS + nodeid-1234 + SRG1 + SRGRx + 2007-10-10T00:00:00Z + 12345678901 + 0.1 + inService + + circuitPack + + reserved-for-facility-available + inServiceMode + 1 + 2 + + C1 + Client + roadm-external + wavelength + bidirectional + + SRG1 + inService + inService + + + + + SRG1-PP1 + + + C2 + Client + roadm-external + wavelength + bidirectional + + SRG1 + inService + inService + + + + + SRG1-PP2 + + + C3 + Client + roadm-external + wavelength + bidirectional + + SRG1 + inService + inService + + + + + SRG1-PP3 + + + C4 + Client + roadm-external + wavelength + bidirectional + + SRG1 + inService + inService + + + + + SRG1-PP4 + + + AD-DEG1 + Edge + roadm-internal + multi-wavelength + bidirectional + inService + inService + SRG1-CP-TXRX + + + AD-DEG2 + Edge + roadm-internal + multi-wavelength + bidirectional + inService + inService + SRG1-CP-TXRX + + 1GE-interface-1 @@ -485,5 +592,140 @@ L1 + + 1 + 4 + one-per-srg + + 1 + 3/0 + + 4 + + + + + + /d:org-openroadm-device/d:interface[d:name='OTS-DEG1-TTP-TXRX'] + interface + + 2018-06-07T13:22:58+00:00 + + opticalPowerOutput + + nearEnd + tx + + 15min + 2.5 + dBm + complete + + + 24Hour + 2.23 + dBm + complete + + + + opticalPowerInput + + nearEnd + rx + + 15min + -21.1 + dBm + complete + + + 24Hour + -49.3 + dBm + complete + + + + opticalReturnLoss + + nearEnd + rx + + 15min + 40 + dBm + complete + + + 24Hour + 44 + dBm + complete + + + + + /d:org-openroadm-device/d:interface[d:name='OTS-DEG2-TTP-TXRX'] + interface + + 2018-06-07T13:22:58+00:00 + + opticalPowerOutput + + nearEnd + tx + + 15min + 2.5 + dBm + complete + + + 24Hour + 2.23 + dBm + complete + + + + opticalPowerInput + + nearEnd + rx + + 15min + -21.1 + dBm + complete + + + 24Hour + -49.3 + dBm + complete + + + + opticalReturnLoss + + nearEnd + rx + + 15min + 40 + dBm + complete + + + 24Hour + 44 + dBm + complete + + + + + diff --git a/tests/sample_configs/openroadm/2.2.1/oper-ROADMC.xml b/tests/sample_configs/openroadm/2.2.1/oper-ROADMC.xml index 654e944a5..de0a5e5eb 100644 --- a/tests/sample_configs/openroadm/2.2.1/oper-ROADMC.xml +++ b/tests/sample_configs/openroadm/2.2.1/oper-ROADMC.xml @@ -697,6 +697,66 @@ + + /d:org-openroadm-device/d:interface[d:name='OTS-DEG2-TTP-TXRX'] + interface + + 2018-06-07T13:22:58+00:00 + + opticalPowerOutput + + nearEnd + tx + + 15min + 4.6 + dBm + complete + + + 24Hour + 3.26 + dBm + complete + + + + opticalPowerInput + + nearEnd + rx + + 15min + -15.1 + dBm + complete + + + 24Hour + -17.3 + dBm + complete + + + + opticalReturnLoss + + nearEnd + rx + + 15min + 49.1 + dBm + complete + + + 24Hour + 45 + dBm + complete + + + diff --git a/tests/sample_configs/openroadm/2.2.1/oper-SPDRB.xml b/tests/sample_configs/openroadm/2.2.1/oper-SPDRB.xml new file mode 100644 index 000000000..411a020d0 --- /dev/null +++ b/tests/sample_configs/openroadm/2.2.1/oper-SPDRB.xml @@ -0,0 +1,4301 @@ + + + + + + NETCONF + + + + + + SPDR-SB1 + 1 + xpdr + NodeSB + vendorA + universal-switchponder + us-1234 + 1.2.3.4 + 24 + 1.2.3.4 + static + 1.2.3.4 + 10 + 1.2.3.1 + 00:01:02:03:04:05 + swversion1.0 + 2.2 + + 2019-07-20T15:23:43Z + + 1.0000 + 2.0000 + + + + + openroadm + openroadm + sudo + + + + SPShelf + pizza + XYZ + 1 + inService + vendorA + 1 + MasterShelfSP + pizza + SP1.6Tb + 2019-07-08T15:50:00+00:00 + MyFirstSwitchPonder + 1.0 + inService + 2019-07-08T15:50:00+00:00 + + Shelf-Master-Slot + + CP0 + + + + + circuitPack + + CP0 + Base_Switchponder_circuit_pack + baseSPDR + inService + VendorA + UniversalSPonderBaseUnit + USPBU1 + 1.6TbSwitchPonder + baseSPDRUnit + 2019-07-08T15:50:00+00:00 + MyFirstSWPONDERChassis + 1.0 + inService + false + NORMAL + SPShelf + Shelf-Master-Slot + + CP0-S1 + + CP1 + + + CP0-S2 + + CP2 + + + CP0-S3 + + + + CP0-S4 + + + + CP0-S5 + + CP5 + + + CP0-S6 + + CP6 + + + CP0-S7 + + CP7 + + + CP0-S8 + + CP8 + + + + + circuitPack + + CP5-CFP + line_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP2345_ + line pluggable 100-400G + Line_100-400G + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP5-CFP-P1 + CFP2 + switch-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP5-CFP + CP5-CFP-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP0 + CP0-S5 + + + + + circuitPack + + CP6-CFP + line_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP3456_ + line pluggable 100-400G + Line_100-400G + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP6-CFP-P1 + CFP2 + switch-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP6-CFP + CP6-CFP-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP0 + CP0-S6 + + + + + circuitPack + + CP7-CFP + line_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP4567_ + line pluggable 100-400G + Line_100-400G + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP7-CFP-P1 + CFP2 + switch-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP7-CFP + CP7-CFP-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP0 + CP0-S7 + + + + + circuitPack + + CP8-CFP + line_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP5678_ + line pluggable 100-400G + Line_100-400G + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP8-CFP-P1 + CFP2 + switch-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP8-CFP + CP8-CFP-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP0 + CP0-S8 + + + + + circuitPack + + CP1 + client_mother-board-muxponder + Client_MB_Muxponder + VendorA + MB1 + _Cl-MB-Muxponder-Type1_ + 10G-100G-MB + MUXP10:100 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + false + not-reserved-available + + CP1-S0 + + CP1-CFP0 + + + CP1-S1 + + CP1-SFP1 + + + CP1-S2 + + CP1-SFP2 + + + CP1-S3 + + CP1-SFP3 + + + CP1-S4 + + CP1-SFP4 + + + CP1-S5 + + + + CP1-S6 + + + + CP1-S7 + + + + CP1-S8 + + + + CP1-S9 + + + + CP1-S10 + + + + CP0 + CP0-S1 + + + + + circuitPack + + CP1-SFP1 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_10G + client_10GE-LR + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP1-SFP1-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-10GE-ODU2e + + -14.00 + -8.20 + 0.50 + 0.50 + + + + org-openroadm-port-types:if-10GE-ODU2 + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + true + true + true + up-down-tcm + + + + + + org-openroadm-port-types:if-10GE-ODU2e + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP1 + CP1-S1 + + + + + circuitPack + + CP1-SFP2 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_10G + client_10GE-LR + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP1-SFP2-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-10GE-ODU2e + + -14.00 + -8.20 + 0.50 + 0.50 + + + + org-openroadm-port-types:if-10GE-ODU2 + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 2 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + true + true + true + up-down-tcm + + + + + + org-openroadm-port-types:if-10GE-ODU2e + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 2 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP1 + CP1-S2 + + + + + circuitPack + + CP1-SFP3 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_10G + client_10GE-LR + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP1-SFP3-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-10GE-ODU2e + + -14.00 + -8.20 + 0.50 + 0.50 + + + + org-openroadm-port-types:if-10GE-ODU2 + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 3 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + true + true + true + up-down-tcm + + + + + + org-openroadm-port-types:if-10GE-ODU2e + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 3 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP1 + CP1-S3 + + + + + circuitPack + + CP1-SFP4 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_10G + client_10GE-LR + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP1-SFP4-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-10GE-ODU2e + + -14.00 + -8.20 + 0.50 + 0.50 + + + + org-openroadm-port-types:if-10GE-ODU2 + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 4 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + true + true + true + up-down-tcm + + + + + + org-openroadm-port-types:if-10GE-ODU2e + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 4 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP1 + CP1-S4 + + + + + circuitPack + + CP1-CFP0 + network_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP1234_ + Line_pluggable_100G + line_100GE + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP1-CFP0-P1 + CFP2 + xpdr-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU2 + org-openroadm-otn-common-types:ODU2e + true + true + true + up-down-tcm + + + + + + + + CP1 + CP1-S0 + + + + + circuitPack + + CP2 + client_mother-board-switch + Client_MB_Switch + VendorA + MB2 + _C2-MB-Switch-Type1_ + 100G-Client-MB + Client4x100 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + false + not-reserved-available + + CP2-S1 + + CP2-QSFP1 + + + CP2-S2 + + CP2-QSFP2 + + + CP2-S3 + + CP2-QSFP3 + + + CP2-S4 + + CP2-QSFP4 + + + CP0 + CP0-S2 + + + + + circuitPack + + CP2-QSFP1 + client_pluggable_qsfp28 + Client_CL_P + VendorA + QSFP28 + _OpticalClientQSFP1234_ + client_pluggable_100GE_LR4 + client_100G-LR4 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP2-QSFP1-P1 + QSFP28 + switch-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-100GE + org-openroadm-port-types:if-100GE-ODU4 + + -10.60 + -4.30 + 4.50 + 4.50 + + + + CP2 + CP2-S1 + + + + + circuitPack + + CP2-QSFP2 + client_pluggable_qsfp28 + Client_CL_P + VendorA + QSFP28 + _OpticalClientQSFP1234_ + client_pluggable_100GE_LR4 + client_100G-LR4 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP2-QSFP2-P1 + QSFP28 + switch-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-100GE + org-openroadm-port-types:if-100GE-ODU4 + + -10.60 + -4.30 + 4.50 + 4.50 + + + + CP2 + CP2-S2 + + + + + circuitPack + + CP2-QSFP3 + client_pluggable_qsfp28 + Client_CL_P + VendorA + QSFP28 + _OpticalClientQSFP1234_ + client_pluggable_100GE_LR4 + client_100G-LR4 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP2-QSFP3-P1 + QSFP28 + switch-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-100GE + org-openroadm-port-types:if-100GE-ODU4 + + -10.60 + -4.30 + 4.50 + 4.50 + + + + CP2 + CP2-S3 + + + + + circuitPack + + CP2-QSFP4 + client_pluggable_qsfp28 + Client_CL_P + VendorA + QSFP28 + _OpticalClientQSFP1234_ + client_pluggable_100GE_LR4 + client_100G-LR4 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP2-QSFP4-P1 + QSFP28 + switch-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-100GE + org-openroadm-port-types:if-100GE-ODU4 + + -10.60 + -4.30 + 4.50 + 4.50 + + + + CP2 + CP2-S4 + + + + + circuitPack + + CP3 + client_mother-board-muxponder + Client_MB_Muxponder + VendorA + MB2 + _Cl-MB-Muxponder-Type2_ + 1GE-100G-MB + MUXP1.25:100 + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + false + not-reserved-available + + CP3-S0 + + CP3-CFP0 + + + CP3-S1 + + CP3-SFP1 + + + CP3-S2 + + CP3-SFP2 + + + CP3-S3 + + CP3-SFP3 + + + CP3-S4 + + CP3-SFP4 + + + CP3-S5 + + + + CP3-S6 + + + + CP3-S7 + + + + CP3-S8 + + + + CP3-S9 + + + + CP3-S10 + + + + CP3-S11 + + + + CP3-S12 + + + + CP3-S13 + + + + CP3-S14 + + + + CP3-S15 + + + + CP3-S16 + + + + CP3-S17 + + + + CP3-S18 + + + + CP3-S19 + + + + CP3-S20 + + + + CP3-S21 + + + + CP3-S22 + + + + CP3-S23 + + + + CP3-S24 + + + + CP3-S25 + + + + CP3-S26 + + + + CP3-S27 + + + + CP3-S28 + + + + CP3-S29 + + + + CP3-S30 + + + + CP3-S31 + + + + CP3-S32 + + + + CP3-S33 + + + + CP3-S34 + + + + CP3-S35 + + + + CP3-S36 + + + + CP3-S37 + + + + CP3-S38 + + + + CP3-S39 + + + + CP3-S40 + + + + CP3-S41 + + + + CP3-S42 + + + + CP3-S43 + + + + CP3-S44 + + + + CP3-S45 + + + + CP3-S46 + + + + CP3-S47 + + + + CP3-S48 + + + + CP3-S49 + + + + CP3-S50 + + + + CP3-S51 + + + + CP3-S52 + + + + CP3-S53 + + + + CP3-S54 + + + + CP3-S55 + + + + CP3-S56 + + + + CP3-S57 + + + + CP3-S58 + + + + CP3-S59 + + + + CP3-S60 + + + + CP3-S61 + + + + CP3-S62 + + + + CP3-S63 + + + + CP3-S64 + + + + CP3-S65 + + + + CP3-S66 + + + + CP3-S67 + + + + CP3-S68 + + + + CP3-S69 + + + + CP3-S70 + + + + CP3-S71 + + + + CP3-S72 + + + + CP3-S73 + + + + CP3-S74 + + + + CP3-S75 + + + + CP3-S76 + + + + CP3-S77 + + + + CP3-S78 + + + + CP3-S79 + + + + CP3-S80 + + + + CP0 + CP0-S3 + + + + + circuitPack + + CP3-SFP1 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_1GELX + client_1000B-LX + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP3-SFP1-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-1GE-ODU0 + + -21.00 + -9.00 + -3.00 + -3.00 + + + + org-openroadm-port-types:if-1GE-ODU0 + + 21 + + CP3-CFP0 + CP3-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU0 + true + true + true + up-down-tcm + + + + + + + + CP3 + CP3-S1 + + + + + circuitPack + + CP3-SFP2 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_1GELX + client_1000B-LX + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP3-SFP2-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-1GE-ODU0 + + -21.00 + -9.00 + -3.00 + -3.00 + + + + org-openroadm-port-types:if-1GE-ODU0 + + 21 + + CP3-CFP0 + CP3-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 2 + 2 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU0 + true + true + true + up-down-tcm + + + + + + + + CP3 + CP3-S2 + + + + + circuitPack + + CP3-SFP3 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_1GELX + client_1000B-LX + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP3-SFP3-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-1GE-ODU0 + + -21.00 + -9.00 + -3.00 + -3.00 + + + + org-openroadm-port-types:if-1GE-ODU0 + + 21 + + CP3-CFP0 + CP3-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 3 + 3 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU0 + true + true + true + up-down-tcm + + + + + + + + CP3 + CP3-S3 + + + + + circuitPack + + CP3-SFP4 + client_pluggable_sfp + Client_CL_P + VendorA + SFP + _OpticalClientSFP1234_ + client_pluggable_1GELX + client_1000B-LX + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP3-SFP4-P1 + SFP + xpdr-client + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-1GE-ODU0 + + -21.00 + -9.00 + -3.00 + -3.00 + + + + org-openroadm-port-types:if-1GE-ODU0 + + 21 + + CP3-CFP0 + CP3-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 4 + 4 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU0 + true + true + true + up-down-tcm + + + + + + + + CP3 + CP3-S4 + + + + + circuitPack + + CP3-CFP0 + network_pluggable_cfp2 + Line_NW_P + VendorA + CFP2 + _OpticalLineCFP1234_ + Line_pluggable_100G + line_100GE + 1.0 + inService + NORMAL + SPShelf + Shelf-Master-Slot + true + not-reserved-available + + CP3-CFP0-P1 + CFP2 + xpdr-network + wavelength + bidirectional + + inService + inService + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + -22.00 + -5.00 + 1.00 + 0.00 + + + + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + 21 + + CP3-CFP0 + CP3-CFP0-P1 + org-openroadm-otn-common-types:ODTU4.ts-Allocated + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + + + + 1 + org-openroadm-otn-common-types:ODU4 + 21 + + + 2 + org-openroadm-otn-common-types:ODU4 + 21 + org-openroadm-otn-common-types:ODU0 + true + true + true + up-down-tcm + + + + + + + + CP3 + CP3-S0 + + + + 1 + mpdr + + 1 + CP1-CFP0 + CP1-CFP0-P1 + 1 + + + 2 + CP1-SFP1 + CP1-SFP1-P1 + 1 + + + 3 + CP1-SFP2 + CP1-SFP2-P1 + 1 + + + 4 + CP1-SFP3 + CP1-SFP3-P1 + 1 + + + 5 + CP1-SFP4 + CP1-SFP4-P1 + 1 + + + + 2 + switch + + 1 + CP2-QSFP1 + CP2-QSFP1-P1 + 2 + + + 2 + CP2-QSFP2 + CP2-QSFP2-P1 + 2 + + + 3 + CP2-QSFP3 + CP2-QSFP3-P1 + 2 + + + 4 + CP2-QSFP4 + CP2-QSFP4-P1 + 2 + + + 5 + CP5-CFP + CP5-CFP-P1 + 3 + + + 6 + CP6-CFP + CP6-CFP-P1 + 4 + + + 7 + CP7-CFP + CP7-CFP-P1 + 5 + + + 8 + CP8-CFP + CP8-CFP-P1 + 6 + + + + 3 + mpdr + + 1 + CP3-CFP0 + CP3-CFP0-P1 + 7 + + + 2 + CP3-SFP1 + CP3-SFP1-P1 + 7 + + + 3 + CP3-SFP2 + CP3-SFP2-P1 + 7 + + + 4 + CP3-SFP3 + CP3-SFP3-P1 + 7 + + + 5 + CP3-SFP4 + CP3-SFP4-P1 + 7 + + + + 1 + non-blocking + + 1 + 1000000000 + 0 + + CP1 + CP1-S1 + + + CP1 + CP1-S0 + + + + 2 + 1000000000 + 0 + + CP1 + CP1-S2 + + + CP1 + CP1-S0 + + + + 3 + 1000000000 + 0 + + CP1 + CP1-S3 + + + CP1 + CP1-S0 + + + + 4 + 1000000000 + 0 + + CP1 + CP1-S4 + + + CP1 + CP1-S0 + + + + 5 + 1000000000 + 0 + + CP1 + CP1-S5 + + + CP1 + CP1-S0 + + + + 6 + 1000000000 + 0 + + CP1 + CP1-S6 + + + CP1 + CP1-S0 + + + + 7 + 1000000000 + 0 + + CP1 + CP1-S7 + + + CP1 + CP1-S0 + + + + 8 + 1000000000 + 0 + + CP1 + CP1-S8 + + + CP1 + CP1-S0 + + + + 9 + 1000000000 + 0 + + CP1 + CP1-S9 + + + CP1 + CP1-S0 + + + + 10 + 1000000000 + 0 + + CP1 + CP1-S10 + + + CP1 + CP1-S0 + + + + 11 + 1000000000 + 0 + + CP1-CFP0 + CP1-CFP0-P1 + + + CP1-SFP1 + CP1-SFP1-P1 + + + + 12 + 1000000000 + 0 + + CP1-CFP0 + CP1-CFP0-P1 + + + CP1-SFP2 + CP1-SFP2-P1 + + + + 13 + 1000000000 + 0 + + CP1-CFP0 + CP1-CFP0-P1 + + + CP1-SFP3 + CP1-SFP3-P1 + + + + 14 + 1000000000 + 0 + + CP1-CFP0 + CP1-CFP0-P1 + + + CP1-SFP4 + CP1-SFP4-P1 + + + + + 2 + non-blocking + + 1 + 1000000000 + 0 + + CP2 + CP2-S1 + + + CP2 + CP2-S2 + + + CP2 + CP2-S3 + + + CP2 + CP2-S4 + + + CP0 + CP0-S5 + + + CP0 + CP0-S6 + + + CP0 + CP0-S7 + + + CP0 + CP0-S8 + + + + 2 + 1000000000 + 0 + + CP2-QSFP1 + CP2-QSFP1-P1 + + + CP2-QSFP2 + CP2-QSFP2-P1 + + + CP2-QSFP3 + CP2-QSFP3-P1 + + + CP2-QSFP4 + CP2-QSFP4-P1 + + + CP5-CFP + CP5-CFP-P1 + + + CP6-CFP + CP6-CFP-P1 + + + CP7-CFP + CP7-CFP-P1 + + + CP8-CFP + CP8-CFP-P1 + + + + + 3 + non-blocking + + 1 + 1000000000 + 0 + + CP3 + CP3-S1 + + + CP3 + CP3-S0 + + + + 2 + 1000000000 + 0 + + CP3 + CP3-S2 + + + CP3 + CP3-S0 + + + + 3 + 1000000000 + 0 + + CP3 + CP3-S3 + + + CP3 + CP3-S0 + + + + 4 + 1000000000 + 0 + + CP3 + CP3-S4 + + + CP3 + CP3-S0 + + + + 5 + 1000000000 + 0 + + CP3 + CP3-S5 + + + CP3 + CP3-S0 + + + + 6 + 1000000000 + 0 + + CP3 + CP3-S6 + + + CP3 + CP3-S0 + + + + 7 + 1000000000 + 0 + + CP3 + CP3-S7 + + + CP3 + CP3-S0 + + + + 8 + 1000000000 + 0 + + CP3 + CP3-S8 + + + CP3 + CP3-S0 + + + + 9 + 1000000000 + 0 + + CP3 + CP3-S9 + + + CP3 + CP3-S0 + + + + 10 + 1000000000 + 0 + + CP3 + CP3-S10 + + + CP3 + CP3-S0 + + + + 11 + 1000000000 + 0 + + CP3 + CP3-S11 + + + CP3 + CP3-S0 + + + + 12 + 1000000000 + 0 + + CP3 + CP3-S12 + + + CP3 + CP3-S0 + + + + 13 + 1000000000 + 0 + + CP3 + CP3-S13 + + + CP3 + CP3-S0 + + + + 14 + 1000000000 + 0 + + CP3 + CP3-S14 + + + CP3 + CP3-S0 + + + + 15 + 1000000000 + 0 + + CP3 + CP3-S15 + + + CP3 + CP3-S0 + + + + 16 + 1000000000 + 0 + + CP3 + CP3-S16 + + + CP3 + CP3-S0 + + + + 17 + 1000000000 + 0 + + CP3 + CP3-S17 + + + CP3 + CP3-S0 + + + + 18 + 1000000000 + 0 + + CP3 + CP3-S18 + + + CP3 + CP3-S0 + + + + 19 + 1000000000 + 0 + + CP3 + CP3-S19 + + + CP3 + CP3-S0 + + + + 20 + 1000000000 + 0 + + CP3 + CP3-S20 + + + CP3 + CP3-S0 + + + + 21 + 1000000000 + 0 + + CP3 + CP3-S21 + + + CP3 + CP3-S0 + + + + 22 + 1000000000 + 0 + + CP3 + CP3-S22 + + + CP3 + CP3-S0 + + + + 23 + 1000000000 + 0 + + CP3 + CP3-S23 + + + CP3 + CP3-S0 + + + + 24 + 1000000000 + 0 + + CP3 + CP3-S24 + + + CP3 + CP3-S0 + + + + 25 + 1000000000 + 0 + + CP3 + CP3-S25 + + + CP3 + CP3-S0 + + + + 26 + 1000000000 + 0 + + CP3 + CP3-S26 + + + CP3 + CP3-S0 + + + + 27 + 1000000000 + 0 + + CP3 + CP3-S27 + + + CP3 + CP3-S0 + + + + 28 + 1000000000 + 0 + + CP3 + CP3-S28 + + + CP3 + CP3-S0 + + + + 29 + 1000000000 + 0 + + CP3 + CP3-S29 + + + CP3 + CP3-S0 + + + + 30 + 1000000000 + 0 + + CP3 + CP3-S30 + + + CP3 + CP3-S0 + + + + 31 + 1000000000 + 0 + + CP3 + CP3-S31 + + + CP3 + CP3-S0 + + + + 32 + 1000000000 + 0 + + CP3 + CP3-S32 + + + CP3 + CP3-S0 + + + + 33 + 1000000000 + 0 + + CP3 + CP3-S33 + + + CP3 + CP3-S0 + + + + 34 + 1000000000 + 0 + + CP3 + CP3-S34 + + + CP3 + CP3-S0 + + + + 35 + 1000000000 + 0 + + CP3 + CP3-S35 + + + CP3 + CP3-S0 + + + + 36 + 1000000000 + 0 + + CP3 + CP3-S36 + + + CP3 + CP3-S0 + + + + 37 + 1000000000 + 0 + + CP3 + CP3-S37 + + + CP3 + CP3-S0 + + + + 38 + 1000000000 + 0 + + CP3 + CP3-S38 + + + CP3 + CP3-S0 + + + + 39 + 1000000000 + 0 + + CP3 + CP3-S39 + + + CP3 + CP3-S0 + + + + 40 + 1000000000 + 0 + + CP3 + CP3-S40 + + + CP3 + CP3-S0 + + + + 41 + 1000000000 + 0 + + CP3 + CP3-S41 + + + CP3 + CP3-S0 + + + + 42 + 1000000000 + 0 + + CP3 + CP3-S42 + + + CP3 + CP3-S0 + + + + 43 + 1000000000 + 0 + + CP3 + CP3-S43 + + + CP3 + CP3-S0 + + + + 44 + 1000000000 + 0 + + CP3 + CP3-S44 + + + CP3 + CP3-S0 + + + + 45 + 1000000000 + 0 + + CP3 + CP3-S45 + + + CP3 + CP3-S0 + + + + 46 + 1000000000 + 0 + + CP3 + CP3-S46 + + + CP3 + CP3-S0 + + + + 47 + 1000000000 + 0 + + CP3 + CP3-S47 + + + CP3 + CP3-S0 + + + + 48 + 1000000000 + 0 + + CP3 + CP3-S48 + + + CP3 + CP3-S0 + + + + 49 + 1000000000 + 0 + + CP3 + CP3-S49 + + + CP3 + CP3-S0 + + + + 50 + 1000000000 + 0 + + CP3 + CP3-S50 + + + CP3 + CP3-S0 + + + + 51 + 1000000000 + 0 + + CP3 + CP3-S51 + + + CP3 + CP3-S0 + + + + 52 + 1000000000 + 0 + + CP3 + CP3-S52 + + + CP3 + CP3-S0 + + + + 53 + 1000000000 + 0 + + CP3 + CP3-S53 + + + CP3 + CP3-S0 + + + + 54 + 1000000000 + 0 + + CP3 + CP3-S54 + + + CP3 + CP3-S0 + + + + 55 + 1000000000 + 0 + + CP3 + CP3-S55 + + + CP3 + CP3-S0 + + + + 56 + 1000000000 + 0 + + CP3 + CP3-S56 + + + CP3 + CP3-S0 + + + + 57 + 1000000000 + 0 + + CP3 + CP3-S57 + + + CP3 + CP3-S0 + + + + 58 + 1000000000 + 0 + + CP3 + CP3-S58 + + + CP3 + CP3-S0 + + + + 59 + 1000000000 + 0 + + CP3 + CP3-S59 + + + CP3 + CP3-S0 + + + + 60 + 1000000000 + 0 + + CP3 + CP3-S60 + + + CP3 + CP3-S0 + + + + 61 + 1000000000 + 0 + + CP3 + CP3-S61 + + + CP3 + CP3-S0 + + + + 62 + 1000000000 + 0 + + CP3 + CP3-S62 + + + CP3 + CP3-S0 + + + + 63 + 1000000000 + 0 + + CP3 + CP3-S63 + + + CP3 + CP3-S0 + + + + 64 + 1000000000 + 0 + + CP3 + CP3-S64 + + + CP3 + CP3-S0 + + + + 65 + 1000000000 + 0 + + CP3 + CP3-S65 + + + CP3 + CP3-S0 + + + + 66 + 1000000000 + 0 + + CP3 + CP3-S66 + + + CP3 + CP3-S0 + + + + 67 + 1000000000 + 0 + + CP3 + CP3-S67 + + + CP3 + CP3-S0 + + + + 68 + 1000000000 + 0 + + CP3 + CP3-S68 + + + CP3 + CP3-S0 + + + + 69 + 1000000000 + 0 + + CP3 + CP3-S69 + + + CP3 + CP3-S0 + + + + 70 + 1000000000 + 0 + + CP3 + CP3-S70 + + + CP3 + CP3-S0 + + + + 71 + 1000000000 + 0 + + CP3 + CP3-S71 + + + CP3 + CP3-S0 + + + + 72 + 1000000000 + 0 + + CP3 + CP3-S72 + + + CP3 + CP3-S0 + + + + 73 + 1000000000 + 0 + + CP3 + CP3-S73 + + + CP3 + CP3-S0 + + + + 74 + 1000000000 + 0 + + CP3 + CP3-S74 + + + CP3 + CP3-S0 + + + + 75 + 1000000000 + 0 + + CP3 + CP3-S75 + + + CP3 + CP3-S0 + + + + 76 + 1000000000 + 0 + + CP3 + CP3-S76 + + + CP3 + CP3-S0 + + + + 77 + 1000000000 + 0 + + CP3 + CP3-S77 + + + CP3 + CP3-S0 + + + + 78 + 1000000000 + 0 + + CP3 + CP3-S78 + + + CP3 + CP3-S0 + + + + 79 + 1000000000 + 0 + + CP3 + CP3-S79 + + + CP3 + CP3-S0 + + + + 80 + 1000000000 + 0 + + CP3 + CP3-S80 + + + CP3 + CP3-S0 + + + + 81 + 1000000000 + 0 + + CP3-CFP0 + CP3-CFP0-P1 + + + CP3-SFP1 + CP3-SFP1-P1 + + + + 82 + 1000000000 + 0 + + CP3-CFP0 + CP3-CFP0-P1 + + + CP3-SFP2 + CP3-SFP2-P1 + + + + 83 + 1000000000 + 0 + + CP3-CFP0 + CP3-CFP0-P1 + + + CP3-SFP3 + CP3-SFP3-P1 + + + + 84 + 1000000000 + 0 + + CP3-CFP0 + CP3-CFP0-P1 + + + CP3-SFP4 + CP3-SFP4-P1 + + + + + + 1 + + CP1-SFP1 + CP1-SFP1-P1 + + + CP1-SFP2 + CP1-SFP2-P1 + + + CP1-SFP3 + CP1-SFP3-P1 + + + CP1-SFP4 + CP1-SFP4-P1 + + + CP1-CFP0 + CP1-CFP0-P1 + + + CP1 + CP1-S0 + + + CP1 + CP1-S1 + + + CP1 + CP1-S2 + + + CP1 + CP1-S3 + + + CP1 + CP1-S4 + + + CP1 + CP1-S5 + + + CP1 + CP1-S6 + + + CP1 + CP1-S7 + + + CP1 + CP1-S8 + + + CP1 + CP1-S9 + + + CP1 + CP1-S10 + + 100 + + 1 + + CP1-SFP1 + CP1-SFP1-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1-SFP2 + CP1-SFP2-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1-SFP3 + CP1-SFP3-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1-SFP4 + CP1-SFP4-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-port-types:if-OTU2e-ODU2e + org-openroadm-port-types:if-OTU4-ODU4 + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + CP1 + CP1-S0 + CP1-CFP0-P1 + org-openroadm-port-types:if-OTU2e-ODU2e + org-openroadm-port-types:if-OTU4-ODU4 + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + CP1 + CP1-S1 + CP1-SFP1-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S2 + CP1-SFP2-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S3 + CP1-SFP3-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S4 + CP1-SFP4-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S5 + CP1-SFP5-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S6 + CP1-SFP6-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S7 + CP1-SFP7-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S8 + CP1-SFP8-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S9 + CP1-SFP9-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + CP1 + CP1-S10 + CP1-SFP10-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2e + + + + 2 + + CP1-SFP1 + CP1-SFP1-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1-SFP2 + CP1-SFP2-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1-SFP3 + CP1-SFP3-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1-SFP4 + CP1-SFP4-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1-CFP0 + CP1-CFP0-P1 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OTU4-ODU4 + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + CP1 + CP1-S0 + CP1-CFP0-P1 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OTU4-ODU4 + org-openroadm-port-types:if-OCH-OTU4-ODU4 + + + CP1 + CP1-S1 + CP1-SFP1-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S2 + CP1-SFP2-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S3 + CP1-SFP3-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S4 + CP1-SFP4-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S5 + CP1-SFP5-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S6 + CP1-SFP6-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S7 + CP1-SFP7-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S8 + CP1-SFP8-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S9 + CP1-SFP9-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + CP1 + CP1-S10 + CP1-SFP10-P1 + org-openroadm-port-types:if-10GE + org-openroadm-port-types:if-10GE-ODU2 + org-openroadm-port-types:if-OTU2-ODU2 + org-openroadm-port-types:if-OCH-OTU2-ODU2 + + + + + + + + + /d:org-openroadm-device/d:interface[d:name='XPDR1-NETWORK1-OTU'] + interface + + 2018-06-07T13:22:58+00:00 + + opticalPowerOutput + + nearEnd + tx + + 15min + 2.5 + dBm + complete + + + 24Hour + 2.23 + dBm + complete + + + + opticalPowerInput + + nearEnd + rx + + 15min + -45.1 + dBm + complete + + + 24Hour + -49.3 + dBm + complete + + + + + + diff --git a/tests/transportpce_tests/2.2.1/test03_topology.py b/tests/transportpce_tests/2.2.1/test03_topology.py index 8ab6386e8..88853118b 100644 --- a/tests/transportpce_tests/2.2.1/test03_topology.py +++ b/tests/transportpce_tests/2.2.1/test03_topology.py @@ -629,7 +629,7 @@ class TransportPCEtesting(unittest.TestCase): res = response.json() # Tests related to links nbLink = len(res['network'][0]['ietf-network-topology:link']) - self.assertEqual(nbLink, 26) + self.assertEqual(nbLink, 30) for i in range(0, nbLink): link_id = res['network'][0]['ietf-network-topology:link'][i]['link-id'] link_type = res['network'][0]['ietf-network-topology:link'][i]['org-openroadm-common-network:link-type'] diff --git a/tests/transportpce_tests/2.2.1/test10_tapi.py b/tests/transportpce_tests/2.2.1/test10_tapi.py index 25a09c2b2..6721a3501 100644 --- a/tests/transportpce_tests/2.2.1/test10_tapi.py +++ b/tests/transportpce_tests/2.2.1/test10_tapi.py @@ -236,7 +236,7 @@ class TransportTapitesting(unittest.TestCase): response = test_utils.post_request(url, data) self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) res = response.json() - self.assertNotIn("node", res["output"]["topology"], 'Topology should contain no node') + self.assertEqual(len(res["output"]["topology"]["node"]), 1, 'Topology should contain 1 node') self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link') def test_05_disconnect_roadmb(self): @@ -250,7 +250,17 @@ class TransportTapitesting(unittest.TestCase): time.sleep(10) def test_07_check_tapi_topos(self): - self.test_04_check_tapi_topos() + url = "{}/operations/tapi-topology:get-topology-details" + data = { + "tapi-topology:input": { + "tapi-topology:topology-id-or-name": "T0 - Multi-layer topology" + } + } + response = test_utils.post_request(url, data) + self.assertEqual(response.status_code, requests.codes.ok, test_utils.CODE_SHOULD_BE_200) + res = response.json() + self.assertNotIn("node", res["output"]["topology"], 'Topology should contain no node') + self.assertNotIn("link", res["output"]["topology"], 'Topology should contain no link') def test_08_connect_rdma(self): response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION)) diff --git a/tests/transportpce_tests/2.2.1/test12_tapi_full_multi_layer.py b/tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py similarity index 100% rename from tests/transportpce_tests/2.2.1/test12_tapi_full_multi_layer.py rename to tests/transportpce_tests/2.2.1/test13_tapi_full_multi_layer.py diff --git a/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py b/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py new file mode 100644 index 000000000..700dcf08b --- /dev/null +++ b/tests/transportpce_tests/2.2.1/test14_otn_switch_end2end.py @@ -0,0 +1,1520 @@ +#!/usr/bin/env python + +############################################################################## +# Copyright (c) 2021 Orange, Inc. and others. All rights reserved. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# pylint: disable=no-member +# pylint: disable=too-many-public-methods + +import base64 +import unittest +import time +import requests +import sys +sys.path.append('transportpce_tests/common/') +import test_utils + + +class TransportPCEtesting(unittest.TestCase): + + processes = None + WAITING = 20 # nominal value is 300 + NODE_VERSION = '2.2.1' + + cr_serv_sample_data = {"input": { + "sdnc-request-header": { + "request-id": "request-1", + "rpc-action": "service-create", + "request-system-id": "appname" + }, + "service-name": "service-OCH-OTU4-AB", + "common-id": "commonId", + "connection-type": "infrastructure", + "service-a-end": { + "service-rate": "100", + "node-id": "SPDR-SA1", + "service-format": "OTU", + "otu-service-rate": "org-openroadm-otn-common-types:OTU4", + "clli": "NodeSA", + "subrate-eth-sla": { + "subrate-eth-sla": { + "committed-info-rate": "100000", + "committed-burst-size": "64" + } + }, + "tx-direction": { + "port": { + "port-device-name": "SPDR-SA1-XPDR2", + "port-type": "fixed", + "port-name": "XPDR2-NETWORK1", + "port-rack": "000000.00", + "port-shelf": "Chassis#1" + }, + "lgx": { + "lgx-device-name": "Some lgx-device-name", + "lgx-port-name": "Some lgx-port-name", + "lgx-port-rack": "000000.00", + "lgx-port-shelf": "00" + } + }, + "rx-direction": { + "port": { + "port-device-name": "SPDR-SA1-XPDR2", + "port-type": "fixed", + "port-name": "XPDR2-NETWORK1", + "port-rack": "000000.00", + "port-shelf": "Chassis#1" + }, + "lgx": { + "lgx-device-name": "Some lgx-device-name", + "lgx-port-name": "Some lgx-port-name", + "lgx-port-rack": "000000.00", + "lgx-port-shelf": "00" + } + }, + "optic-type": "gray" + }, + "service-z-end": { + "service-rate": "100", + "node-id": "SPDR-SB1", + "service-format": "OTU", + "otu-service-rate": "org-openroadm-otn-common-types:OTU4", + "clli": "NodeSB", + "subrate-eth-sla": { + "subrate-eth-sla": { + "committed-info-rate": "100000", + "committed-burst-size": "64" + } + }, + "tx-direction": { + "port": { + "port-device-name": "SPDR-SB1-XPDR2", + "port-type": "fixed", + "port-name": "XPDR2-NETWORK1", + "port-rack": "000000.00", + "port-shelf": "Chassis#1" + }, + "lgx": { + "lgx-device-name": "Some lgx-device-name", + "lgx-port-name": "Some lgx-port-name", + "lgx-port-rack": "000000.00", + "lgx-port-shelf": "00" + } + }, + "rx-direction": { + "port": { + "port-device-name": "SPDR-SB1-XPDR2", + "port-type": "fixed", + "port-name": "XPDR2-NETWORK1", + "port-rack": "000000.00", + "port-shelf": "Chassis#1" + }, + "lgx": { + "lgx-device-name": "Some lgx-device-name", + "lgx-port-name": "Some lgx-port-name", + "lgx-port-rack": "000000.00", + "lgx-port-shelf": "00" + } + }, + "optic-type": "gray" + }, + "due-date": "2018-06-15T00:00:01Z", + "operator-contact": "pw1234" + } + } + + @classmethod + def setUpClass(cls): + cls.processes = test_utils.start_tpce() + cls.processes = test_utils.start_sims([('spdra', cls.NODE_VERSION), + ('spdrb', cls.NODE_VERSION), + ('spdrc', cls.NODE_VERSION), + ('roadma', cls.NODE_VERSION), + ('roadmb', cls.NODE_VERSION), + ('roadmc', cls.NODE_VERSION)]) + + @classmethod + def tearDownClass(cls): + # pylint: disable=not-an-iterable + for process in cls.processes: + test_utils.shutdown_process(process) + print("all processes killed") + + def setUp(self): + time.sleep(5) + + def test_01_connect_spdrA(self): + response = test_utils.mount_device("SPDR-SA1", ('spdra', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_02_connect_spdrB(self): + response = test_utils.mount_device("SPDR-SB1", ('spdrb', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_03_connect_spdrC(self): + response = test_utils.mount_device("SPDR-SC1", ('spdrc', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_04_connect_rdmA(self): + response = test_utils.mount_device("ROADM-A1", ('roadma', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_05_connect_rdmB(self): + response = test_utils.mount_device("ROADM-B1", ('roadmb', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_06_connect_rdmC(self): + response = test_utils.mount_device("ROADM-C1", ('roadmc', self.NODE_VERSION)) + self.assertEqual(response.status_code, + requests.codes.created, test_utils.CODE_SHOULD_BE_201) + + def test_07_connect_sprdA_2_N1_to_roadmA_PP3(self): + response = test_utils.connect_xpdr_to_rdm_request("SPDR-SA1", "2", "1", + "ROADM-A1", "1", "SRG1-PP3-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Xponder Roadm Link created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_08_connect_roadmA_PP3_to_spdrA_2_N1(self): + response = test_utils.connect_rdm_to_xpdr_request("SPDR-SA1", "2", "1", + "ROADM-A1", "1", "SRG1-PP3-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Roadm Xponder links created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_09_connect_sprdC_2_N1_to_roadmC_PP3(self): + response = test_utils.connect_xpdr_to_rdm_request("SPDR-SC1", "2", "1", + "ROADM-C1", "1", "SRG1-PP3-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Xponder Roadm Link created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_10_connect_roadmC_PP3_to_spdrC_2_N1(self): + response = test_utils.connect_rdm_to_xpdr_request("SPDR-SC1", "2", "1", + "ROADM-C1", "1", "SRG1-PP3-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Roadm Xponder links created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_11_connect_sprdB_2_N1_to_roadmB_PP1(self): + response = test_utils.connect_xpdr_to_rdm_request("SPDR-SB1", "2", "1", + "ROADM-B1", "1", "SRG1-PP1-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Xponder Roadm Link created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_12_connect_roadmB_PP1_to_spdrB_2_N1(self): + response = test_utils.connect_rdm_to_xpdr_request("SPDR-SB1", "2", "1", + "ROADM-B1", "1", "SRG1-PP1-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Roadm Xponder links created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_13_connect_sprdB_2_N2_to_roadmB_PP2(self): + response = test_utils.connect_xpdr_to_rdm_request("SPDR-SB1", "2", "2", + "ROADM-B1", "1", "SRG1-PP2-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Xponder Roadm Link created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_14_connect_roadmB_PP2_to_spdrB_2_N2(self): + response = test_utils.connect_rdm_to_xpdr_request("SPDR-SB1", "2", "2", + "ROADM-B1", "1", "SRG1-PP2-TXRX") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Roadm Xponder links created successfully', + res["output"]["result"]) + time.sleep(2) + + def test_15_add_omsAttributes_ROADMA_ROADMB(self): + # Config ROADMA-ROADMB oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-A1-DEG1-DEG1-TTP-TXRXtoROADM-B1-DEG1-DEG1-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_16_add_omsAttributes_ROADMB_ROADMA(self): + # Config ROADMB-ROADMA oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-B1-DEG1-DEG1-TTP-TXRXtoROADM-A1-DEG1-DEG1-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_17_add_omsAttributes_ROADMB_ROADMC(self): + # Config ROADMB-ROADMC oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-B1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG2-DEG2-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_18_add_omsAttributes_ROADMC_ROADMB(self): + # Config ROADMC-ROADMB oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-C1-DEG2-DEG2-TTP-TXRXtoROADM-B1-DEG2-DEG2-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_19_create_OTS_ROADMA_DEG1(self): + response = test_utils.create_ots_oms_request("ROADM-A1", "DEG1-TTP-TXRX") + time.sleep(10) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Interfaces OTS-DEG1-TTP-TXRX - OMS-DEG1-TTP-TXRX successfully created on node ROADM-A1', + res["output"]["result"]) + + def test_20_create_OTS_ROADMB_DEG1(self): + response = test_utils.create_ots_oms_request("ROADM-B1", "DEG1-TTP-TXRX") + time.sleep(10) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Interfaces OTS-DEG1-TTP-TXRX - OMS-DEG1-TTP-TXRX successfully created on node ROADM-B1', + res["output"]["result"]) + + def test_21_create_OTS_ROADMB_DEG2(self): + response = test_utils.create_ots_oms_request("ROADM-B1", "DEG2-TTP-TXRX") + time.sleep(10) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Interfaces OTS-DEG2-TTP-TXRX - OMS-DEG2-TTP-TXRX successfully created on node ROADM-B1', + res["output"]["result"]) + + def test_22_create_OTS_ROADMC_DEG2(self): + response = test_utils.create_ots_oms_request("ROADM-C1", "DEG2-TTP-TXRX") + time.sleep(10) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Interfaces OTS-DEG2-TTP-TXRX - OMS-DEG2-TTP-TXRX successfully created on node ROADM-C1', + res["output"]["result"]) + + def test_23_calculate_span_loss_base_all(self): + url = "{}/operations/transportpce-olm:calculate-spanloss-base" + data = { + "input": { + "src-type": "all" + } + } + response = test_utils.post_request(url, data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Success', + res["output"]["result"]) + self.assertIn({ + "spanloss": "25.7", + "link-id": "ROADM-C1-DEG1-DEG1-TTP-TXRXtoROADM-A1-DEG2-DEG2-TTP-TXRX" + }, res["output"]["spans"]) + self.assertIn({ + "spanloss": "17.6", + "link-id": "ROADM-A1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG1-DEG1-TTP-TXRX" + }, res["output"]["spans"]) + self.assertIn({ + "spanloss": "23.6", + "link-id": "ROADM-B1-DEG1-DEG1-TTP-TXRXtoROADM-A1-DEG1-DEG1-TTP-TXRX" + }, res["output"]["spans"]) + self.assertIn({ + "spanloss": "23.6", + "link-id": "ROADM-A1-DEG1-DEG1-TTP-TXRXtoROADM-B1-DEG1-DEG1-TTP-TXRX" + }, res["output"]["spans"]) + self.assertIn({ + "spanloss": "25.7", + "link-id": "ROADM-C1-DEG2-DEG2-TTP-TXRXtoROADM-B1-DEG2-DEG2-TTP-TXRX" + }, res["output"]["spans"]) + self.assertIn({ + "spanloss": "17.6", + "link-id": "ROADM-B1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG2-DEG2-TTP-TXRX" + }, res["output"]["spans"]) + time.sleep(5) + + def test_24_check_otn_topology(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nbNode = len(res['network'][0]['node']) + self.assertEqual(nbNode, 9, 'There should be 9 nodes') + self.assertNotIn('ietf-network-topology:link', res['network'][0], + 'otn-topology should have no link') + +# test service-create for OCH-OTU4 service from spdrA to spdrB + def test_25_create_OCH_OTU4_service_AB(self): + response = test_utils.service_create_request(self.cr_serv_sample_data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('PCE calculation in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_26_get_OCH_OTU4_service_AB(self): + response = test_utils.get_service_list_request( + "services/service-OCH-OTU4-AB") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual( + res['services'][0]['administrative-state'], 'inService') + self.assertEqual( + res['services'][0]['service-name'], 'service-OCH-OTU4-AB') + self.assertEqual( + res['services'][0]['connection-type'], 'infrastructure') + self.assertEqual( + res['services'][0]['lifecycle-state'], 'planned') + time.sleep(2) + +# Check correct configuration of devices + def test_27_check_interface_och_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-761:768") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertDictEqual(dict({'name': 'XPDR2-NETWORK1-761:768', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:opticalChannel', + 'supporting-port': 'CP5-CFP-P1' + }, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual( + {u'frequency': 196.1, u'rate': u'org-openroadm-common-types:R100G', + u'transmit-power': -5, u'modulation-format': 'dp-qpsk'}, + res['interface'][0]['org-openroadm-optical-channel-interfaces:och']) + + def test_28_check_interface_OTU4_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-OTU") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-OTU', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'supporting-interface': 'XPDR2-NETWORK1-761:768', + 'type': 'org-openroadm-interfaces:otnOtu', + 'supporting-port': 'CP5-CFP-P1' + } + input_dict_2 = {'tx-sapi': 'exT821pFtOc=', + 'expected-dapi': 'exT821pFtOc=', + 'rate': 'org-openroadm-otn-common-types:OTU4', + 'fec': 'scfec' + } + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual(input_dict_2, + res['interface'][0] + ['org-openroadm-otn-otu-interfaces:otu']) + + def test_29_check_interface_och_spdrB(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK1-761:768") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertDictEqual(dict({'name': 'XPDR2-NETWORK1-761:768', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:opticalChannel', + 'supporting-port': 'CP5-CFP-P1' + }, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual( + {u'frequency': 196.1, u'rate': u'org-openroadm-common-types:R100G', + u'transmit-power': -5, u'modulation-format': 'dp-qpsk'}, + res['interface'][0]['org-openroadm-optical-channel-interfaces:och']) + + def test_30_check_interface_OTU4_spdrB(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK1-OTU") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-OTU', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'supporting-interface': 'XPDR2-NETWORK1-761:768', + 'type': 'org-openroadm-interfaces:otnOtu', + 'supporting-port': 'CP5-CFP-P1' + } + input_dict_2 = {'tx-dapi': 'exT821pFtOc=', + 'expected-sapi': 'exT821pFtOc=', + 'tx-sapi': 'HPQZi9Cb3Aw=', + 'expected-dapi': 'HPQZi9Cb3Aw=', + 'rate': 'org-openroadm-otn-common-types:OTU4', + 'fec': 'scfec' + } + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual(input_dict_2, + res['interface'][0] + ['org-openroadm-otn-otu-interfaces:otu']) + + def test_31_check_no_interface_ODU4_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.conflict) + res = response.json() + self.assertIn( + {"error-type": "application", "error-tag": "data-missing", + "error-message": "Request could not be completed because the relevant data model content does not exist"}, + res['errors']['error']) + + def test_32_check_openroadm_topo_spdra(self): + response = test_utils.get_ordm_topo_request("node/SPDR-SA1-XPDR2") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + ele = res['node'][0]['ietf-network-topology:termination-point'][0] + self.assertEqual('XPDR2-NETWORK1', ele['tp-id']) + self.assertEqual({u'frequency': 196.1, + u'width': 40}, + ele['org-openroadm-network-topology:xpdr-network-attributes']['wavelength']) + self.assertEqual('ROADM-A1-SRG1--SRG1-PP3-TXRX', + ele['org-openroadm-network-topology:xpdr-network-attributes']['tail-equipment-id']) + time.sleep(3) + + def test_33_check_openroadm_topo_ROADMA_SRG(self): + response = test_utils.get_ordm_topo_request("node/ROADM-A1-SRG1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'SRG1-PP3-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + if ele['tp-id'] == 'SRG1-PP2-TXRX': + self.assertNotIn('avail-freq-maps', dict.keys(ele)) + time.sleep(3) + + def test_33_check_openroadm_topo_ROADMA_DEG1(self): + response = test_utils.get_ordm_topo_request("node/ROADM-A1-DEG1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'DEG1-CTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + if ele['tp-id'] == 'DEG1-TTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + time.sleep(3) + + def test_34_check_otn_topo_otu4_links(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nb_links = len(res['network'][0]['ietf-network-topology:link']) + self.assertEqual(nb_links, 2) + listLinkId = ['OTU4-SPDR-SA1-XPDR2-XPDR2-NETWORK1toSPDR-SB1-XPDR2-XPDR2-NETWORK1', + 'OTU4-SPDR-SB1-XPDR2-XPDR2-NETWORK1toSPDR-SA1-XPDR2-XPDR2-NETWORK1'] + for link in res['network'][0]['ietf-network-topology:link']: + self.assertIn(link['link-id'], listLinkId) + self.assertEqual( + link['transportpce-topology:otn-link-type'], 'OTU4') + self.assertEqual( + link['org-openroadm-common-network:link-type'], 'OTN-LINK') + self.assertEqual( + link['org-openroadm-otn-network-topology:available-bandwidth'], 100000) + self.assertEqual( + link['org-openroadm-otn-network-topology:used-bandwidth'], 0) + self.assertIn( + link['org-openroadm-common-network:opposite-link'], listLinkId) + +# test service-create for OCH-OTU4 service from spdrB to spdrC + def test_35_create_OCH_OTU4_service_BC(self): + self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-BC" + self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SB1" + self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSB" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SB1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK2" + self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1" + self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + + response = test_utils.service_create_request(self.cr_serv_sample_data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('PCE calculation in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_36_get_OCH_OTU4_service_BC(self): + response = test_utils.get_service_list_request( + "services/service-OCH-OTU4-BC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual( + res['services'][0]['administrative-state'], 'inService') + self.assertEqual( + res['services'][0]['service-name'], 'service-OCH-OTU4-BC') + self.assertEqual( + res['services'][0]['connection-type'], 'infrastructure') + self.assertEqual( + res['services'][0]['lifecycle-state'], 'planned') + time.sleep(2) + +# Check correct configuration of devices + def test_37_check_interface_och_spdrB(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK2-753:760") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertDictEqual(dict({'name': 'XPDR2-NETWORK1-753:760', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP6-CFP', + 'type': 'org-openroadm-interfaces:opticalChannel', + 'supporting-port': 'CP1-CFP0-P1' + }, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual( + {u'frequency': 196.05, u'rate': u'org-openroadm-common-types:R100G', + u'transmit-power': -5, u'modulation-format': 'dp-qpsk'}, + res['interface'][0]['org-openroadm-optical-channel-interfaces:och']) + + def test_38_check_interface_OTU4_spdrB(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK2-OTU") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK2-OTU', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP6-CFP', + 'supporting-interface': 'XPDR2-NETWORK1-753:760', + 'type': 'org-openroadm-interfaces:otnOtu', + 'supporting-port': 'CP6-CFP-P1' + } + input_dict_2 = {'tx-sapi': 'HPQZi9Cb3A8=', + 'expected-dapi': 'HPQZi9Cb3A8=', + 'rate': 'org-openroadm-otn-common-types:OTU4', + 'fec': 'scfec' + } + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual(input_dict_2, + res['interface'][0] + ['org-openroadm-otn-otu-interfaces:otu']) + + def test_39_check_interface_och_spdrC(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", "interface/XPDR2-NETWORK1-753:760") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertDictEqual(dict({'name': 'XPDR2-NETWORK1-761:768', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:opticalChannel', + 'supporting-port': 'CP5-CFP-P1' + }, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual( + {u'frequency': 196.05, u'rate': u'org-openroadm-common-types:R100G', + u'transmit-power': -5, u'modulation-format': 'dp-qpsk'}, + res['interface'][0]['org-openroadm-optical-channel-interfaces:och']) + + def test_40_check_interface_OTU4_spdrC(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", "interface/XPDR2-NETWORK1-OTU") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-OTU', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'supporting-interface': 'XPDR2-NETWORK1-753:760', + 'type': 'org-openroadm-interfaces:otnOtu', + 'supporting-port': 'CP5-CFP-P1' + } + input_dict_2 = {'tx-dapi': 'HPQZi9Cb3A8=', + 'expected-sapi': 'HPQZi9Cb3A8=', + 'tx-sapi': 'ALx70DYYfGTx', + 'expected-dapi': 'ALx70DYYfGTx', + 'rate': 'org-openroadm-otn-common-types:OTU4', + 'fec': 'scfec' + } + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + + self.assertDictEqual(input_dict_2, + res['interface'][0] + ['org-openroadm-otn-otu-interfaces:otu']) + + def test_41_check_no_interface_ODU4_spdrB(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.conflict) + res = response.json() + self.assertIn( + {"error-type": "application", "error-tag": "data-missing", + "error-message": "Request could not be completed because the relevant data model content does not exist"}, + res['errors']['error']) + + def test_42_check_openroadm_topo_spdrB(self): + response = test_utils.get_ordm_topo_request("node/SPDR-SB1-XPDR2") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'XPDR2-NETWORK1': + self.assertEqual({u'frequency': 196.1, + u'width': 40}, + ele['org-openroadm-network-topology:xpdr-network-attributes']['wavelength']) + self.assertEqual('ROADM-B1-SRG1--SRG1-PP1-TXRX', + ele['org-openroadm-network-topology:xpdr-network-attributes']['tail-equipment-id']) + elif ele['tp-id'] == 'XPDR2-NETWORK2': + self.assertEqual({u'frequency': 196.05, + u'width': 40}, + ele['org-openroadm-network-topology:xpdr-network-attributes']['wavelength']) + self.assertEqual('ROADM-B1-SRG1--SRG1-PP2-TXRX', + ele['org-openroadm-network-topology:xpdr-network-attributes']['tail-equipment-id']) + else: + print("ele = {}".format(ele)) + self.assertNotIn('org-openroadm-network-topology:xpdr-network-attributes', dict.keys(ele)) + time.sleep(3) + + def test_43_check_openroadm_topo_ROADMB_SRG1(self): + response = test_utils.get_ordm_topo_request("node/ROADM-B1-SRG1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available") + self.assertEqual(freq_map_array[93], 255, "Lambda 3 should be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'SRG1-PP1-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 0, "Lambda 1 should not be available") + if ele['tp-id'] == 'SRG1-PP2-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available") + if ele['tp-id'] == 'SRG1-PP3-TXRX': + self.assertNotIn('avail-freq-maps', dict.keys(ele)) + time.sleep(3) + + def test_44_check_openroadm_topo_ROADMB_DEG2(self): + response = test_utils.get_ordm_topo_request("node/ROADM-B1-DEG2") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'DEG2-CTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[94], 0, "Lambda 2 should not be available") + if ele['tp-id'] == 'DEG2-TTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[94], 0, "Lambda 1 should not be available") + time.sleep(3) + + def test_45_check_otn_topo_otu4_links(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nb_links = len(res['network'][0]['ietf-network-topology:link']) + self.assertEqual(nb_links, 4) + listLinkId = ['OTU4-SPDR-SA1-XPDR2-XPDR2-NETWORK1toSPDR-SB1-XPDR2-XPDR2-NETWORK1', + 'OTU4-SPDR-SB1-XPDR2-XPDR2-NETWORK1toSPDR-SA1-XPDR2-XPDR2-NETWORK1', + 'OTU4-SPDR-SB1-XPDR2-XPDR2-NETWORK2toSPDR-SC1-XPDR2-XPDR2-NETWORK1', + 'OTU4-SPDR-SC1-XPDR2-XPDR2-NETWORK1toSPDR-SB1-XPDR2-XPDR2-NETWORK2'] + for link in res['network'][0]['ietf-network-topology:link']: + self.assertIn(link['link-id'], listLinkId) + self.assertEqual( + link['transportpce-topology:otn-link-type'], 'OTU4') + self.assertEqual( + link['org-openroadm-common-network:link-type'], 'OTN-LINK') + self.assertEqual( + link['org-openroadm-otn-network-topology:available-bandwidth'], 100000) + self.assertEqual( + link['org-openroadm-otn-network-topology:used-bandwidth'], 0) + self.assertIn( + link['org-openroadm-common-network:opposite-link'], listLinkId) + +# test service-create for 100GE service from spdrA to spdrC via spdrB + def test_46_create_100GE_service_ABC(self): + self.cr_serv_sample_data["input"]["service-name"] = "service-100GE-ABC" + self.cr_serv_sample_data["input"]["connection-type"] = "service" + self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet" + self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SA1" + self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSA" + del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet" + self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1" + self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC" + del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + + response = test_utils.service_create_request(self.cr_serv_sample_data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('PCE calculation in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_47_get_100GE_service_ABC(self): + response = test_utils.get_service_list_request( + "services/service-100GE-ABC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual( + res['services'][0]['administrative-state'], 'inService') + self.assertEqual( + res['services'][0]['service-name'], 'service-100GE-ABC') + self.assertEqual( + res['services'][0]['connection-type'], 'service') + self.assertEqual( + res['services'][0]['lifecycle-state'], 'planned') + time.sleep(2) + + def test_48_check_interface_100GE_CLIENT_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-CLIENT1-ETHERNET") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict = {'name': 'XPDR2-CLIENT1-ETHERNET', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP2-QSFP1', + 'type': 'org-openroadm-interfaces:ethernetCsmacd', + 'supporting-port': 'CP2-QSFP1-P1' + } + self.assertDictEqual(dict(input_dict, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual( + {u'speed': 100000, + u'fec': 'off'}, + res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet']) + + def test_49_check_interface_ODU4_CLIENT_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-CLIENT1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP2-QSFP1', + 'supporting-interface': 'XPDR2-CLIENT1-ETHERNET', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP2-QSFP1-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'terminated'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_50_check_interface_ODU4_NETWORK_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP5-CFP-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'monitored'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_51_check_ODU4_connection_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", + "odu-connection/XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = { + 'connection-name': + 'XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4', + 'direction': 'bidirectional' + } + + self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]), + res['odu-connection'][0]) + self.assertDictEqual({u'dst-if': u'XPDR2-NETWORK1-ODU4'}, + res['odu-connection'][0]['destination']) + self.assertDictEqual({u'src-if': u'XPDR2-CLIENT1-ODU4'}, + res['odu-connection'][0]['source']) + + def test_52_check_interface_100GE_CLIENT_spdrc(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", "interface/XPDR2-CLIENT1-ETHERNET") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict = {'name': 'XPDR2-CLIENT1-ETHERNET', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP2-QSFP1', + 'type': 'org-openroadm-interfaces:ethernetCsmacd', + 'supporting-port': 'CP2-QSFP1-P1' + } + self.assertDictEqual(dict(input_dict, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual( + {u'speed': 100000, + u'fec': 'off'}, + res['interface'][0]['org-openroadm-ethernet-interfaces:ethernet']) + + def test_53_check_interface_ODU4_CLIENT_spdrc(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", "interface/XPDR2-CLIENT1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-CLIENT1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP2-QSFP1', + 'supporting-interface': 'XPDR2-CLIENT1-ETHERNET', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP2-QSFP1-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-TTP-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'terminated'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_54_check_interface_ODU4_NETWORK_spdrc(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP5-CFP-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'monitored'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_55_check_ODU4_connection_spdrc(self): + response = test_utils.check_netconf_node_request( + "SPDR-SC1", + "odu-connection/XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = { + 'connection-name': + 'XPDR2-CLIENT1-ODU4-x-XPDR2-NETWORK1-ODU4', + 'direction': 'bidirectional' + } + + self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]), + res['odu-connection'][0]) + self.assertDictEqual({u'dst-if': u'XPDR2-NETWORK1-ODU4'}, + res['odu-connection'][0]['destination']) + self.assertDictEqual({u'src-if': u'XPDR2-CLIENT1-ODU4'}, + res['odu-connection'][0]['source']) + + def test_56_check_interface_ODU4_NETWORK1_spdrb(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP5-CFP', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP5-CFP-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'monitored'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_57_check_interface_ODU4_NETWORK2_spdrb(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", "interface/XPDR2-NETWORK2-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = {'name': 'XPDR2-NETWORK1-ODU4', + 'administrative-state': 'inService', + 'supporting-circuit-pack-name': 'CP6-CFP', + 'type': 'org-openroadm-interfaces:otnOdu', + 'supporting-port': 'CP6-CFP-P1'} + input_dict_2 = { + 'odu-function': 'org-openroadm-otn-common-types:ODU-CTP', + 'rate': 'org-openroadm-otn-common-types:ODU4', + 'monitoring-mode': 'monitored'} + + self.assertDictEqual(dict(input_dict_1, **res['interface'][0]), + res['interface'][0]) + self.assertDictEqual(dict(input_dict_2, + **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']), + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']) + self.assertDictEqual( + {u'payload-type': u'07', u'exp-payload-type': u'07'}, + res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']['opu']) + + def test_58_check_ODU4_connection_spdrb(self): + response = test_utils.check_netconf_node_request( + "SPDR-SB1", + "odu-connection/XPDR2-NETWORK1-ODU4-x-XPDR2-NETWORK2-ODU4") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + input_dict_1 = { + 'connection-name': + 'XPDR2-NETWORK1-ODU4-x-XPDR2-NETWORK2-ODU4', + 'direction': 'bidirectional' + } + + self.assertDictEqual(dict(input_dict_1, **res['odu-connection'][0]), + res['odu-connection'][0]) + self.assertDictEqual({u'dst-if': u'XPDR2-NETWORK2-ODU4'}, + res['odu-connection'][0]['destination']) + self.assertDictEqual({u'src-if': u'XPDR2-NETWORK1-ODU4'}, + res['odu-connection'][0]['source']) + + def test_59_check_otn_topo_links(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nb_links = len(res['network'][0]['ietf-network-topology:link']) + self.assertEqual(nb_links, 4) + for link in res['network'][0]['ietf-network-topology:link']: + self.assertEqual( + link['org-openroadm-otn-network-topology:available-bandwidth'], 0) + self.assertEqual( + link['org-openroadm-otn-network-topology:used-bandwidth'], 100000) + + def test_60_delete_service_100GE_ABC(self): + response = test_utils.service_delete_request("service-100GE-ABC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Renderer service delete in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_61_check_service_list(self): + response = test_utils.get_service_list_request("") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual(len(res['service-list']['services']), 2) + time.sleep(2) + + def test_62_check_no_ODU4_connection_spdra(self): + response = test_utils.check_netconf_node_request("SPDR-SA1", "") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertNotIn(['odu-connection'][0], res['org-openroadm-device']) + time.sleep(1) + + def test_63_check_no_interface_ODU4_NETWORK_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-ODU4") + self.assertEqual(response.status_code, requests.codes.conflict) + + def test_64_check_no_interface_ODU4_CLIENT_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-CLIENT1-ODU4") + self.assertEqual(response.status_code, requests.codes.conflict) + + def test_65_check_no_interface_100GE_CLIENT_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-CLIENT1-ETHERNET") + self.assertEqual(response.status_code, requests.codes.conflict) + + def test_66_check_otn_topo_links(self): + self.test_45_check_otn_topo_otu4_links() + + def test_67_delete_OCH_OTU4_service_AB(self): + response = test_utils.service_delete_request("service-OCH-OTU4-AB") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Renderer service delete in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_68_delete_OCH_OTU4_service_BC(self): + response = test_utils.service_delete_request("service-OCH-OTU4-BC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Renderer service delete in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_69_get_no_service(self): + response = test_utils.get_service_list_request("") + self.assertEqual(response.status_code, requests.codes.conflict) + res = response.json() + self.assertIn( + {"error-type": "application", "error-tag": "data-missing", + "error-message": "Request could not be completed because the relevant data model content does not exist"}, + res['errors']['error']) + time.sleep(1) + + def test_70_check_no_interface_OTU4_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-OTU") + self.assertEqual(response.status_code, requests.codes.conflict) + + def test_71_check_no_interface_OCH_spdra(self): + response = test_utils.check_netconf_node_request( + "SPDR-SA1", "interface/XPDR2-NETWORK1-761:768") + self.assertEqual(response.status_code, requests.codes.conflict) + + def test_72_getLinks_OtnTopology(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertNotIn('ietf-network-topology:link', res['network'][0]) + + def test_73_check_openroadm_topo_spdra(self): + response = test_utils.get_ordm_topo_request("node/SPDR-SA1-XPDR2") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + tp = res['node'][0]['ietf-network-topology:termination-point'][0] + self.assertEqual('XPDR2-NETWORK1', tp['tp-id']) + self.assertNotIn('wavelength', dict.keys( + tp[u'org-openroadm-network-topology:xpdr-network-attributes'])) + time.sleep(3) + + def test_74_check_openroadm_topo_ROADMB_SRG1(self): + response = test_utils.get_ordm_topo_request("node/ROADM-B1-SRG1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:srg-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + self.assertEqual(freq_map_array[94], 255, "Lambda 1 should be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'SRG1-PP1-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + if ele['tp-id'] == 'SRG1-PP2-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:pp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[94], 255, "Lambda 1 should be available") + time.sleep(3) + + def test_75_check_openroadm_topo_ROADMB_DEG1(self): + response = test_utils.get_ordm_topo_request("node/ROADM-B1-DEG1") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'DEG1-CTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + if ele['tp-id'] == 'DEG1-TTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + time.sleep(3) + + def test_76_check_openroadm_topo_ROADMB_DEG2(self): + response = test_utils.get_ordm_topo_request("node/ROADM-B1-DEG2") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + freq_map = base64.b64decode( + res['node'][0]['org-openroadm-network-topology:degree-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + liste_tp = res['node'][0]['ietf-network-topology:termination-point'] + for ele in liste_tp: + if ele['tp-id'] == 'DEG2-CTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:ctp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + if ele['tp-id'] == 'DEG2-TTP-TXRX': + freq_map = base64.b64decode( + ele['org-openroadm-network-topology:tx-ttp-attributes']['avail-freq-maps'][0]['freq-map']) + freq_map_array = [int(x) for x in freq_map] + self.assertEqual(freq_map_array[95], 255, "Lambda 1 should be available") + time.sleep(3) + + def test_77_disconnect_xponders_from_roadm(self): + url = "{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:link/" + response = test_utils.get_ordm_topo_request("") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + links = res['network'][0]['ietf-network-topology:link'] + for link in links: + if ((link["org-openroadm-common-network:link-type"] == "XPONDER-OUTPUT" or + link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT") + and ('SPDR-SB1' in link['link-id'] or 'ROADM-B1' in link['link-id'])): + link_name = link["link-id"] + response = test_utils.delete_request(url+link_name) + self.assertEqual(response.status_code, requests.codes.ok) + + def test_78_disconnect_spdrB(self): + response = test_utils.unmount_device("SPDR-SB1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + def test_79_disconnect_roadmB(self): + response = test_utils.unmount_device("ROADM-B1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + def test_80_remove_roadm_to_roadm_links(self): + url = "{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:link/" + response = test_utils.get_ordm_topo_request("") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + links = res['network'][0]['ietf-network-topology:link'] + for link in links: + if (link["org-openroadm-common-network:link-type"] == "ROADM-TO-ROADM" + and 'ROADM-B1' in link['link-id']): + link_name = link["link-id"] + response = test_utils.delete_request(url+link_name) + self.assertEqual(response.status_code, requests.codes.ok) + + def test_81_add_omsAttributes_ROADMA_ROADMC(self): + # Config ROADMA-ROADMC oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-A1-DEG2-DEG2-TTP-TXRXtoROADM-C1-DEG1-DEG1-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_82_add_omsAttributes_ROADMC_ROADMA(self): + # Config ROADMC-ROADMA oms-attributes + data = {"span": { + "auto-spanloss": "true", + "spanloss-base": 11.4, + "spanloss-current": 12, + "engineered-spanloss": 12.2, + "link-concatenation": [{ + "SRLG-Id": 0, + "fiber-type": "smf", + "SRLG-length": 100000, + "pmd": 0.5}]}} + response = test_utils.add_oms_attr_request( + "ROADM-C1-DEG1-DEG1-TTP-TXRXtoROADM-A1-DEG2-DEG2-TTP-TXRX", data) + self.assertEqual(response.status_code, requests.codes.created) + + def test_83_create_OCH_OTU4_service_AC(self): + self.cr_serv_sample_data["input"]["service-name"] = "service-OCH-OTU4-AC" + self.cr_serv_sample_data["input"]["connection-type"] = "infrastructure" + self.cr_serv_sample_data["input"]["service-a-end"]["service-rate"] = "100" + self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "OTU" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4" + self.cr_serv_sample_data["input"]["service-z-end"]["service-rate"] = "100" + self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "OTU" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-NETWORK1" + self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] = "org-openroadm-otn-common-types:OTU4" + response = test_utils.service_create_request(self.cr_serv_sample_data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('PCE calculation in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_84_get_OCH_OTU4_service_AC(self): + response = test_utils.get_service_list_request( + "services/service-OCH-OTU4-AC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual( + res['services'][0]['administrative-state'], 'inService') + self.assertEqual( + res['services'][0]['service-name'], 'service-OCH-OTU4-AC') + self.assertEqual( + res['services'][0]['connection-type'], 'infrastructure') + self.assertEqual( + res['services'][0]['lifecycle-state'], 'planned') + time.sleep(2) + +# test service-create for 100GE service from spdrA to spdrC via spdrB + def test_85_create_100GE_service_AC(self): + self.cr_serv_sample_data["input"]["service-name"] = "service-100GE-AC" + self.cr_serv_sample_data["input"]["connection-type"] = "service" + self.cr_serv_sample_data["input"]["service-a-end"]["service-format"] = "Ethernet" + self.cr_serv_sample_data["input"]["service-a-end"]["node-id"] = "SPDR-SA1" + self.cr_serv_sample_data["input"]["service-a-end"]["clli"] = "NodeSA" + del self.cr_serv_sample_data["input"]["service-a-end"]["otu-service-rate"] + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SA1-XPDR2" + self.cr_serv_sample_data["input"]["service-a-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-z-end"]["service-format"] = "Ethernet" + self.cr_serv_sample_data["input"]["service-z-end"]["node-id"] = "SPDR-SC1" + self.cr_serv_sample_data["input"]["service-z-end"]["clli"] = "NodeSC" + del self.cr_serv_sample_data["input"]["service-z-end"]["otu-service-rate"] + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["tx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-device-name"] = "SPDR-SC1-XPDR2" + self.cr_serv_sample_data["input"]["service-z-end"]["rx-direction"]["port"]["port-name"] = "XPDR2-CLIENT1" + + response = test_utils.service_create_request(self.cr_serv_sample_data) + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('PCE calculation in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_86_get_100GE_service_AC(self): + response = test_utils.get_service_list_request("services/service-100GE-AC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual( + res['services'][0]['administrative-state'], 'inService') + self.assertEqual( + res['services'][0]['service-name'], 'service-100GE-AC') + self.assertEqual( + res['services'][0]['connection-type'], 'service') + self.assertEqual( + res['services'][0]['lifecycle-state'], 'planned') + time.sleep(2) + + def test_87_check_configuration_spdra(self): + self.test_48_check_interface_100GE_CLIENT_spdra() + self.test_49_check_interface_ODU4_CLIENT_spdra() + self.test_50_check_interface_ODU4_NETWORK_spdra() + self.test_51_check_ODU4_connection_spdra() + + + def test_88_check_configuration_spdrc(self): + self.test_52_check_interface_100GE_CLIENT_spdrc() + self.test_53_check_interface_ODU4_CLIENT_spdrc() + self.test_54_check_interface_ODU4_NETWORK_spdrc() + self.test_55_check_ODU4_connection_spdrc() + + def test_89_check_otn_topo_links(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nb_links = len(res['network'][0]['ietf-network-topology:link']) + self.assertEqual(nb_links, 2) + for link in res['network'][0]['ietf-network-topology:link']: + self.assertEqual( + link['org-openroadm-otn-network-topology:available-bandwidth'], 0) + self.assertEqual( + link['org-openroadm-otn-network-topology:used-bandwidth'], 100000) + + def test_90_delete_100GE_service_AC(self): + response = test_utils.service_delete_request("service-100GE-AC") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertIn('Renderer service delete in progress', + res['output']['configuration-response-common']['response-message']) + time.sleep(self.WAITING) + + def test_91_check_service_list(self): + response = test_utils.get_service_list_request("") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + self.assertEqual(len(res['service-list']['services']), 1) + time.sleep(2) + + def test_92_check_configuration_spdra(self): + self.test_62_check_no_ODU4_connection_spdra() + self.test_63_check_no_interface_ODU4_NETWORK_spdra() + self.test_64_check_no_interface_ODU4_CLIENT_spdra() + self.test_65_check_no_interface_100GE_CLIENT_spdra() + + def test_93_check_otn_topo_links(self): + response = test_utils.get_otn_topo_request() + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + nb_links = len(res['network'][0]['ietf-network-topology:link']) + self.assertEqual(nb_links, 2) + for link in res['network'][0]['ietf-network-topology:link']: + self.assertEqual( + link['org-openroadm-otn-network-topology:available-bandwidth'], 100000) + self.assertEqual( + link['org-openroadm-otn-network-topology:used-bandwidth'], 0) + + def test_94_disconnect_xponders_from_roadm(self): + url = "{}/config/ietf-network:networks/network/openroadm-topology/ietf-network-topology:link/" + response = test_utils.get_ordm_topo_request("") + self.assertEqual(response.status_code, requests.codes.ok) + res = response.json() + links = res['network'][0]['ietf-network-topology:link'] + for link in links: + if (link["org-openroadm-common-network:link-type"] == "XPONDER-OUTPUT" or + link["org-openroadm-common-network:link-type"] == "XPONDER-INPUT"): + link_name = link["link-id"] + response = test_utils.delete_request(url+link_name) + self.assertEqual(response.status_code, requests.codes.ok) + + def test_95_disconnect_spdrA(self): + response = test_utils.unmount_device("SPDR-SA1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + def test_96_disconnect_spdrC(self): + response = test_utils.unmount_device("SPDR-SC1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + def test_97_disconnect_roadmA(self): + response = test_utils.unmount_device("ROADM-A1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + def test_98_disconnect_roadmC(self): + response = test_utils.unmount_device("ROADM-C1") + self.assertEqual(response.status_code, requests.codes.ok, + test_utils.CODE_SHOULD_BE_200) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/tests/transportpce_tests/common/simulators.py b/tests/transportpce_tests/common/simulators.py index e361ea53f..cb7294af6 100644 --- a/tests/transportpce_tests/common/simulators.py +++ b/tests/transportpce_tests/common/simulators.py @@ -24,6 +24,7 @@ SIMS = { ('xpdrc', '2.2.1'): {'port': '17844', 'configfile': 'oper-XPDRC.xml', 'logfile': 'xpdrc-221.log'}, ('spdra', '2.2.1'): {'port': '17845', 'configfile': 'oper-SPDRA.xml', 'logfile': 'spdra-221.log'}, ('spdrc', '2.2.1'): {'port': '17846', 'configfile': 'oper-SPDRC.xml', 'logfile': 'spdrc-221.log'}, + ('spdrb', '2.2.1'): {'port': '17848', 'configfile': 'oper-SPDRB.xml', 'logfile': 'spdrb-221.log'}, ('xpdra', '7.1'): {'port': '17850', 'configfile': 'oper-XPDRA.xml', 'logfile': 'xpdra-71.log'}, ('roadma', '7.1'): {'port': '17851', 'configfile': 'oper-ROADMA.xml', 'logfile': 'roadma-71.log'}, ('roadmb', '7.1'): {'port': '17852', 'configfile': 'oper-ROADMB.xml', 'logfile': 'roadmb-71.log'}, -- 2.36.6