Port-mapping to support regen capabilities
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / service / ServiceTypes.java
index 6c968770ba74e19a64f4630362640213df83996b..76fb5b0f6810befe663628fa36e75a44485bbdbd 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.common.service;
 
 import java.util.Map;
 import org.opendaylight.transportpce.common.StringConstants;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220922.mapping.Mapping;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.PortQual;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.XpdrNodeTypes;
 import org.opendaylight.yangtools.yang.common.Uint32;
@@ -41,7 +41,7 @@ public final class ServiceTypes {
                     if (mapping == null || !PortQual.SwitchClient.getName().equals(mapping.getPortQual())) {
                         return StringConstants.SERVICE_TYPE_100GE_T;
                     }
-                    if (XpdrNodeTypes.Switch.equals(mapping.getXponderType())) {
+                    if (XpdrNodeTypes.Switch.equals(mapping.getXpdrType())) {
                         return StringConstants.SERVICE_TYPE_100GE_S;
                     }
                 }
@@ -62,9 +62,13 @@ public final class ServiceTypes {
                     Uint32.valueOf(100), StringConstants.SERVICE_TYPE_100GE_M),
             "OTU", Map.of(
                     Uint32.valueOf(100), StringConstants.SERVICE_TYPE_OTU4,
+                    Uint32.valueOf(200), StringConstants.SERVICE_TYPE_OTUC2,
+                    Uint32.valueOf(300), StringConstants.SERVICE_TYPE_OTUC3,
                     Uint32.valueOf(400), StringConstants.SERVICE_TYPE_OTUC4),
             "ODU", Map.of(
                     Uint32.valueOf(100), StringConstants.SERVICE_TYPE_ODU4,
+                    Uint32.valueOf(200), StringConstants.SERVICE_TYPE_ODUC2,
+                    Uint32.valueOf(300), StringConstants.SERVICE_TYPE_ODUC3,
                     Uint32.valueOf(400), StringConstants.SERVICE_TYPE_ODUC4));
 
         if (!otnMap.containsKey(serviceFormat)) {