Unrecognized if-supported-capabilities
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / mapping / PortMappingVersion221.java
index 73801e7b96120db5ec9e47740908f7735320d383..75cdf8d48a2c5b82e435426d14283a3f507a15ad 100644 (file)
@@ -690,7 +690,6 @@ public class PortMappingVersion221 {
         nodesList.put(nodes.key(),nodes);
 
         Network network = new NetworkBuilder().setNodes(nodesList).build();
-
         final WriteTransaction writeTransaction = dataBroker.newWriteOnlyTransaction();
         InstanceIdentifier<Network> nodesIID = InstanceIdentifier.builder(Network.class).build();
         writeTransaction.merge(LogicalDatastoreType.CONFIGURATION, nodesIID, network);
@@ -869,7 +868,9 @@ public class PortMappingVersion221 {
             List<Class<? extends org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327
                 .SupportedIfCapability>> supportedIntf = new ArrayList<>();
             for (Class<? extends SupportedIfCapability> sup: port.getSupportedInterfaceCapability()) {
-                supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sup.getSimpleName()));
+                if (MappingUtilsImpl.convertSupIfCapa(sup.getSimpleName()) != null) {
+                    supportedIntf.add(MappingUtilsImpl.convertSupIfCapa(sup.getSimpleName()));
+                }
             }
             mpBldr.setSupportedInterfaceCapability(supportedIntf);
         }