for (Entry<Integer, List<org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.srg.CircuitPacks>>
srgCpEntry : getSrgCps(nodeId, deviceInfo).entrySet()) {
List<String> keys = new ArrayList<>();
+ int portIndex = 1;
for (org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev181019.srg.CircuitPacks
cp : srgCpEntry.getValue()) {
String circuitPackName = cp.getCircuitPackName();
List<Ports> portList = getPortList(circuitPackName, nodeId);
Collections.sort(portList, new SortPort221ByName());
- int portIndex = 1;
for (Ports port : portList) {
if (!checkPortQual(port, circuitPackName, nodeId)) {
continue;
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);
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);
}