Populate OM in portMapping and Topo 87/112687/19
authororenais <olivier.renais@orange.com>
Mon, 22 Jul 2024 09:59:20 +0000 (11:59 +0200)
committerorenais <olivier.renais@orange.com>
Thu, 31 Oct 2024 09:29:26 +0000 (10:29 +0100)
- Populate Operational mode in Port Mapping from profile
  (for device R7.1)
- Populate rate in PortMapping from supported Interface
  capabilities (All device versions
  & supported Operational mode (device R7.1)
- Propagate Operational mode from PortMapping to topology.
- Adjust tox-ini to have tests121 performed sequentially
  after tests221 to avoid failures on the gate.

JIRA: TRNSPRTPCE-708
Signed-off-by: orenais <olivier.renais@orange.com>
Change-Id: Icbca02a277d60b340963b3932fec90dc02ece3f0

15 files changed:
common/src/main/java/org/opendaylight/transportpce/common/mapping/MappingUtilsImpl.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingUtils.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion121.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion710.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/util/OpenRoadmTopology.java
tests/transportpce_tests/1.2.1/test01_portmapping.py
tests/transportpce_tests/1.2.1/test04_renderer_service_path_nominal.py
tests/transportpce_tests/2.2.1/test01_portmapping.py
tests/transportpce_tests/2.2.1/test06_renderer_service_path_nominal.py
tests/transportpce_tests/2.2.1/test07_otn_renderer.py
tests/transportpce_tests/7.1/test01_portmapping.py
tests/transportpce_tests/7.1/test02_otn_renderer.py
tests/transportpce_tests/7.1/test03_renderer_or_modes.py
tox.ini

index b91104798d9a9f18bb2a812730fe7cd97b3cb05d..19e3259600f9c97a1047ceee7d7e537bae505094 100644 (file)
@@ -25,15 +25,39 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmappi
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.network.nodes.NodeInfo;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If100GE;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If100GEODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If100GEOduflexgfp;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If10GE;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If10GEODU2;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If10GEODU2e;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If10GEOduflexgfp;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If1GE;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If1GEODU0;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If200GE;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If200GEOduflexcbr;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If25GEOduflexcbr;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If400GE;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If400GEOduflexcbr;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If400GEOdufleximp;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If40GE;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If40GEODU3;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.If40GEOduflexgfp;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCH;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU1ODU1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU2EODU2E;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU2ODU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU3ODU3;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU4ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU4ODU4Regen;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOCHOTU4ODU4Uniregen;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTU1ODU1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTU2ODU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTU3ODU3;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTU4ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTUCnODUCn;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTUCnODUCnRegen;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOTUCnODUCnUniregen;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOtsiOtsigroup;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.IfOtsiOtucnOducn;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.SupportedIfCapability;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.osgi.service.component.annotations.Activate;
@@ -49,28 +73,154 @@ public final class MappingUtilsImpl implements MappingUtils {
 
     private static final ImmutableMap<String, SupportedIfCapability> CAP_TYPE_MAP =
         ImmutableMap.<String, SupportedIfCapability>builder()
-            .put("If400GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-400GE}", If400GE.VALUE)
-            .put("IfOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OTU4-ODU4}",
-                    IfOTU4ODU4.VALUE)
-            .put("IfOtsiOtsigroup{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-otsi-otsigroup}",
-                IfOtsiOtsigroup.VALUE)
-            .put("IfOCH{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH}", IfOCH.VALUE)
-            .put("IfOCHOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU4-ODU4}",
-                IfOCHOTU4ODU4.VALUE)
-            .put("IfOCHOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU4-ODU4}",
-                IfOCHOTU4ODU4.VALUE)
+            .put("If1GE{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-1GE}", If1GE.VALUE)
+            .put("If1GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-1GE}", If1GE.VALUE)
+            .put("If1GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-1GE}", If1GE.VALUE)
             .put("If1GEODU0{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-1GE-ODU0}", If1GEODU0.VALUE)
+            .put("If1GEODU0{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-1GE-ODU0}", If1GEODU0.VALUE)
+            .put("If1GEODU0{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-1GE-ODU0}", If1GEODU0.VALUE)
             .put("If10GE{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-10GE}", If10GE.VALUE)
+            .put("If10GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-10GE}", If10GE.VALUE)
+            .put("If10GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-10GE}", If10GE.VALUE)
             .put("If10GEODU2{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-10GE-ODU2}",
                 If10GEODU2.VALUE)
+            .put("If10GEODU2{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-10GE-ODU2}",
+                If10GEODU2.VALUE)
+            .put("If10GEODU2{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-10GE-ODU2}",
+                If10GEODU2.VALUE)
             .put("If10GEODU2e{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-10GE-ODU2e}",
                 If10GEODU2e.VALUE)
+            .put("If10GEODU2e{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-10GE-ODU2e}",
+                If10GEODU2e.VALUE)
+            .put("If10GEODU2e{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-10GE-ODU2e}",
+                If10GEODU2e.VALUE)
+            .put("If10GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-10GE-oduflexgfp}",
+                If10GEOduflexgfp.VALUE)
+            .put("If10GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-10GE-oduflexgfp}",
+                If10GEOduflexgfp.VALUE)
+            .put("If25GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-25GE-oduflexcbr}",
+                If25GEOduflexcbr.VALUE)
+            .put("If25GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-25GE-oduflexcbr}",
+                If25GEOduflexcbr.VALUE)
+            .put("If40GE{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-40GE}", If40GE.VALUE)
+            .put("If40GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-40GE}", If40GE.VALUE)
+            .put("If40GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-40GE}", If40GE.VALUE)
+            .put("If40GEODU3{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-40GE-ODU3}",
+                If40GEODU3.VALUE)
+            .put("If40GEODU3{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-40GE-ODU3}",
+                If40GEODU3.VALUE)
+            .put("If40GEODU3{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-40GE-ODU3}",
+                If40GEODU3.VALUE)
+            .put("If40GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-40GE-oduflexgfp}",
+                If40GEOduflexgfp.VALUE)
+            .put("If40GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-40GE-oduflexgfp}",
+                If40GEOduflexgfp.VALUE)
             .put("If100GE{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-100GE}", If100GE.VALUE)
             .put("If100GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-100GE}", If100GE.VALUE)
+            .put("If100GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-100GE}", If100GE.VALUE)
             .put("If100GEODU4{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-100GE-ODU4}",
                 If100GEODU4.VALUE)
             .put("If100GEODU4{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-100GE-ODU4}",
                 If100GEODU4.VALUE)
+            .put("If100GEODU4{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-100GE-ODU4}",
+                If100GEODU4.VALUE)
+            .put("If100GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-100GE-oduflexgfp}",
+                If100GEOduflexgfp.VALUE)
+            .put("If100GEoduflexgfp{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-100GE-oduflexgfp}",
+                If100GEOduflexgfp.VALUE)
+            .put("If200GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-200GE}", If200GE.VALUE)
+            .put("If200GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-200GE}", If200GE.VALUE)
+            .put("If200GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-200GE-oduflexcbr}",
+                If200GEOduflexcbr.VALUE)
+            .put("If200GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-200GE-oduflexcbr}",
+                If200GEOduflexcbr.VALUE)
+            .put("If400GE{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-400GE}", If400GE.VALUE)
+            .put("If400GE{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-400GE}", If400GE.VALUE)
+            .put("If400GEodufleximp{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-400GE-odufleximp}",
+                If400GEOdufleximp.VALUE)
+            .put("If400GEodufleximp{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-400GE-odufleximp}",
+                If400GEOdufleximp.VALUE)
+            .put("If400GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-400GE-oduflexcbr}",
+                If400GEOduflexcbr.VALUE)
+            .put("If400GEoduflexcbr{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-400GE-oduflexcbr}",
+                If400GEOduflexcbr.VALUE)
+            .put("IfOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OTU1-ODU1}",
+                IfOTU1ODU1.VALUE)
+            .put("IfOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OTU1-ODU1}",
+                IfOTU1ODU1.VALUE)
+            .put("IfOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OTU1-ODU1}",
+                IfOTU1ODU1.VALUE)
+            .put("IfOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OTU2-ODU2}",
+                IfOTU2ODU2.VALUE)
+            .put("IfOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OTU2-ODU2}",
+                IfOTU2ODU2.VALUE)
+            .put("IfOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OTU2-ODU2}",
+                IfOTU2ODU2.VALUE)
+            .put("IfOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OTU3-ODU3}",
+                IfOTU3ODU3.VALUE)
+            .put("IfOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OTU3-ODU3}",
+                IfOTU3ODU3.VALUE)
+            .put("IfOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OTU3-ODU3}",
+                IfOTU3ODU3.VALUE)
+            .put("IfOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OTU4-ODU4}",
+                IfOTU4ODU4.VALUE)
+            .put("IfOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OTU4-ODU4}",
+                IfOTU4ODU4.VALUE)
+            .put("IfOtsiOtsigroup{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-otsi-otsigroup}",
+                IfOtsiOtsigroup.VALUE)
+            .put("IfOtsiOtsigroup{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-otsi-otsigroup}",
+                IfOtsiOtsigroup.VALUE)
+            .put("IfOCH{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH}", IfOCH.VALUE)
+            .put("IfOCH{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH}", IfOCH.VALUE)
+            .put("IfOCH{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH}", IfOCH.VALUE)
+            .put("IfOchOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU1-ODU1}",
+                IfOCHOTU1ODU1.VALUE)
+            .put("IfOchOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU1-ODU1}",
+                IfOCHOTU1ODU1.VALUE)
+            .put("IfOchOTU1ODU1{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH-OTU1-ODU1}",
+                IfOCHOTU1ODU1.VALUE)
+            .put("IfOchOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU2-ODU2}",
+                IfOCHOTU2ODU2.VALUE)
+            .put("IfOchOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU2-ODU2}",
+                IfOCHOTU2ODU2.VALUE)
+            .put("IfOchOTU2ODU2{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH-OTU2-ODU2}",
+                IfOCHOTU2ODU2.VALUE)
+            .put("IfOchOTU2EODU2E{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU2E-ODU2E}",
+                IfOCHOTU2EODU2E.VALUE)
+            .put("IfOchOTU2EODU2E{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU2E-ODU2E}",
+                IfOCHOTU2EODU2E.VALUE)
+            .put("IfOchOTU2EODU2E{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH-OTU2E-ODU2E}",
+                IfOCHOTU2EODU2E.VALUE)
+            .put("IfOchOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU3-ODU3}",
+                IfOCHOTU3ODU3.VALUE)
+            .put("IfOchOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU3-ODU3}",
+                IfOCHOTU3ODU3.VALUE)
+            .put("IfOchOTU3ODU3{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH-OTU3-ODU3}",
+                IfOCHOTU3ODU3.VALUE)
+            .put("IfOCHOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2018-10-19)if-OCH-OTU4-ODU4}",
+                IfOCHOTU4ODU4.VALUE)
+            .put("IfOCHOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2020-03-27)if-OCH-OTU4-ODU4}",
+                IfOCHOTU4ODU4.VALUE)
+            .put("IfOCHOTU4ODU4{qname=(http://org/openroadm/port/types?revision=2023-05-26)if-OCH-OTU4-ODU4}",
+                IfOCHOTU4ODU4.VALUE)
+            .put("IfOCHOTU4ODU4regen{qname=(http://org/openroadm/port/types?revision=2018-10-19)"
+                + "if-OCH-OTU4-ODU4-regen}", IfOCHOTU4ODU4Regen.VALUE)
+            .put("IfOCHOTU4ODU4uniregen{qname=(http://org/openroadm/port/types?revision=2018-10-19)"
+                + "if-OCH-OTU4-ODU4-uniregen}", IfOCHOTU4ODU4Uniregen.VALUE)
+            .put("IfOTUCnODUCn{qname=(http://org/openroadm/port/types?revision=2020-03-27)"
+                + "if-OTUCn-ODUCn}", IfOTUCnODUCn.VALUE)
+            .put("IfOTUCnODUCn{qname=(http://org/openroadm/port/types?revision=2023-05-26)"
+                + "if-OTUCn-ODUCn}", IfOTUCnODUCn.VALUE)
+            .put("IfOTUCnODUCnregen{qname=(http://org/openroadm/port/types?revision=2020-03-27)"
+                + "if-OTUCn-ODUCn-regen}", IfOTUCnODUCnRegen.VALUE)
+            .put("IfOTUCnODUCnregen{qname=(http://org/openroadm/port/types?revision=2023-05-26)"
+                + "if-OTUCn-ODUCn-regen}", IfOTUCnODUCnRegen.VALUE)
+            .put("IfOTUCnODUCnuniregen{qname=(http://org/openroadm/port/types?revision=2023-05-26)"
+                + "if-OTUCn-ODUCn-uniregen}", IfOTUCnODUCnUniregen.VALUE)
+            .put("IfOtsiOtucnOducn{qname=(http://org/openroadm/port/types?revision=2020-03-27)"
+                + "if-otsi-otucn-oducn}", IfOtsiOtucnOducn.VALUE)
+            .put("IfOtsiOtucnOducn{qname=(http://org/openroadm/port/types?revision=2023-05-26)"
+                + "if-otsi-otucn-oducn}", IfOtsiOtucnOducn.VALUE)
             .build();
 
     private final DataBroker dataBroker;
index de45683bd67b3ff17c7819a28f547aa92a364f9e..d9595854c30d548343445352ecb4fd84222ed86e 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.transportpce.common.mapping;
 
+import com.google.common.collect.ImmutableMap;
 import java.math.BigInteger;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
@@ -101,6 +102,45 @@ public final class PortMappingUtils {
         "{} : Updating old mapping data {} for {} by new mapping data {}";
     public static final String XPDR_LIST_IN_CONF_LOGMSG =
         "{} : list of Xponders {} in configuration";
+    public static final ImmutableMap<String, String> INTERFACE_RATE_MAP =
+        ImmutableMap.<String, String>builder()
+        .put("If1GE", "1")
+        .put("If10GE", "10")
+        .put("If40GE", "40")
+        .put("If100GE", "100")
+        .put("If200GE", "200")
+        .put("If400GE", "400")
+        .put("If1GEODU0", "1")
+        .put("If10GEODU2", "10")
+        .put("If10GEODU2e", "10")
+        .put("If10GEoduflexgfp", "10")
+        .put("If25GEoduflexcbr", "25")
+        .put("If40GEODU3", "40")
+        .put("If100GEODU4", "100")
+        .put("If100GEoduflexgfp", "100")
+        .put("If200GEoduflexcbr", "200")
+        .put("If400GEodufleximp", "400")
+        .put("If400GEoduflexcbr", "400")
+        .put("IfOCHOTU1ODU1", "1")
+        .put("IfOCHOTU2ODU2", "10")
+        .put("IfOCHOTU2EODU2E", "10")
+        .put("IfOCHOTU3ODU3", "40")
+        .put("IfOCHOTU4ODU4", "100")
+        .put("IfOCHOTU4ODU4uniregen", "100")
+        .put("IfOCHOTU4ODU4regen", "100")
+        .put("IfOCHOTUCnODUCn", "400")
+        .put("IfOCHOTUCnODUCnregen", "400")
+        .put("IfOCHOTUCnODUCnuniregen", "400")
+        .put("Ifotsiotucnoducn", "400")
+        .put("IfnOTU4ODU4", "100")
+        .put("IfOTU1ODU1", "1")
+        .put("IfOTU2ODU2", "10")
+        .put("IfOTU2eODU2e", "10")
+        .put("IfOTU3ODU3", "40")
+        .put("IfOTU4ODU4", "100")
+        .build();
+
+        //new HashMap<>(Map.of(IfOTU4ODU4.VALUE, "1"));
 
     /**
      * Implements the FNV-1 64bit algorithm.
index de5040cdb85fbf0ea8d35c22b4bc87613e2d17b9..f375cfc2b69f53c10b98a2d4b4517fea2f02a189 100644 (file)
@@ -653,10 +653,17 @@ public class PortMappingVersion121 {
             String logicalConnectionPoint, String partnerLcp) {
         Set<org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.SupportedIfCapability> supportedIntf =
             new HashSet<>();
+        Integer maxrate = 0;
+        Integer rate = 0;
         for (String sup: getSupIfCapList(port)) {
             if (MappingUtilsImpl.convertSupIfCapa(sup) != null) {
                 supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sup));
+                var rateFromMap = PortMappingUtils.INTERFACE_RATE_MAP
+                    .get(MappingUtilsImpl.convertSupIfCapa(sup).implementedInterface().getSimpleName());
+                rate = rateFromMap == null ? Integer.valueOf(0) : Integer.valueOf(rateFromMap);
+
             }
+            maxrate = (rate > maxrate) ? rate : maxrate;
         }
         MappingBuilder mpBldr = new MappingBuilder()
                 .withKey(new MappingKey(logicalConnectionPoint))
@@ -666,7 +673,8 @@ public class PortMappingVersion121 {
                 .setPortDirection(port.getPortDirection().getName())
                 .setXpdrType(XpdrNodeTypes.Tpdr)
                 .setLcpHashVal(PortMappingUtils.fnv1size64(nodeId + "-" + logicalConnectionPoint))
-                .setSupportedInterfaceCapability(supportedIntf);
+                .setSupportedInterfaceCapability(supportedIntf)
+                .setRate(String.valueOf(maxrate));
         if (port.getPortQual() != null) {
             mpBldr.setPortQual(port.getPortQual().getName());
         }
index 18bbc22d99a1ebeb41192c37a302b97c4221b9ce..27d640b50c44d8d0bc25a3e960baa9de90b5fea6 100644 (file)
@@ -902,10 +902,16 @@ public class PortMappingVersion221 {
             String logicalConnectionPoint, String partnerLcp, XpdrNodeTypes xpdrNodeType) {
         Set<org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.SupportedIfCapability> supportedIntf =
             new HashSet<>();
+        Integer maxrate = 0;
+        Integer rate = 0;
         for (String sup: getSupIfCapList(port)) {
             if (MappingUtilsImpl.convertSupIfCapa(sup) != null) {
                 supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sup));
+                var rateFromMap = PortMappingUtils.INTERFACE_RATE_MAP
+                    .get(MappingUtilsImpl.convertSupIfCapa(sup).implementedInterface().getSimpleName());
+                rate = rateFromMap == null ? Integer.valueOf(0) : Integer.valueOf(rateFromMap);
             }
+            maxrate = (rate > maxrate) ? rate : maxrate;
         }
         MappingBuilder mpBldr = new MappingBuilder()
                 .withKey(new MappingKey(logicalConnectionPoint))
@@ -914,7 +920,8 @@ public class PortMappingVersion221 {
                 .setSupportingPort(port.getPortName())
                 .setPortDirection(port.getPortDirection().getName())
                 .setLcpHashVal(PortMappingUtils.fnv1size64(nodeId + "-" + logicalConnectionPoint))
-                .setSupportedInterfaceCapability(supportedIntf);
+                .setSupportedInterfaceCapability(supportedIntf)
+                .setRate(String.valueOf(maxrate));
         if (port.getPortQual() != null) {
             mpBldr.setPortQual(port.getPortQual().getName());
         }
index 32308793e2d1b18f1177d1704448d5f178dba661..1924dc69b99e89b55b1d280f2e20299057ffec51 100644 (file)
@@ -1049,16 +1049,30 @@ public class PortMappingVersion710 {
             mpBldr.setPartnerLcp(partnerLcp);
         }
         Collection<SupportedInterfaceCapability> supIntfCapaList = getSupIntfCapaList(port);
+        int maxRate = 0;
+        Integer rate;
+        int maxOpModeRate = 0;
+        int opModeRate;
         if (supIntfCapaList != null) {
             Set<org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev230526.SupportedIfCapability>
                     supportedIntf = new HashSet<>();
             Set<String> regenProfiles = new HashSet<>();
+            rate = 0;
+            LOG.debug("PORTMapping710 line1061, SupportedInterfaceCapa {}", supIntfCapaList);
             for (SupportedInterfaceCapability sic : supIntfCapaList) {
                 // Here it could add null values and cause a null pointer exception
                 // Especially when the MappingUtilsImpl does not contain required supported-if-cap
+                LOG.debug("PORTMapping710 line1065, Scanning SupportedInterfaceCap, Interface {}", sic);
                 if (MappingUtilsImpl.convertSupIfCapa(sic.getIfCapType().toString()) != null) {
+                    LOG.debug("PORTMapping710 line1067, Converted IfCapType,  {}",
+                        MappingUtilsImpl.convertSupIfCapa(sic.getIfCapType().toString()));
                     supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sic.getIfCapType().toString()));
+                    var rateFromMap = PortMappingUtils.INTERFACE_RATE_MAP
+                        .get(MappingUtilsImpl.convertSupIfCapa(sic.getIfCapType().toString())
+                            .implementedInterface().getSimpleName());
+                    rate = rateFromMap == null ? Integer.valueOf(0) : Integer.valueOf(rateFromMap);
                 }
+                maxRate = (rate > maxRate) ? rate : maxRate;
                 LOG.debug("This the xpdr-type {}", xpdrNodeType.getName());
                 // Here we use both types of Regen (bi/uni). Though initial support is only for bi-directional regen
                 if (xpdrNodeType == XpdrNodeTypes.Regen || xpdrNodeType == XpdrNodeTypes.RegenUni) {
@@ -1085,9 +1099,28 @@ public class PortMappingVersion710 {
                                     .setMaxTribSlot(minMaxOpucnTribSlots.get(1))
                                     .build());
                 }
+                opModeRate = 0;
+                Set<String> opModeList = sic.getOpticalOperationalModeProfileName();
+                if (opModeList != null && !opModeList.isEmpty()) {
+                    mpBldr.setSupportedOperationalMode(sic.getOpticalOperationalModeProfileName());
+                    for (String opMode : opModeList) {
+                        //Extracting Max rate (from 100Gps to 1.6 Tbps) from Operational-modes
+                        for (int subRateMultiplier = 1 ; subRateMultiplier < 17; subRateMultiplier++) {
+                            if (opMode.contains(String.valueOf(subRateMultiplier * 100))) {
+                                opModeRate = subRateMultiplier * 100;
+                            }
+                        }
+                        maxOpModeRate = (opModeRate > maxOpModeRate) ? opModeRate : maxOpModeRate;
+                    }
+                }
             }
+            // maxRate is calculated from the type of supported interfaces. However for ODUCN and OTUCN, a default
+            // value of 400G is used. If Supported Operational Mode is populated, the real maximum rate shall be
+            // extrapolated from the operational mode that contains the rate rather than from default value of 400(G)
+            maxRate = (maxOpModeRate > 0) ? maxOpModeRate : maxRate;
             mpBldr.setRegenProfiles(new RegenProfilesBuilder().setRegenProfile(regenProfiles).build())
                     .setSupportedInterfaceCapability(supportedIntf);
+            mpBldr.setRate(String.valueOf(maxRate));
         }
         if (port.getAdministrativeState() != null) {
             mpBldr.setPortAdminState(port.getAdministrativeState().name());
index aa090c7628d241a5e1c3441ae4765b9269cd7ca6..cde0b2479a015188688cd709b2841c6c249fc43b 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.transportpce.networkmodel.util;
 
 import static org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes.Tpdr;
 
+import java.math.RoundingMode;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -29,6 +30,7 @@ import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmappi
 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev231221.network.Nodes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Link1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Link1Builder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.optical.channel.types.rev230526.FrequencyGHz;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.Node1;
@@ -37,9 +39,15 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev23052
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.networks.network.node.DegreeAttributesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.networks.network.node.SrgAttributes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.networks.network.node.SrgAttributesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.networks.network.node.termination.point.XpdrNetworkAttributes;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.networks.network.node.termination.point.XpdrNetworkAttributesBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev230526.OpenroadmLinkType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev230526.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev230526.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev230526.xpdr.mode.attributes.SupportedOperationalModesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev230526.xpdr.mode.attributes.supported.operational.modes.OperationalMode;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev230526.xpdr.mode.attributes.supported.operational.modes.OperationalModeBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev230526.xpdr.mode.attributes.supported.operational.modes.OperationalModeKey;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NetworkId;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.Networks;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
@@ -63,6 +71,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.top
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointBuilder;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPointKey;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Decimal64;
 import org.opendaylight.yangtools.yang.common.Uint16;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -233,13 +242,40 @@ public final class OpenRoadmTopology {
             if (!isOtn && m.getConnectionMapLcp() != null) {
                 ocnTp1Bldr.setAssociatedConnectionMapTp(Set.of(new TpId(m.getConnectionMapLcp())));
             }
+
             TerminationPointBuilder ietfTpBldr = createTpBldr(m.getLogicalConnectionPoint())
-                .addAugmentation(
-                    // Add openroadm-network-topology tp augmentations
-                        ocnTp1Bldr.build());
+                // Add openroadm-common tp augmentations
+                .addAugmentation(ocnTp1Bldr.build());
+
+            if (m.getPortQual().equals("xpdr-network") && m.getSupportedOperationalMode() != null
+                    && !m.getSupportedOperationalMode().isEmpty()) {
+
+                Map<OperationalModeKey, OperationalMode> mapSopm = new HashMap<>();
+                for (String opMode : m.getSupportedOperationalMode()) {
+                    mapSopm.put(new OperationalModeKey(opMode),
+                        new OperationalModeBuilder()
+                            .setModeId(opMode)
+                            //TODO : fill SpectralWidth with from Catalog
+                            .setSpectralWidth(new FrequencyGHz(Decimal64.valueOf(0.0, RoundingMode.DOWN)))
+                            .build());
+                }
+                XpdrNetworkAttributes xna = new XpdrNetworkAttributesBuilder()
+                    .setSupportedOperationalModes(
+                        new SupportedOperationalModesBuilder().setOperationalMode(mapSopm).build())
+                    .build();
+                // Add openroadm-network-topology tp augmentations
+                ietfTpBldr.addAugmentation(
+                    new org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526
+                            .TerminationPoint1Builder()
+                        .setXpdrNetworkAttributes(xna)
+                        .build());
+            }
+
             TerminationPoint ietfTp = ietfTpBldr.build();
             tpMap.put(ietfTp.key(),ietfTp);
+
         }
+
         // Create ietf node augmentation to support ietf tp-list
         return ietfNodeBldr.addAugmentation(
             new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder()
index 1f37d860d061b356da8fe1ca87bc9a26f95cb821..8ea5422eec1c56c397208a317b464548f2ed8eb6 100644 (file)
@@ -122,69 +122,70 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-CLIENT1', 'port-qual': 'xpdr-network',
-             'lcp-hash-val': 'OSvMgUyP+mE=', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT1',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr', 'port-qual': 'xpdr-network',
+             'lcp-hash-val': 'OSvMgUyP+mE='},
             response['mapping'])
 
     def test_11_xpdr_portmapping_NETWORK2(self):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-NETWORK2")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-CLIENT3', 'port-qual': 'xpdr-network',
-             'lcp-hash-val': 'OSvMgUyP+mI=', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK2',
+             'supporting-circuit-pack-name': '1/0/2-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT3',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr', 'port-qual': 'xpdr-network',
+             'lcp-hash-val': 'OSvMgUyP+mI='},
             response['mapping'])
 
     def test_12_xpdr_portmapping_CLIENT1(self):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': 'C1',
-             'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AO9UFkY/TLYw', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT1',
+             'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': 'C1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK1',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr', 'port-qual': 'xpdr-client',
+             'lcp-hash-val': 'AO9UFkY/TLYw'},
             response['mapping'])
 
     def test_13_xpdr_portmapping_CLIENT2(self):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT2")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': 'C2',
-             'supporting-circuit-pack-name': '1/0/C2-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT2', 'port-direction': 'bidirectional',
-             'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AO9UFkY/TLYz', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT2',
+             'supporting-circuit-pack-name': '1/0/C2-PLUG-CLIENT', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': 'C2',
+             'port-oper-state': 'InService', 'port-direction': 'bidirectional',
+             'xpdr-type': 'tpdr', 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYz'},
             response['mapping'])
 
     def test_14_xpdr_portmapping_CLIENT3(self):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT3")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': 'C3', 'xpdr-type': 'tpdr',
-             'supporting-circuit-pack-name': '1/0/C3-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT3',
-             'connection-map-lcp': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
-             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT3',
+             'supporting-circuit-pack-name': '1/0/C3-PLUG-CLIENT', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': 'C3',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK2',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYy'},
             response['mapping'])
 
     def test_15_xpdr_portmapping_CLIENT4(self):
         response = test_utils.get_portmapping_node_attr("XPDRA01", "mapping", "XPDR1-CLIENT4")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': 'C4', 'xpdr-type': 'tpdr',
-             'supporting-circuit-pack-name': '1/0/C4-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT4', 'port-direction': 'bidirectional',
-             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLY1',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT4',
+             'supporting-circuit-pack-name': '1/0/C4-PLUG-CLIENT', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': 'C4',
+             'port-oper-state': 'InService', 'port-direction': 'bidirectional',
+             'xpdr-type': 'tpdr', 'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLY1'},
             response['mapping'])
 
     def test_16_xpdr_device_disconnection(self):
index 086fd4eae7ee331912a4aaeb6af03f5afcd0e1dc..15c9acd0e2680c9a8f4716a41ebfe581f79cf515 100644 (file)
@@ -71,19 +71,20 @@ class TransportPCERendererTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDRA01", None, None)
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-CLIENT1', 'port-qual': 'xpdr-network',
-             'lcp-hash-val': 'OSvMgUyP+mE=', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT1',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-network', 'lcp-hash-val': 'OSvMgUyP+mE='},
             response['nodes'][0]['mapping'])
         self.assertIn(
-            {'supporting-port': 'C1',
-             'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AO9UFkY/TLYw', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT1',
+             'supporting-circuit-pack-name': '1/0/C1-PLUG-CLIENT', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': 'C1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK1',
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AO9UFkY/TLYw'},
             response['nodes'][0]['mapping'])
 
     def test_05_service_path_create(self):
index e5b02e733e9300dd6952958113cee8ca84e91ba6..ffe0a5cc158b13373b02920c50dce41957c1a593 100644 (file)
@@ -130,50 +130,52 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDR-A1", "mapping", "XPDR1-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
-             'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
-             'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
-             'lcp-hash-val': 'AMkDwQ7xTmRI', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT1',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-network', 'lcp-hash-val': 'AMkDwQ7xTmRI'},
             response['mapping'])
 
     def test_12_xpdr_portmapping_XPDR2_NETWORK1(self):
         response = test_utils.get_portmapping_node_attr("XPDR-A1", "mapping", "XPDR1-NETWORK2")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
-             'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/2-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK2', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-CLIENT2', 'port-qual': 'xpdr-network',
-             'lcp-hash-val': 'AMkDwQ7xTmRL', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK2',
+             'supporting-circuit-pack-name': '1/0/2-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT2',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-network', 'lcp-hash-val': 'AMkDwQ7xTmRL'},
             response['mapping'])
 
     def test_13_xpdr_portmapping_XPDR1_CLIENT1(self):
         response = test_utils.get_portmapping_node_attr("XPDR-A1", "mapping", "XPDR1-CLIENT1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
-             'supporting-port': 'C1',
-             'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AJUUr6I5fALj', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'C1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK1',
+             'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AJUUr6I5fALj'},
             response['mapping'])
 
     def test_14_xpdr_portmapping_XPDR1_CLIENT2(self):
         response = test_utils.get_portmapping_node_attr("XPDR-A1", "mapping", "XPDR1-CLIENT2")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
-             'supporting-port': 'C1',
-             'supporting-circuit-pack-name': '1/0/2-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT2', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK2', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AJUUr6I5fALg', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT2',
+             'supporting-circuit-pack-name': '1/0/2-PLUG-CLIENT', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'C1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK2',
+             'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr', 'port-qual': 'xpdr-client',
+             'lcp-hash-val': 'AJUUr6I5fALg'},
             response['mapping'])
 
     def test_15_spdr_device_connection(self):
@@ -272,16 +274,13 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("SPDR-SA1", "mapping", "XPDR1-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {"logical-connection-point": "XPDR1-NETWORK1",
-             "supporting-circuit-pack-name": "CP1-CFP0",
-             "supported-interface-capability": ["org-openroadm-port-types:if-OCH-OTU4-ODU4"],
-             "supporting-port": "CP1-CFP0-P1",
-             "lcp-hash-val": "Swfw02qXGyI=",
-             "port-direction": "bidirectional",
-             "port-admin-state": "InService",
-             "xpdr-type": "mpdr",
-             "port-qual": "xpdr-network",
-             "port-oper-state": "InService"},
+            {'logical-connection-point': 'XPDR1-NETWORK1',
+             'supporting-circuit-pack-name': 'CP1-CFP0', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'CP1-CFP0-P1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH-OTU4-ODU4'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'mpdr', 'port-qual': 'xpdr-network',
+             'lcp-hash-val': 'Swfw02qXGyI='},
             response['mapping'])
 
     def test_24_spdr_portmapping_XPDR2_CLIENT2(self):
@@ -307,48 +306,39 @@ class TransportPCEPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("SPDR-SA1", "mapping", "XPDR2-NETWORK2")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {"logical-connection-point": "XPDR2-NETWORK2",
-             "supporting-circuit-pack-name": "CP6-CFP",
-             "supported-interface-capability": ["org-openroadm-port-types:if-OCH-OTU4-ODU4"],
-             "supporting-port": "CP6-CFP-P1",
-             "lcp-hash-val": "exT821pFtOQ=",
-             "port-direction": "bidirectional",
-             "port-admin-state": "InService",
-             "xpdr-type": "switch",
-             "port-qual": "switch-network",
-             "port-oper-state": "InService"},
+            {'logical-connection-point': 'XPDR2-NETWORK2',
+             'supporting-circuit-pack-name': 'CP6-CFP', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'CP6-CFP-P1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH-OTU4-ODU4'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'switch',
+             'port-qual': 'switch-network', 'lcp-hash-val': 'exT821pFtOQ='},
             response['mapping'])
 
     def test_26_spdr_portmapping_XPDR3_CLIENT3(self):
         response = test_utils.get_portmapping_node_attr("SPDR-SA1", "mapping", "XPDR3-CLIENT3")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {"logical-connection-point": "XPDR3-CLIENT3",
-             "supporting-circuit-pack-name": "CP3-SFP3",
-             "supported-interface-capability": ["org-openroadm-port-types:if-1GE-ODU0"],
-             "supporting-port": "CP3-SFP3-P1",
-             "lcp-hash-val": "AKsQ/HRQdtdN",
-             "port-direction": "bidirectional",
-             "port-admin-state": "InService",
-             "xpdr-type": "mpdr",
-             "port-qual": "xpdr-client",
-             "port-oper-state": "InService"},
+            {'logical-connection-point': 'XPDR3-CLIENT3',
+             'supporting-circuit-pack-name': 'CP3-SFP3', 'rate': '1',
+             'port-admin-state': 'InService', 'supporting-port': 'CP3-SFP3-P1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-1GE-ODU0'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'mpdr',
+             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AKsQ/HRQdtdN'},
             response['mapping'])
 
     def test_27_spdr_portmapping_XPDR3_NETWORK1(self):
         response = test_utils.get_portmapping_node_attr("SPDR-SA1", "mapping", "XPDR3-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {"logical-connection-point": "XPDR3-NETWORK1",
-             "supporting-circuit-pack-name": "CP3-CFP0",
-             "supported-interface-capability": ["org-openroadm-port-types:if-OCH-OTU4-ODU4"],
-             "supporting-port": "CP3-CFP0-P1",
-             "lcp-hash-val": "ANnxoi7K8q30",
-             "port-direction": "bidirectional",
-             "port-admin-state": "InService",
-             "xpdr-type": "mpdr",
-             "port-qual": "xpdr-network",
-             "port-oper-state": "InService"},
+            {'logical-connection-point': 'XPDR3-NETWORK1',
+             'supporting-circuit-pack-name': 'CP3-CFP0', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'CP3-CFP0-P1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH-OTU4-ODU4'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'mpdr', 'port-qual': 'xpdr-network',
+             'lcp-hash-val': 'ANnxoi7K8q30'},
             response['mapping'])
 
     def test_28_spdr_device_disconnection(self):
index ad159b9565bc0517e19b5764aa53b61517baf6b2..b2ffb3d2cfb112349d8db63a31ee97858d2375cb 100644 (file)
@@ -66,21 +66,22 @@ class TransportPCERendererTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDR-A1", None, None)
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
-             'supporting-port': '1', 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-network',
-             'port-direction': 'bidirectional', 'connection-map-lcp': 'XPDR1-CLIENT1',
-             'lcp-hash-val': 'AMkDwQ7xTmRI', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-NETWORK1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-NET', 'rate': '0',
+             'port-admin-state': 'InService', 'supporting-port': '1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-CLIENT1',
+             'supported-interface-capability': ['org-openroadm-port-types:if-OCH'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-network', 'lcp-hash-val': 'AMkDwQ7xTmRI'},
             response['nodes'][0]['mapping'])
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
-             'supporting-port': 'C1',
-             'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT1', 'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK1', 'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AJUUr6I5fALj', 'xpdr-type': 'tpdr',
-             'port-admin-state': 'InService', 'port-oper-state': 'InService'},
+            {'logical-connection-point': 'XPDR1-CLIENT1',
+             'supporting-circuit-pack-name': '1/0/1-PLUG-CLIENT', 'rate': '100',
+             'port-admin-state': 'InService', 'supporting-port': 'C1',
+             'port-oper-state': 'InService', 'connection-map-lcp': 'XPDR1-NETWORK1',
+             'supported-interface-capability': ['org-openroadm-port-types:if-100GE'],
+             'port-direction': 'bidirectional', 'xpdr-type': 'tpdr',
+             'port-qual': 'xpdr-client', 'lcp-hash-val': 'AJUUr6I5fALj'},
             response['nodes'][0]['mapping'])
 
     def test_05_service_path_create(self):
index ec2f52441cd4c9199c8ea7645a26f93c9b1f68c3..202fe17ff28ca9f9a56a6989699f55f5fd978e7a 100644 (file)
@@ -26,18 +26,18 @@ import test_utils  # nopep8
 class TransportPCEtesting(unittest.TestCase):
 
     processes = None
-    NETWORK1_CHECK_DICT = {"logical-connection-point": "XPDR1-NETWORK1",
-                           "supporting-port": "CP1-CFP0-P1",
-                           "supported-interface-capability": [
-                               "org-openroadm-port-types:if-OCH-OTU4-ODU4"
-                           ],
-                           "port-direction": "bidirectional",
-                           "port-qual": "xpdr-network",
-                           "supporting-circuit-pack-name": "CP1-CFP0",
-                           "xpdr-type": "mpdr",
-                           'lcp-hash-val': 'Swfw02qXGyI=',
+    NETWORK1_CHECK_DICT = {'logical-connection-point': 'XPDR1-NETWORK1',
+                           'supporting-circuit-pack-name': 'CP1-CFP0',
+                           'rate': '100',
                            'port-admin-state': 'InService',
-                           'port-oper-state': 'InService'}
+                           'supporting-port': 'CP1-CFP0-P1',
+                           'port-oper-state': 'InService',
+                           'supported-interface-capability': [
+                               'org-openroadm-port-types:if-OCH-OTU4-ODU4'
+                           ],
+                           'port-direction': 'bidirectional',
+                           'xpdr-type': 'mpdr', 'port-qual': 'xpdr-network',
+                           'lcp-hash-val': 'Swfw02qXGyI='}
     NODE_VERSION = '2.2.1'
 
     @classmethod
index 2be241411b41c551989936c062726324ab57e876..fbb60f99fc278790b9fc0f56926c4a8e1fa137a5 100644 (file)
@@ -74,36 +74,38 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR1-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability':
-             ['org-openroadm-port-types:if-otsi-otsigroup'],
-             'supporting-port': 'L1',
-             'supporting-circuit-pack-name': '1/1/2-PLUG-NET',
-             'logical-connection-point': 'XPDR1-NETWORK1',
-             'port-qual': 'xpdr-network',
-             'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-CLIENT1',
-             'lcp-hash-val': 'AIGiVAQ4gDil',
-             'port-admin-state': 'InService',
-             'port-oper-state': 'InService',
-             'xpdr-type': 'tpdr'
-             },
+            {
+                'logical-connection-point': 'XPDR1-NETWORK1',
+                'supporting-circuit-pack-name': '1/1/2-PLUG-NET',
+                'rate': '200',
+                'supporting-port': 'L1',
+                'port-oper-state': 'InService',
+                'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'],
+                'port-direction': 'bidirectional',
+                'port-qual': 'xpdr-network',
+                'port-admin-state': 'InService',
+                'connection-map-lcp': 'XPDR1-CLIENT1',
+                'supported-operational-mode': ['OR-W-200G-oFEC-31.6Gbd', 'OR-W-100G-oFEC-31.6Gbd'],
+                'xpdr-type': 'tpdr',
+                'lcp-hash-val': 'AIGiVAQ4gDil'
+            },
             response['mapping'])
 
     def test_05_tpdr_portmapping_CLIENT1(self):
         response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR1-CLIENT1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability': ['org-openroadm-port-types:if-400GE'],
-             'supporting-port': 'C1',
+            {'logical-connection-point': 'XPDR1-CLIENT1',
              'supporting-circuit-pack-name': '1/1/1-PLUG-CLIENT',
-             'logical-connection-point': 'XPDR1-CLIENT1',
+             'rate': '400', 'supporting-port': 'C1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-400GE'],
              'port-direction': 'bidirectional',
-             'connection-map-lcp': 'XPDR1-NETWORK1',
              'port-qual': 'xpdr-client',
-             'lcp-hash-val': 'AODABTVSOHH0',
              'port-admin-state': 'InService',
-             'port-oper-state': 'InService',
-             'xpdr-type': 'tpdr'
+             'connection-map-lcp': 'XPDR1-NETWORK1',
+             'xpdr-type': 'tpdr',
+             'lcp-hash-val': 'AODABTVSOHH0'
              },
             response['mapping']
         )
@@ -113,17 +115,18 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
         response = test_utils.get_portmapping_node_attr("XPDR-A2", "mapping", "XPDR2-NETWORK1")
         self.assertEqual(response['status_code'], requests.codes.ok)
         self.assertIn(
-            {'supported-interface-capability':
-             ['org-openroadm-port-types:if-otsi-otsigroup'],
-             'supporting-port': 'L1',
+            {'logical-connection-point': 'XPDR2-NETWORK1',
              'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
-             'logical-connection-point': 'XPDR2-NETWORK1',
-             'port-qual': 'switch-network',
+             'rate': '200',
+             'supporting-port': 'L1',
+             'port-oper-state': 'InService',
+             'supported-interface-capability': ['org-openroadm-port-types:if-otsi-otsigroup'],
              'port-direction': 'bidirectional',
-             'lcp-hash-val': 'LY9PxYJqUbw=',
+             'port-qual': 'switch-network',
              'port-admin-state': 'InService',
-             'port-oper-state': 'InService',
-             'xpdr-type': 'mpdr'
+             'supported-operational-mode': ['OR-W-200G-oFEC-31.6Gbd', 'OR-W-100G-oFEC-31.6Gbd'],
+             'xpdr-type': 'mpdr',
+             'lcp-hash-val': 'LY9PxYJqUbw='
              },
             response['mapping'])
 
index ee3c47efdff34cf6c4f3803d6aff028e059ac340..dfe9d3f83c4ab2691e680abdd35cde50e5b7a2ca 100644 (file)
@@ -26,17 +26,21 @@ class TransportPCE400GPortMappingTesting(unittest.TestCase):
 
     processes = None
     NETWORK2_CHECK_DICT = {"logical-connection-point": "XPDR2-NETWORK1",
-                           "supporting-port": "L1",
-                           "supported-interface-capability": [
-                               "org-openroadm-port-types:if-otsi-otsigroup"
+                           'supporting-circuit-pack-name': '1/2/2-PLUG-NET',
+                           'rate': '200',
+                           'supporting-port': 'L1',
+                           'port-oper-state': 'InService',
+                           'supported-interface-capability': [
+                               'org-openroadm-port-types:if-otsi-otsigroup'
                            ],
-                           "port-direction": "bidirectional",
-                           "port-qual": "switch-network",
-                           "supporting-circuit-pack-name": "1/2/2-PLUG-NET",
-                           "xpdr-type": "mpdr",
-                           'lcp-hash-val': 'LY9PxYJqUbw=',
+                           'port-direction': 'bidirectional',
+                           'port-qual': 'switch-network',
                            'port-admin-state': 'InService',
-                           'port-oper-state': 'InService'}
+                           'supported-operational-mode': [
+                               'OR-W-200G-oFEC-31.6Gbd', 'OR-W-100G-oFEC-31.6Gbd'
+                           ],
+                           'xpdr-type': 'mpdr',
+                           'lcp-hash-val': 'LY9PxYJqUbw='}
     NODE_VERSION = '7.1'
 
     @classmethod
index c3d0490a1478bb6c63dfe8cb8ae5a1cd0742cbeb..8eab12e918f03dc8d95e352582f71c02e8c2306d 100644 (file)
@@ -27,17 +27,24 @@ import test_utils  # nopep8
 class TransportPCE400GPortMappingTesting(unittest.TestCase):
 
     processes = None
-    NETWORK1_CHECK_DICT = {"logical-connection-point": "XPDR3-NETWORK1",
-                           "supporting-port": "L1",
-                           "supported-interface-capability": [
-                               "org-openroadm-port-types:if-otsi-otsigroup"
+    NETWORK1_CHECK_DICT = {'logical-connection-point': 'XPDR3-NETWORK1',
+                           'supporting-circuit-pack-name': '1/1/4-PLUG-NET',
+                           'rate': '200',
+                           'supporting-port': 'L1',
+                           'port-oper-state': 'InService',
+                           'supported-interface-capability': [
+                               'org-openroadm-port-types:if-otsi-otsigroup'
                            ],
-                           "port-direction": "bidirectional",
-                           "port-qual": "xpdr-network",
-                           "supporting-circuit-pack-name": "1/1/4-PLUG-NET",
-                           "xpdr-type": "tpdr",
-                           "port-admin-state": "InService",
-                           "port-oper-state": "InService"}
+                           'port-direction': 'bidirectional',
+                           'port-qual': 'xpdr-network',
+                           'port-admin-state': 'InService',
+                           'connection-map-lcp': 'XPDR3-CLIENT1',
+                           'supported-operational-mode': [
+                               'OR-W-200G-oFEC-31.6Gbd', 'OR-W-100G-oFEC-31.6Gbd'
+                           ],
+                           'xpdr-type': 'tpdr',
+                           'supporting-otucn': 'XPDR3-NETWORK1-OTUC1',
+                           'lcp-hash-val': 'FDvaQIf2Z08='}
     CLIENT_CAPABILITIES = ["org-openroadm-port-types:if-100GE",
                            "org-openroadm-port-types:if-OCH-OTU4-ODU4"]
     NODE_VERSION = "7.1"
diff --git a/tox.ini b/tox.ini
index 46cdb3071b6337ff5c73b374448087326fc0a40c..157c0b6ee455ebe3821ecbf84ad03d48b6d32635 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -125,7 +125,7 @@ commands =
   ./build_karaf_for_tests.sh
 
 [testenv:tests121]
-depends = buildcontroller,build_karaf_tests121,sims121,testsPCE
+depends = buildcontroller,build_karaf_tests121,sims121,testsPCE,tests221
 # testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
 allowlist_externals = launch_tests.sh
 passenv = LAUNCHER