Merge "Refactor TAPI ConvertORTopoToTapiFullTopo"
authorGilles Thouenon <gilles.thouenon@orange.com>
Sat, 24 Feb 2024 15:54:13 +0000 (15:54 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 24 Feb 2024 15:54:13 +0000 (15:54 +0000)
lighty/pom.xml
renderer/src/main/java/org/opendaylight/transportpce/renderer/provisiondevice/tasks/OlmPowerSetupRollbackTask.java
servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/RendererNotificationHandler.java
tapi/src/main/java/org/opendaylight/transportpce/tapi/connectivity/ConnectivityUtils.java
tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/ConvertORToTapiTopology.java
tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToFullTapiTopoTest.java
tapi/src/test/java/org/opendaylight/transportpce/tapi/topology/ConvertORTopoToTapiTopoTest.java

index f1474f84ce2852f032d1a0b27a5e822619d349f2..5a00fbda1af43ecc405e897b99854b82a6fba241 100644 (file)
@@ -86,7 +86,7 @@
     </dependency>
     <dependency>
       <groupId>org.opendaylight.transportpce.models</groupId>
-      <artifactId>tapi-2.1.1</artifactId>
+      <artifactId>tapi-2.4.0</artifactId>
     </dependency>
     <dependency>
       <groupId>org.opendaylight.transportpce</groupId>
index f0cc4b6137a776210605123a77e633ea74d60aec..fbd70782e1bc1c62919fbcd1ac7e1cb3a29984c4 100644 (file)
@@ -44,6 +44,8 @@ public class OlmPowerSetupRollbackTask extends RollbackTask {
                 .setNodes(this.powerSetupInput.getNodes())
                 .setServiceName(this.powerSetupInput.getServiceName())
                 .setWaveNumber(this.powerSetupInput.getWaveNumber())
+                .setLowerSpectralSlotNumber(this.powerSetupInput.getLowerSpectralSlotNumber())
+                .setHigherSpectralSlotNumber(this.powerSetupInput.getHigherSpectralSlotNumber())
                 .build();
 
         Future<RpcResult<ServicePowerTurndownOutput>> powerTurndownResultFuture =
index be3eef2a43e1861b7510bfda535cda356897cced..ae723eb6c3fce489b8f7602e4a0fa4e147ab2498 100644 (file)
@@ -364,7 +364,7 @@ public class RendererNotificationHandler implements RendererListener {
         } else {
             deleteServiceOperationResult = this.serviceDataStoreOperations.deleteService(serviceName);
         }
-        if (deleteServiceOperationResult.isSuccess()) {
+        if (!deleteServiceOperationResult.isSuccess()) {
             LOG.warn("{}Service was not removed from datastore!", serviceType);
         }
     }
index 2f5780910211da57185efd187e885db9e0994006..8e803a65aa1ba945e8d41b1780cbfc0a3e283794 100644 (file)
@@ -1406,7 +1406,7 @@ public final class ConnectivityUtils {
             LOG.info("SIP name = {}", String.join("+", tp.getTpNodeId(), TapiStringConstants.MC, tp.getTpId()));
             for (ServiceInterfacePoint sip:this.sipMap.values()) {
                 if (!sip.getUuid().equals(sipUuid)) {
-                    LOG.info("SIP {} doesn match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
+                    LOG.debug("SIP {} does not match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
                     continue;
                 }
                 zendUuid = sip.getUuid();
@@ -1455,7 +1455,7 @@ public final class ConnectivityUtils {
             }
             for (ServiceInterfacePoint sip:this.sipMap.values()) {
                 if (!sip.getUuid().equals(sipUuid)) {
-                    LOG.info("SIP {} doesn match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
+                    LOG.debug("SIP {} does not match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
                     continue;
                 }
                 zendUuid = sip.getUuid();
@@ -1483,7 +1483,7 @@ public final class ConnectivityUtils {
                 tp.getTpId()));
             for (ServiceInterfacePoint sip:this.sipMap.values()) {
                 if (!sip.getUuid().equals(sipUuid)) {
-                    LOG.info("SIP {} doesn match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
+                    LOG.debug("SIP {} does not match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
                     continue;
                 }
                 aendUuid = sip.getUuid();
@@ -1532,7 +1532,7 @@ public final class ConnectivityUtils {
             }
             for (ServiceInterfacePoint sip:this.sipMap.values()) {
                 if (!sip.getUuid().equals(sipUuid)) {
-                    LOG.info("SIP {} doesn match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
+                    LOG.debug("SIP {} does not match sipname {}", sip.getUuid().getValue(), sipUuid.getValue());
                     continue;
                 }
                 aendUuid = sip.getUuid();
index 3aaeeef7fd07e2d89807de58420cb8750a275f9e..c4f589036cddcca70f5ceaa2a5cee015dfaa24cf 100644 (file)
@@ -24,7 +24,6 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.
 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.networks.network.node.termination.point.PpAttributes;
-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.types.rev230526.xpdr.odu.switching.pools.OduSwitchingPools;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev230526.xpdr.odu.switching.pools.OduSwitchingPoolsBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev230526.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
@@ -67,16 +66,13 @@ import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev221121.DIGITAL
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.PHOTONICLAYERQUALIFIEROTS;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.PHOTONICLAYERQUALIFIEROTSi;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.PHOTONICLAYERQUALIFIEROTSiMC;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.context.topology.context.topology.node.owned.node.edge.point.PhotonicMediaNodeEdgePointSpec;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.context.topology.context.topology.node.owned.node.edge.point.PhotonicMediaNodeEdgePointSpecBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.photonic.media.node.edge.point.spec.SpectrumCapabilityPacBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.AvailableSpectrum;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.AvailableSpectrumBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.AvailableSpectrumKey;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.OccupiedSpectrum;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.OccupiedSpectrumBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.OccupiedSpectrumKey;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.SupportableSpectrum;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.SupportableSpectrumBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.spectrum.capability.pac.SupportableSpectrumKey;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.FORWARDINGRULEMAYFORWARDACROSSGROUP;
@@ -87,7 +83,6 @@ import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.no
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.OwnedNodeEdgePoint;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.OwnedNodeEdgePointBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.OwnedNodeEdgePointKey;
-import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.RiskParameterPac;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.RiskParameterPacBuilder;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.edge.point.AvailablePayloadStructure;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.edge.point.AvailablePayloadStructureBuilder;
@@ -146,116 +141,102 @@ public class ConvertORToTapiTopology {
 
     public void convertNode(Node ietfNode, List<String> networkPorts) {
         this.ietfNodeId = ietfNode.getNodeId().getValue();
-        if (ietfNode.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Node1.class)
-                == null) {
+        var ietfAug =
+            ietfNode.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Node1.class);
+        if (ietfAug == null) {
             return;
         }
-        this.ietfNodeType = ietfNode.augmentation(
-            org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Node1.class).getNodeType();
-        this.ietfNodeAdminState = ietfNode.augmentation(
-                org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Node1.class)
-            .getAdministrativeState();
-        this.ietfNodeOperState = ietfNode.augmentation(
-                org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.Node1.class)
-            .getOperationalState();
-        this.oorNetworkPortList = ietfNode.augmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
-            .getTerminationPoint().values().stream()
+        this.ietfNodeType = ietfAug.getNodeType();
+        this.ietfNodeAdminState = ietfAug.getAdministrativeState();
+        this.ietfNodeOperState = ietfAug.getOperationalState();
+        var ietfAugTopo =
+            ietfNode.augmentation(
+                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class);
+        this.oorNetworkPortList = ietfAugTopo.getTerminationPoint().values().stream()
             .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
-                == OpenroadmTpType.XPONDERNETWORK.getIntValue()
+                    == OpenroadmTpType.XPONDERNETWORK.getIntValue()
                 && networkPorts.contains(tp.getTpId().getValue()))
             .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
             .collect(Collectors.toList());
-        if (!OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
-            this.oorOduSwitchingPool = ietfNode.augmentation(Node1.class).getSwitchingPools().getOduSwitchingPools()
-                .values().stream().findFirst().orElseThrow();
-            this.oorClientPortList = ietfNode.augmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
-                .getTerminationPoint().values().stream()
-                .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
-                    == OpenroadmTpType.XPONDERCLIENT.getIntValue())
-                .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
-                .collect(Collectors.toList());
-        } else {
+        if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
             this.oorOduSwitchingPool = createOduSwitchingPoolForTp100G();
             List<TpId> tpList = this.oorOduSwitchingPool.getNonBlockingList().values().stream()
                 .flatMap(nbl -> nbl.getTpList().stream())
                 .collect(Collectors.toList());
-            this.oorClientPortList = ietfNode.augmentation(
-                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
-                .getTerminationPoint().values().stream()
+            this.oorClientPortList = ietfAugTopo.getTerminationPoint().values().stream()
                 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
-                    == OpenroadmTpType.XPONDERCLIENT.getIntValue() && tpList.contains(tp.getTpId()))
+                        == OpenroadmTpType.XPONDERCLIENT.getIntValue()
+                    && tpList.contains(tp.getTpId()))
                 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
                 .collect(Collectors.toList());
             this.oorClientPortList.forEach(tp -> LOG.info("tp = {}", tp.getTpId()));
+        } else {
+            this.oorOduSwitchingPool = ietfNode.augmentation(Node1.class).getSwitchingPools().getOduSwitchingPools()
+                .values().stream().findFirst().orElseThrow();
+            this.oorClientPortList = ietfAugTopo.getTerminationPoint().values().stream()
+                .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
+                    == OpenroadmTpType.XPONDERCLIENT.getIntValue())
+                .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
+                .collect(Collectors.toList());
         }
 
         // node creation [DSR/ODU] ([DSR/ODU] and OTSI merged in R 2.4.X)
         LOG.info("creation of a DSR/ODU node for {}", this.ietfNodeId);
-        Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId,
-            TapiStringConstants.XPDR)).getBytes(Charset.forName("UTF-8"))).toString());
-        this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.XPDR), nodeUuid);
-        Name nameDsr = new NameBuilder().setValueName("dsr/odu node name")
-            .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.XPDR)).build();
-        Name namePhot = new NameBuilder().setValueName("otsi node name")
-            .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.XPDR)).build();
-        Name nameNodeType = new NameBuilder().setValueName("Node Type")
-            .setValue(this.ietfNodeType.getName()).build();
-        Set<LayerProtocolName> dsrLayerProtocols = Set.of(LayerProtocolName.DSR, LayerProtocolName.ODU,
-            LayerProtocolName.DIGITALOTN,LayerProtocolName.PHOTONICMEDIA);
-        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology
-            .Node dsrNode = createTapiNode(Map.of(nameDsr.key(), nameDsr, namePhot.key(), namePhot,nameNodeType.key(),
-                nameNodeType), dsrLayerProtocols);
-        LOG.debug("XPDR Node {} should have {} NEPs and SIPs", this.ietfNodeId,
-            this.oorClientPortList.size() + this.oorNetworkPortList.size());
-        LOG.info("XPDR Node {} has {} NEPs and {} SIPs", this.ietfNodeId,
-            dsrNode.getOwnedNodeEdgePoint().values().size(), dsrNode.getOwnedNodeEdgePoint().values().stream()
+        String nodeIdXpdr = String.join("+", this.ietfNodeId, TapiStringConstants.XPDR);
+        this.uuidMap.put(nodeIdXpdr,
+                //nodeUuid
+                new Uuid(UUID.nameUUIDFromBytes(nodeIdXpdr.getBytes(Charset.forName("UTF-8"))).toString()));
+        Name nameDsr = new NameBuilder().setValueName("dsr/odu node name").setValue(nodeIdXpdr).build();
+        Name namePhot = new NameBuilder().setValueName("otsi node name").setValue(nodeIdXpdr).build();
+        Name nameNodeType = new NameBuilder().setValueName("Node Type").setValue(this.ietfNodeType.getName()).build();
+        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                .topology.Node dsrNode =
+            createTapiNode(
+                Map.of(nameDsr.key(), nameDsr, namePhot.key(), namePhot,nameNodeType.key(), nameNodeType),
+                //dsrLayerProtocols
+                Set.of(LayerProtocolName.DSR, LayerProtocolName.ODU,
+                       LayerProtocolName.DIGITALOTN, LayerProtocolName.PHOTONICMEDIA));
+        LOG.debug("XPDR Node {} should have {} NEPs and SIPs",
+            this.ietfNodeId, this.oorClientPortList.size() + this.oorNetworkPortList.size());
+        LOG.info("XPDR Node {} has {} NEPs and {} SIPs",
+            this.ietfNodeId,
+            dsrNode.getOwnedNodeEdgePoint().values().size(),
+            dsrNode.getOwnedNodeEdgePoint().values().stream()
                 .filter(nep -> nep.getMappedServiceInterfacePoint() != null).count());
         tapiNodes.put(dsrNode.key(), dsrNode);
     }
 
-    public Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(String topoType, Uuid nodeUuid,
-            String orNodeId, Collection<OwnedNodeEdgePoint> onepl) {
+    public Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(
+            String topoType, Uuid nodeUuid, String orNodeId, Collection<OwnedNodeEdgePoint> onepl) {
         Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePointKey,
             org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint>
-            nepMap = new HashMap<>();
+                nepMap = new HashMap<>();
         for (OwnedNodeEdgePoint onep : onepl) {
-            org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint
-                nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group
-                    .NodeEdgePointBuilder()
+            var nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                    .node.rule.group.NodeEdgePointBuilder()
                 .setTopologyUuid(tapiTopoUuid)
                 .setNodeUuid(nodeUuid)
                 .setNodeEdgePointUuid(onep.key().getUuid())
                 .build();
             nepMap.put(nep.key(), nep);
         }
-        String rdmName =
-            topoType.equals("Abstracted")
-                ? "rdm infra node rule group"
-                : orNodeId + " node rule group";
-        Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupMap = new HashMap<>();
-        Set<RuleType> ruleTypes = new HashSet<>();
-        ruleTypes.add(RuleType.FORWARDING);
-        Map<RuleKey, Rule> ruleList = new HashMap<>();
         Rule rule = new RuleBuilder()
             .setLocalId("forward")
             .setForwardingRule(FORWARDINGRULEMAYFORWARDACROSSGROUP.VALUE)
-            .setRuleType(ruleTypes)
+            .setRuleType(new HashSet<>(Set.of(RuleType.FORWARDING)))
             .build();
-        ruleList.put(rule.key(), rule);
         NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
-            .setUuid(new Uuid(UUID.nameUUIDFromBytes((rdmName)
+            .setUuid(new Uuid(UUID.nameUUIDFromBytes((
+                    topoType.equals("Abstracted") ? "rdm infra node rule group" : orNodeId + " node rule group")
                 .getBytes(Charset.forName("UTF-8"))).toString()))
-            .setRule(ruleList)
+            .setRule(new HashMap<>(Map.of(rule.key(), rule)))
             .setNodeEdgePoint(nepMap)
             .build();
-        nodeRuleGroupMap.put(nodeRuleGroup.key(), nodeRuleGroup);
-        return nodeRuleGroupMap;
+        return new HashMap<>(Map.of(nodeRuleGroup.key(), nodeRuleGroup));
     }
 
-    public Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createMSIP(int nb,
-            LayerProtocolName layerProtocol, String tpId, String nodeid,
+    public Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createMSIP(
+            int nb, LayerProtocolName layerProtocol, String tpId, String nodeid,
             Collection<SupportedInterfaceCapability> supportedInterfaceCapability,
             OperationalState operState, AdministrativeState adminState) {
         // add them to SIP context
@@ -264,13 +245,14 @@ public class ConvertORToTapiTopology {
             String sipName =
                 nb == 1
                     ? String.join("+", "SIP", nodeid, tpId)
-                    : String.join("+", "SIP", nodeid, tpId,"Nber", String.valueOf(i));
+                    : String.join("+", "SIP", nodeid, tpId, "Nber", String.valueOf(i));
             LOG.info("SIP = {}", sipName);
             Uuid sipUuid = new Uuid(UUID.nameUUIDFromBytes(sipName.getBytes(Charset.forName("UTF-8"))).toString());
             MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
-                .setServiceInterfacePointUuid(sipUuid).build();
-            ServiceInterfacePoint sip = createSIP(sipUuid, layerProtocol, tpId, nodeid, supportedInterfaceCapability,
-                operState, adminState);
+                .setServiceInterfacePointUuid(sipUuid)
+                .build();
+            ServiceInterfacePoint sip =
+                createSIP(sipUuid, layerProtocol, tpId, nodeid, supportedInterfaceCapability, operState, adminState);
             this.tapiSips.put(sip.key(), sip);
             msipl.put(msip.key(), msip);
             LOG.debug("SIP created {}", sip.getUuid());
@@ -279,8 +261,10 @@ public class ConvertORToTapiTopology {
         return msipl;
     }
 
-    public List<AvailablePayloadStructure> createAvailablePayloadStructureForPhtncMedia(Boolean otsiProvisioned,
-            Collection<SupportedInterfaceCapability> sicList, List<OperationalModeKey> supportedOpModes) {
+    public List<AvailablePayloadStructure> createAvailablePayloadStructureForPhtncMedia(
+            Boolean otsiProvisioned,
+            Collection<SupportedInterfaceCapability> sicList,
+            List<OperationalModeKey> supportedOpModes) {
         if (supportedOpModes == null || supportedOpModes.isEmpty()) {
             return null;
         }
@@ -304,24 +288,21 @@ public class ConvertORToTapiTopology {
                 nepRate = loopRate;
             }
         }
-        CapacityBuilder capBd = new CapacityBuilder()
-            .setUnit(CAPACITYUNITGBPS.VALUE);
         List<AvailablePayloadStructure> aps = new ArrayList<>();
-        Integer cepInstanceNber = 1;
-        if (otsiProvisioned) {
-            cepInstanceNber = 0;
-        }
+        Integer cepInstanceNber = otsiProvisioned ? 0 : 1;
         for (SupportedInterfaceCapability sic : sicList) {
-            String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
-            switch (ifCapType) {
+            switch (sic.getIfCapType().toString().split("\\{")[0]) {
                 case "IfOCHOTU4ODU4":
                 case "IfOCHOTU4ODU4Regen":
                 case "IfOCHOTU4ODU4Uniregen":
                     aps.add(new AvailablePayloadStructureBuilder()
                         .setMultiplexingSequence(Set.of(PHOTONICLAYERQUALIFIEROTSi.VALUE, ODUTYPEODU4.VALUE))
                         .setNumberOfCepInstances(Uint64.valueOf(cepInstanceNber))
-                        .setCapacity(capBd.setValue(Decimal64.valueOf(100.0 * cepInstanceNber, RoundingMode.DOWN))
-                            .build())
+                        .setCapacity(
+                            new CapacityBuilder()
+                                .setUnit(CAPACITYUNITGBPS.VALUE)
+                                .setValue(Decimal64.valueOf(100.0 * cepInstanceNber, RoundingMode.DOWN))
+                                .build())
                         .build());
                     break;
                 case "IfOCHOTUCnODUCn":
@@ -333,8 +314,10 @@ public class ConvertORToTapiTopology {
                             ODUTYPEODUCN.VALUE, ODUTYPEODU4.VALUE))
                         .setNumberOfCepInstances(Uint64.valueOf(nepRate * cepInstanceNber))
                         .setCapacity(
-                            capBd.setValue(Decimal64.valueOf(nepRate * 100.0 * cepInstanceNber, RoundingMode.DOWN))
-                            .build())
+                            new CapacityBuilder()
+                                .setUnit(CAPACITYUNITGBPS.VALUE)
+                                .setValue(Decimal64.valueOf(nepRate * 100.0 * cepInstanceNber, RoundingMode.DOWN))
+                                .build())
                         .build());
                     break;
                 default:
@@ -369,8 +352,6 @@ public class ConvertORToTapiTopology {
                 nepRate = loopRate;
             }
         }
-        CapacityBuilder capBd = new CapacityBuilder()
-            .setUnit(CAPACITYUNITGBPS.VALUE);
         List<SupportedPayloadStructure> sps = new ArrayList<>();
         for (SupportedInterfaceCapability sic : sicList) {
             String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
@@ -381,7 +362,11 @@ public class ConvertORToTapiTopology {
                     sps.add(new SupportedPayloadStructureBuilder()
                         .setMultiplexingSequence(Set.of(PHOTONICLAYERQUALIFIEROTSi.VALUE, ODUTYPEODU4.VALUE))
                         .setNumberOfCepInstances(Uint64.valueOf(1))
-                        .setCapacity(capBd.setValue(Decimal64.valueOf(100.0, RoundingMode.DOWN)).build())
+                        .setCapacity(
+                            new CapacityBuilder()
+                                .setUnit(CAPACITYUNITGBPS.VALUE)
+                                .setValue(Decimal64.valueOf(100.0, RoundingMode.DOWN))
+                                .build())
                         .build());
                     break;
                 case "IfOCHOTUCnODUCn":
@@ -389,10 +374,15 @@ public class ConvertORToTapiTopology {
                 case "IfOCHOTUCnODUCnRegen":
                 case "IfOCHOTUCnODUCnUniregen":
                     sps.add(new SupportedPayloadStructureBuilder()
-                        .setMultiplexingSequence(Set.of(PHOTONICLAYERQUALIFIEROTSi.VALUE, OTUTYPEOTUCN.VALUE,
+                        .setMultiplexingSequence(Set.of(
+                            PHOTONICLAYERQUALIFIEROTSi.VALUE, OTUTYPEOTUCN.VALUE,
                             ODUTYPEODUCN.VALUE, ODUTYPEODU4.VALUE))
                         .setNumberOfCepInstances(Uint64.valueOf(nepRate))
-                        .setCapacity(capBd.setValue(Decimal64.valueOf(nepRate * 100.0, RoundingMode.DOWN)).build())
+                        .setCapacity(
+                            new CapacityBuilder()
+                                .setUnit(CAPACITYUNITGBPS.VALUE)
+                                .setValue(Decimal64.valueOf(nepRate * 100.0, RoundingMode.DOWN))
+                                .build())
                         .build());
                     break;
                 default:
@@ -406,15 +396,15 @@ public class ConvertORToTapiTopology {
         justification = "Voluntarily No break in switchcase where comment is inserted in following method")
     public List<SupportedCepLayerProtocolQualifierInstances> createSupportedCepLayerProtocolQualifier(
             Collection<SupportedInterfaceCapability> sicList, LayerProtocolName lpn) {
-        List<SupportedCepLayerProtocolQualifierInstances> sclpqiList = new ArrayList<>();
         if (sicList == null) {
-            sclpqiList.add(new SupportedCepLayerProtocolQualifierInstancesBuilder()
-                .setLayerProtocolQualifier(PHOTONICLAYERQUALIFIEROTS.VALUE)
-                .setNumberOfCepInstances(Uint64.valueOf(1))
-                .build());
-            return sclpqiList;
+            return new ArrayList<>(List.of(
+                new SupportedCepLayerProtocolQualifierInstancesBuilder()
+                    .setLayerProtocolQualifier(PHOTONICLAYERQUALIFIEROTS.VALUE)
+                    .setNumberOfCepInstances(Uint64.valueOf(1))
+                    .build()));
         }
         LOG.debug("SIC list = {}", sicList);
+        List<SupportedCepLayerProtocolQualifierInstances> sclpqiList = new ArrayList<>();
         for (SupportedInterfaceCapability sic : sicList) {
             String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
             switch (lpn.getName()) {
@@ -561,122 +551,102 @@ public class ConvertORToTapiTopology {
     }
 
     public Map<Double, Double> getXpdrUsedWavelength(TerminationPoint tp) {
-        if (tp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526
-                    .TerminationPoint1.class) == null
-                || tp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm
-                    .network.topology.rev230526.TerminationPoint1.class).getXpdrNetworkAttributes()
-                == null) {
+        var tpAug = tp.augmentation(
+            org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class);
+        if (tpAug == null || tpAug.getXpdrNetworkAttributes() == null) {
             return null;
         }
-        XpdrNetworkAttributes xnatt = tp.augmentation(
-            org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class)
-            .getXpdrNetworkAttributes();
-        Map<Double,Double> freqWidthMap = new HashMap<>();
-        if (xnatt.getWavelength() != null && xnatt.getWavelength().getFrequency() != null
-                && xnatt.getWavelength().getWidth() != null) {
-            freqWidthMap.put(xnatt.getWavelength().getFrequency().getValue().doubleValue(),
-                xnatt.getWavelength().getWidth().getValue().doubleValue());
-            return freqWidthMap;
-        }
-        return null;
+        var xnattWvlgth = tpAug.getXpdrNetworkAttributes().getWavelength();
+        return xnattWvlgth == null || xnattWvlgth.getFrequency() == null || xnattWvlgth.getWidth() == null
+            ? null
+            : new HashMap<>(Map.of(
+                xnattWvlgth.getFrequency().getValue().doubleValue(),
+                xnattWvlgth.getWidth().getValue().doubleValue()));
     }
 
     public Map<Double, Double> getPPUsedWavelength(TerminationPoint tp) {
         PpAttributes ppAtt = tp.augmentation(
-            org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class)
+                org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class)
             .getPpAttributes();
-        if (ppAtt == null) {
-            return null;
-        }
-        Map<Double,Double> freqWidthMap = new HashMap<>();
-        if (ppAtt.getUsedWavelength() != null && ppAtt.getUsedWavelength().entrySet().iterator().next() != null) {
-            freqWidthMap.put(ppAtt.getUsedWavelength().entrySet().iterator().next().getValue().getFrequency().getValue()
-                .doubleValue(), ppAtt.getUsedWavelength().entrySet().iterator().next().getValue().getFrequency()
-                .getValue().doubleValue());
-            return freqWidthMap;
-        }
-        return null;
+        return ppAtt == null || ppAtt.getUsedWavelength() == null
+                || ppAtt.getUsedWavelength().entrySet().iterator().next() == null
+            ? null
+            : new HashMap<>(Map.of(
+            ppAtt.getUsedWavelength().entrySet().iterator().next().getValue().getFrequency().getValue().doubleValue(),
+            ppAtt.getUsedWavelength().entrySet().iterator().next().getValue().getFrequency().getValue().doubleValue()));
     }
 
-    public OwnedNodeEdgePointBuilder addPayloadStructureAndPhotSpecToOnep(String nodeId,
-            Map<Double, Double> freqWidthMap, List<OperationalModeKey> operModeList,
+    public OwnedNodeEdgePointBuilder addPayloadStructureAndPhotSpecToOnep(
+            String nodeId, Map<Double, Double> freqWidthMap, List<OperationalModeKey> operModeList,
             Collection<SupportedInterfaceCapability> sicColl, OwnedNodeEdgePointBuilder onepBldr, String keyword) {
-        if (String.join("+", nodeId, TapiStringConstants.OTSI_MC).equals(keyword)
-                || String.join("+", nodeId, TapiStringConstants.PHTNC_MEDIA_OTS).equals(keyword)) {
-            //Creating OTS & OTSI_MC NEP specific attributes
-            onepBldr.setSupportedPayloadStructure(createSupportedPayloadStructureForPhtncMedia(
-                sicColl,operModeList));
-            SpectrumCapabilityPacBuilder spectrumPac = new SpectrumCapabilityPacBuilder();
-            OccupiedSpectrumBuilder ospecBd = new OccupiedSpectrumBuilder();
-            if (freqWidthMap == null || freqWidthMap.isEmpty()) {
-                ospecBd
-                    .setUpperFrequency(Uint64.valueOf(0))
-                    .setLowerFrequency(Uint64.valueOf(0));
-                onepBldr.setAvailablePayloadStructure(createAvailablePayloadStructureForPhtncMedia(
-                    false, sicColl,operModeList));
-                double naz = 0.01;
-                AvailableSpectrum  aspec = new AvailableSpectrumBuilder()
-                    .setUpperFrequency(Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09 + naz)))
-                    .setLowerFrequency(Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09
-                        + GridConstant.GRANULARITY * GridConstant.EFFECTIVE_BITS * 1E06 + naz)))
-                    .build();
-                Map<AvailableSpectrumKey, AvailableSpectrum> aspecMap = new HashMap<>();
-                aspecMap.put(new AvailableSpectrumKey(aspec.getLowerFrequency(),
-                    aspec.getUpperFrequency()), aspec);
-                spectrumPac.setAvailableSpectrum(aspecMap);
-            } else {
-                onepBldr.setAvailablePayloadStructure(createAvailablePayloadStructureForPhtncMedia(
-                    true, sicColl,operModeList));
-                ospecBd
-                    .setUpperFrequency(Uint64.valueOf(Math.round(
-                        freqWidthMap.keySet().iterator().next().doubleValue() * 1E09
-                        + (freqWidthMap.entrySet().iterator().next().getValue().doubleValue() * 1E06) / 2)))
-                    .setLowerFrequency(Uint64.valueOf(Math.round(
-                        freqWidthMap.keySet().iterator().next().doubleValue() * 1E09
-                        - (freqWidthMap.entrySet().iterator().next().getValue().doubleValue() * 1E06) / 2)));
-            }
-            OccupiedSpectrum ospec = ospecBd.build();
-            Map<OccupiedSpectrumKey, OccupiedSpectrum> ospecMap = new HashMap<>();
-            ospecMap.put(new OccupiedSpectrumKey(ospec.getLowerFrequency(),
-                ospec.getUpperFrequency()), ospec);
-            spectrumPac.setOccupiedSpectrum(ospecMap);
-            double nazz = 0.01;
-            SupportableSpectrum  sspec = new SupportableSpectrumBuilder()
-                .setUpperFrequency(Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09 + nazz)))
-                .setLowerFrequency(Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09
-                    + GridConstant.GRANULARITY * GridConstant.EFFECTIVE_BITS * 1E06 + nazz)))
-                .build();
-            Map<SupportableSpectrumKey, SupportableSpectrum> sspecMap = new HashMap<>();
-            sspecMap.put(new SupportableSpectrumKey(sspec.getLowerFrequency(),
-                sspec.getUpperFrequency()), sspec);
-            spectrumPac.setSupportableSpectrum(sspecMap);
-            PhotonicMediaNodeEdgePointSpec pnepSpec = new PhotonicMediaNodeEdgePointSpecBuilder()
-                .setSpectrumCapabilityPac(spectrumPac.build())
-                .build();
-            org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121.OwnedNodeEdgePoint1 onep1 =
-                    new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121
-                    .OwnedNodeEdgePoint1Builder()
-                    .setPhotonicMediaNodeEdgePointSpec(pnepSpec)
-                    .build();
-            onepBldr.addAugmentation(onep1);
+        if (!String.join("+", nodeId, TapiStringConstants.OTSI_MC).equals(keyword)
+                && !String.join("+", nodeId, TapiStringConstants.PHTNC_MEDIA_OTS).equals(keyword)) {
+            return onepBldr;
+        }
+        //Creating OTS & OTSI_MC NEP specific attributes
+        double naz = 0.01;
+        Uint64 supLoFreq = Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09 + naz));
+        Uint64 supUpFreq = Uint64.valueOf(Math.round(GridConstant.START_EDGE_FREQUENCY * 1E09
+                + GridConstant.GRANULARITY * GridConstant.EFFECTIVE_BITS * 1E06 + naz));
+        boolean boolParam;
+        Uint64 upFreq;
+        Uint64 loFreq;
+        SpectrumCapabilityPacBuilder spectrumPac = new SpectrumCapabilityPacBuilder();
+        if (freqWidthMap == null || freqWidthMap.isEmpty()) {
+            upFreq = Uint64.valueOf(0);
+            loFreq = Uint64.valueOf(0);
+            boolParam = false;
+            AvailableSpectrum  aspec =
+                new AvailableSpectrumBuilder().setUpperFrequency(supUpFreq).setLowerFrequency(supLoFreq).build();
+            spectrumPac.setAvailableSpectrum(new HashMap<>(Map.of(
+                new AvailableSpectrumKey(aspec.getLowerFrequency(), aspec.getUpperFrequency()), aspec)));
+        } else {
+            upFreq = Uint64.valueOf(Math.round(
+                    freqWidthMap.keySet().iterator().next().doubleValue() * 1E09
+                    + (freqWidthMap.entrySet().iterator().next().getValue().doubleValue() * 1E06) / 2));
+            loFreq = Uint64.valueOf(Math.round(
+                    freqWidthMap.keySet().iterator().next().doubleValue() * 1E09
+                    - (freqWidthMap.entrySet().iterator().next().getValue().doubleValue() * 1E06) / 2));
+            boolParam = true;
         }
-        return onepBldr;
+        return onepBldr
+            .setSupportedPayloadStructure(createSupportedPayloadStructureForPhtncMedia(sicColl, operModeList))
+            .setAvailablePayloadStructure(createAvailablePayloadStructureForPhtncMedia(boolParam, sicColl,operModeList))
+            .addAugmentation(
+                new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev221121
+                        .OwnedNodeEdgePoint1Builder()
+                    .setPhotonicMediaNodeEdgePointSpec(
+                        new PhotonicMediaNodeEdgePointSpecBuilder()
+                            .setSpectrumCapabilityPac(
+                                spectrumPac
+                                    .setOccupiedSpectrum(new HashMap<>(Map.of(
+                                        new OccupiedSpectrumKey(loFreq, upFreq),
+                                        new OccupiedSpectrumBuilder()
+                                            .setUpperFrequency(upFreq)
+                                            .setLowerFrequency(loFreq)
+                                            .build())))
+                                    .setSupportableSpectrum(new HashMap<>(Map.of(
+                                        new SupportableSpectrumKey(supLoFreq, supUpFreq),
+                                        new SupportableSpectrumBuilder()
+                                            .setUpperFrequency(supUpFreq)
+                                            .setLowerFrequency(supLoFreq)
+                                            .build())))
+                                    .build())
+                            .build())
+                    .build());
     }
 
     private OduSwitchingPools createOduSwitchingPoolForTp100G() {
         Map<NonBlockingListKey, NonBlockingList> nblMap = new HashMap<>();
         int count = 1;
         for (TerminationPoint tp : this.oorNetworkPortList) {
-            TpId tpid1 = tp.getTpId();
-            TpId tpid2 = tp.augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526.TerminationPoint1.class)
-                .getAssociatedConnectionMapTp().iterator().next();
-            Set<TpId> tpList = new HashSet<>();
-            tpList.add(tpid1);
-            tpList.add(tpid2);
             NonBlockingList nbl = new NonBlockingListBuilder()
                 .setNblNumber(Uint16.valueOf(count))
-                .setTpList(tpList)
+                .setTpList(new HashSet<>(Set.of(
+                    tp.getTpId(),
+                    tp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev230526
+                            .TerminationPoint1.class)
+                        .getAssociatedConnectionMapTp().iterator().next())))
                 .build();
             nblMap.put(nbl.key(), nbl);
             count++;
@@ -687,26 +657,23 @@ public class ConvertORToTapiTopology {
             .build();
     }
 
-    private org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node
-            createTapiNode(Map<NameKey, Name> nodeNames, Set<LayerProtocolName> layerProtocols) {
+    private org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node createTapiNode(
+            Map<NameKey, Name> nodeNames, Set<LayerProtocolName> layerProtocols) {
         Uuid nodeUuid = null;
         Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
         Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
-        Map<RuleKey, Rule> ruleList = new HashMap<>();
-        Set<RuleType> ruleTypes = new HashSet<>();
-        ruleTypes.add(RuleType.FORWARDING);
-        Rule rule = new RuleBuilder()
-            .setLocalId("forward")
-            .setForwardingRule(FORWARDINGRULEMAYFORWARDACROSSGROUP.VALUE)
-            .setRuleType(ruleTypes)
-            .build();
-        ruleList.put(rule.key(), rule);
         if (layerProtocols.contains(LayerProtocolName.DSR)
                 || layerProtocols.contains(LayerProtocolName.PHOTONICMEDIA)) {
-            nodeUuid = getNodeUuid4Dsr(onepl, nodeRuleGroupList, ruleList);
+            Rule rule = new RuleBuilder()
+                .setLocalId("forward")
+                .setForwardingRule(FORWARDINGRULEMAYFORWARDACROSSGROUP.VALUE)
+                .setRuleType(new HashSet<>(Set.of(RuleType.FORWARDING)))
+                .build();
+            nodeUuid = getNodeUuid4Dsr(onepl, nodeRuleGroupList, new HashMap<>(Map.of(rule.key(), rule)));
         } else {
-            LOG.error("Undefined LayerProtocolName for {} node {}", nodeNames.get(nodeNames.keySet().iterator().next())
-                .getValueName(), nodeNames.get(nodeNames.keySet().iterator().next()).getValue());
+            LOG.error("Undefined LayerProtocolName for {} node {}",
+                nodeNames.get(nodeNames.keySet().iterator().next()).getValueName(),
+                nodeNames.get(nodeNames.keySet().iterator().next()).getValue());
         }
      // Empty random creation of mandatory fields for avoiding errors....
         CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
@@ -725,9 +692,6 @@ public class ConvertORToTapiTopology {
             .setRiskCharacteristicName("risk characteristic")
             .setRiskIdentifierList(Set.of("risk identifier1", "risk identifier2"))
             .build();
-        RiskParameterPac riskParamPac = new RiskParameterPacBuilder()
-            .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
-            .build();
         return new NodeBuilder()
             .setUuid(nodeUuid)
             .setName(nodeNames)
@@ -739,7 +703,10 @@ public class ConvertORToTapiTopology {
             .setNodeRuleGroup(nodeRuleGroupList)
             .setCostCharacteristic(Map.of(costCharacteristic.key(), costCharacteristic))
             .setLatencyCharacteristic(Map.of(latencyCharacteristic.key(), latencyCharacteristic))
-            .setRiskParameterPac(riskParamPac)
+            .setRiskParameterPac(
+                new RiskParameterPacBuilder()
+                    .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
+                    .build())
             .setErrorCharacteristic("error")
             .setLossCharacteristic("loss")
             .setRepeatDeliveryCharacteristic("repeat delivery")
@@ -749,111 +716,95 @@ public class ConvertORToTapiTopology {
             .build();
     }
 
-    private Uuid getNodeUuid4Dsr(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
-                                 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
-        Uuid nodeUuid;
-        nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, TapiStringConstants.XPDR));
+    private Uuid getNodeUuid4Dsr(
+            Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
+            Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList,
+            Map<RuleKey, Rule> ruleList) {
         // client NEP DSR creation on DSR/ODU node
         for (int i = 0; i < oorClientPortList.size(); i++) {
-            Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
-                (String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
-                    oorClientPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
-            LOG.info("NEP = {} has Uuid {} ", String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
-                oorClientPortList.get(i).getTpId().getValue()), nepUuid);
-            this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
-                    oorClientPortList.get(i).getTpId().getValue()), nepUuid);
-            NameBuilder nameBldr = new NameBuilder().setValue(
-                String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
-                    oorClientPortList.get(i).getTpId().getValue()));
-            Name name;
-            if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
-                name = nameBldr.setValueName("100G-tpdr").build();
-            } else {
-                name = nameBldr.setValueName("NodeEdgePoint_C").build();
-            }
-
-            OwnedNodeEdgePoint onep = createNep(oorClientPortList.get(i), Map.of(name.key(), name),
-                LayerProtocolName.DSR, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId,
-                    TapiStringConstants.DSR));
+            String nodeIdDsr = String.join("+",
+                this.ietfNodeId, TapiStringConstants.DSR, oorClientPortList.get(i).getTpId().getValue());
+            Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(nodeIdDsr.getBytes(Charset.forName("UTF-8"))).toString());
+            LOG.info("NEP = {} has Uuid {} ", nodeIdDsr, nepUuid);
+            this.uuidMap.put(nodeIdDsr, nepUuid);
+            Name name = new NameBuilder()
+                .setValue(nodeIdDsr)
+                .setValueName(OpenroadmNodeType.TPDR.equals(this.ietfNodeType) ? "100G-tpdr" : "NodeEdgePoint_C")
+                .build();
+            OwnedNodeEdgePoint onep = createNep(
+                oorClientPortList.get(i),
+                Map.of(name.key(), name),
+                LayerProtocolName.DSR, LayerProtocolName.DSR, true,
+                String.join("+", this.ietfNodeId, TapiStringConstants.DSR));
             onepl.put(onep.key(), onep);
         }
         // CLIENT NEP E_ODU creation on DSR/ODU node
         for (int i = 0; i < oorClientPortList.size(); i++) {
-            Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
-                (String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU,
-                    oorClientPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
-            LOG.info("NEP = {} has Uuid {} ", String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU,
-                oorClientPortList.get(i).getTpId().getValue()), nepUuid1);
-            this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU,
-                oorClientPortList.get(i).getTpId().getValue()), nepUuid1);
+            String nodeIdEodu = String.join("+",
+                this.ietfNodeId, TapiStringConstants.E_ODU, oorClientPortList.get(i).getTpId().getValue());
+            Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(nodeIdEodu.getBytes(Charset.forName("UTF-8"))).toString());
+            LOG.info("NEP = {} has Uuid {} ", nodeIdEodu, nepUuid1);
+            this.uuidMap.put(nodeIdEodu, nepUuid1);
             Name onedName = new NameBuilder()
                 .setValueName("eNodeEdgePoint_N")
-                .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU,
-                    oorClientPortList.get(i).getTpId().getValue()))
+                .setValue(nodeIdEodu)
                 .build();
-
-            OwnedNodeEdgePoint onep = createNep(oorClientPortList.get(i), Map.of(onedName.key(), onedName),
-                LayerProtocolName.ODU, LayerProtocolName.DSR, false, String.join("+", this.ietfNodeId,
-                    TapiStringConstants.E_ODU));
+            OwnedNodeEdgePoint onep = createNep(
+                oorClientPortList.get(i),
+                Map.of(onedName.key(), onedName),
+                LayerProtocolName.ODU, LayerProtocolName.DSR, false,
+                String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU));
             onepl.put(onep.key(), onep);
         }
         // NETWORK NEPs I_ODU creation on DSR/ODU node
         for (int i = 0; i < oorNetworkPortList.size(); i++) {
-            Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
-                (String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
-                    oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
-            LOG.info("NEP = {} has Uuid {} ", String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid1);
-            this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid1);
+            String nodeIdIodu = String.join("+",
+                this.ietfNodeId, TapiStringConstants.I_ODU, oorNetworkPortList.get(i).getTpId().getValue());
+            Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(nodeIdIodu.getBytes(Charset.forName("UTF-8"))).toString());
+            LOG.info("NEP = {} has Uuid {} ", nodeIdIodu, nepUuid1);
+            this.uuidMap.put(nodeIdIodu, nepUuid1);
             Name onedName = new NameBuilder()
                 .setValueName("iNodeEdgePoint_N")
-                .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
-                    oorNetworkPortList.get(i).getTpId().getValue()))
+                .setValue(nodeIdIodu)
                 .build();
-
-            OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
-                LayerProtocolName.ODU, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId,
-                    TapiStringConstants.I_ODU));
+            OwnedNodeEdgePoint onep = createNep(
+                oorNetworkPortList.get(i),
+                Map.of(onedName.key(), onedName),
+                LayerProtocolName.ODU, LayerProtocolName.DSR, true,
+                String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU));
             onepl.put(onep.key(), onep);
         }
         // NETWORK NEP OTS network on DSR/ODU node
         for (int i = 0; i < oorNetworkPortList.size(); i++) {
-            Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(
-                (String.join("+", this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS,
-                    oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
-                .toString());
-            LOG.info("NEP = {} has Uuid {} ", String.join("+", this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid2);
-            this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid2);
+            String nodeIdPmOts = String.join("+",
+                this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS, oorNetworkPortList.get(i).getTpId().getValue());
+            Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(nodeIdPmOts.getBytes(Charset.forName("UTF-8"))).toString());
+            LOG.info("NEP = {} has Uuid {} ", nodeIdPmOts, nepUuid2);
+            this.uuidMap.put(nodeIdPmOts, nepUuid2);
             Name onedName = new NameBuilder()
                 .setValueName("eNodeEdgePoint")
-                .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS,
-                    oorNetworkPortList.get(i).getTpId().getValue()))
+                .setValue(nodeIdPmOts)
                 .build();
-
-            OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
+            OwnedNodeEdgePoint onep = createNep(
+                oorNetworkPortList.get(i),
+                Map.of(onedName.key(), onedName),
                 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
                 String.join("+", this.ietfNodeId, TapiStringConstants.PHTNC_MEDIA_OTS));
             onepl.put(onep.key(), onep);
         }
         for (int i = 0; i < oorNetworkPortList.size(); i++) {
-            Uuid nepUuid3 = new Uuid(UUID.nameUUIDFromBytes(
-                (String.join("+", this.ietfNodeId, TapiStringConstants.OTSI_MC,
-                    oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
-                .toString());
-            LOG.info("NEP = {} has Uuid {} ", String.join("+", this.ietfNodeId, TapiStringConstants.OTSI_MC,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid3);
-            this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI_MC,
-                oorNetworkPortList.get(i).getTpId().getValue()), nepUuid3);
+            String nodeIdOtMc = String.join("+",
+                this.ietfNodeId, TapiStringConstants.OTSI_MC, oorNetworkPortList.get(i).getTpId().getValue());
+            Uuid nepUuid3 = new Uuid(UUID.nameUUIDFromBytes(nodeIdOtMc.getBytes(Charset.forName("UTF-8"))).toString());
+            LOG.info("NEP = {} has Uuid {} ", nodeIdOtMc, nepUuid3);
+            this.uuidMap.put(nodeIdOtMc, nepUuid3);
             Name onedName = new NameBuilder()
                 .setValueName("PhotMedNodeEdgePoint")
-                .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI_MC,
-                    oorNetworkPortList.get(i).getTpId().getValue()))
+                .setValue(nodeIdOtMc)
                 .build();
-
-            OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
+            OwnedNodeEdgePoint onep = createNep(
+                oorNetworkPortList.get(i),
+                Map.of(onedName.key(), onedName),
                 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
                 String.join("+", this.ietfNodeId, TapiStringConstants.OTSI_MC));
             onepl.put(onep.key(), onep);
@@ -861,64 +812,56 @@ public class ConvertORToTapiTopology {
         // create NodeRuleGroup
         int count = 1;
         LOG.debug("ODU switching pool = {}", this.oorOduSwitchingPool.nonnullNonBlockingList().values());
+        String ietfXpdr = String.join("+", this.ietfNodeId, TapiStringConstants.XPDR);
         for (NonBlockingList nbl : this.oorOduSwitchingPool.nonnullNonBlockingList().values()) {
             Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePointKey,
                 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint>
-                nepList = new HashMap<>();
+                    nepList = new HashMap<>();
             Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePointKey,
                 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint>
-                oduNepList = new HashMap<>();
+                    oduNepList = new HashMap<>();
             LOG.debug("UUidMap={}", this.uuidMap.keySet());
             LOG.debug("TP list = {}", nbl.getTpList());
             for (TpId tp : nbl.getTpList()) {
                 LOG.debug("TP={}", tp.getValue());
-                LOG.debug("UuidKey={}", String.join("+", this.ietfNodeId,
-                    TapiStringConstants.E_ODU, tp.getValue()));
-                if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
-                        tp.getValue())) || this.uuidMap.containsKey(String.join(
-                        "+", this.ietfNodeId, TapiStringConstants.I_ODU, tp.getValue()))) {
-                    String qual = tp.getValue().contains("CLIENT") ? TapiStringConstants.DSR
-                        : TapiStringConstants.I_ODU;
-                    org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint
-                            nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
-                            .node.rule.group.NodeEdgePointBuilder()
-                        .setTopologyUuid(tapiTopoUuid)
-                        .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
-                            TapiStringConstants.XPDR)))
-                        .setNodeEdgePointUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
-                            qual, tp.getValue())))
-                        .build();
+                String ietfEoduTp = String.join("+", this.ietfNodeId, TapiStringConstants.E_ODU, tp.getValue());
+                LOG.debug("UuidKey={}", ietfEoduTp);
+                String ietfIoduTp = String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU, tp.getValue());
+                if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, TapiStringConstants.DSR, tp.getValue()))
+                        || this.uuidMap.containsKey(ietfIoduTp)) {
+                    String qual = tp.getValue().contains("CLIENT")
+                        ? TapiStringConstants.DSR : TapiStringConstants.I_ODU;
+                    var nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                                .node.rule.group.NodeEdgePointBuilder()
+                            .setTopologyUuid(tapiTopoUuid)
+                            .setNodeUuid(this.uuidMap.get(ietfXpdr))
+                            .setNodeEdgePointUuid(this.uuidMap.get(
+                                String.join("+", this.ietfNodeId, qual, tp.getValue())))
+                            .build();
                     nepList.put(nep.key(), nep);
                 }
-                if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId,
-                        TapiStringConstants.E_ODU, tp.getValue()))) {
-                    org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint
-                            nep1 = new org.opendaylight.yang.gen.v1.urn
-                            .onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePointBuilder()
-                        .setTopologyUuid(tapiTopoUuid)
-                        .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
-                            TapiStringConstants.XPDR)))
-                        .setNodeEdgePointUuid(this.uuidMap.get(String.join(
-                            "+", this.ietfNodeId, TapiStringConstants.E_ODU, tp.getValue())))
-                        .build();
+                if (this.uuidMap.containsKey(ietfEoduTp)) {
+                    var nep1 = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                                .node.rule.group.NodeEdgePointBuilder()
+                            .setTopologyUuid(tapiTopoUuid)
+                            .setNodeUuid(this.uuidMap.get(ietfXpdr))
+                            .setNodeEdgePointUuid(this.uuidMap.get(ietfEoduTp))
+                            .build();
                     oduNepList.put(nep1.key(), nep1);
                 }
-                if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId,
-                        TapiStringConstants.I_ODU, tp.getValue()))) {
-                    org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePoint
-                            nep2 = new org.opendaylight.yang.gen.v1.urn
-                            .onf.otcc.yang.tapi.topology.rev221121.node.rule.group.NodeEdgePointBuilder()
-                        .setTopologyUuid(tapiTopoUuid)
-                        .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
-                            TapiStringConstants.XPDR)))
-                        .setNodeEdgePointUuid(this.uuidMap.get(String.join(
-                            "+", this.ietfNodeId, TapiStringConstants.I_ODU, tp.getValue())))
-                        .build();
+                if (this.uuidMap.containsKey(ietfIoduTp)) {
+                // TODO already checked with DSR above -> potential factorization ?
+                    var nep2 = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                                .node.rule.group.NodeEdgePointBuilder()
+                            .setTopologyUuid(tapiTopoUuid)
+                            .setNodeUuid(this.uuidMap.get(ietfXpdr))
+                            .setNodeEdgePointUuid(this.uuidMap.get(ietfIoduTp))
+                            .build();
                     oduNepList.put(nep2.key(), nep2);
                 }
             }
-            LOG.debug("NEPLIST (DSR/I_ODU) of [dsr node rule group] is {}", nepList.toString());
-            LOG.debug("NEPLIST (E_ODU/I_ODU) of [odu node rule group] is {}", nepList.toString());
+            LOG.debug("NEPLIST (DSR/I_ODU) of [dsr node rule group] is {}", nepList);
+            LOG.debug("NEPLIST (E_ODU/I_ODU) of [odu node rule group] is {}", nepList);
             // Empty random creation of mandatory fields for avoiding errors....
             CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
                 .setCostAlgorithm("Restricted Shortest Path - RSP")
@@ -958,35 +901,35 @@ public class ConvertORToTapiTopology {
             nodeRuleGroupList.put(nodeRuleGroup2.key(), nodeRuleGroup2);
             count++;
         }
-        return nodeUuid;
+        return this.uuidMap.get(ietfXpdr);
     }
 
     private OwnedNodeEdgePoint createNep(TerminationPoint oorTp, Map<NameKey, Name> nepNames,
             LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip, String keyword) {
-        String key = String.join("+", keyword, oorTp.getTpId().getValue());
-        AdministrativeState adminState = (oorTp.augmentation(TerminationPoint1.class).getAdministrativeState() != null)
-            ? transformAsToTapiAdminState(oorTp.augmentation(TerminationPoint1.class).getAdministrativeState()
-                .getName())
-            : null;
-        OperationalState operState = (oorTp.augmentation(TerminationPoint1.class).getOperationalState() != null)
-            ? transformOsToTapiOperationalState(oorTp.augmentation(TerminationPoint1.class).getOperationalState()
-                .getName())
-            : null;
-        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev230526.TerminationPoint1 tp1 =
-            oorTp.augmentation(org.opendaylight.yang.gen.v1.http
-                .org.openroadm.otn.network.topology.rev230526.TerminationPoint1.class);
+        var tp1 = oorTp.augmentation(
+            org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev230526.TerminationPoint1.class);
         if (tp1.getTpSupportedInterfaces() == null) {
             LOG.warn("Tp supported interface doesnt exist on TP {}", oorTp.getTpId().getValue());
             return null;
         }
-        Collection<SupportedInterfaceCapability> sicColl = tp1.getTpSupportedInterfaces()
-            .getSupportedInterfaceCapability().values();
+        AdministrativeState adminState =
+            oorTp.augmentation(TerminationPoint1.class).getAdministrativeState() == null
+                ? null
+                : transformAsToTapiAdminState(
+                    oorTp.augmentation(TerminationPoint1.class).getAdministrativeState().getName());
+        OperationalState operState =
+            oorTp.augmentation(TerminationPoint1.class).getOperationalState() == null
+                ? null
+                : transformOsToTapiOperationalState(
+                    oorTp.augmentation(TerminationPoint1.class).getOperationalState().getName());
+        Collection<SupportedInterfaceCapability> sicColl =
+            tp1.getTpSupportedInterfaces().getSupportedInterfaceCapability().values();
         OwnedNodeEdgePointBuilder onepBldr = new OwnedNodeEdgePointBuilder()
-            .setUuid(this.uuidMap.get(key))
+            .setUuid(this.uuidMap.get(String.join("+", keyword, oorTp.getTpId().getValue())))
             .setLayerProtocolName(nepProtocol)
-            .setName(nepNames);
-        onepBldr.setSupportedCepLayerProtocolQualifierInstances(createSupportedCepLayerProtocolQualifier(sicColl,
-                nepProtocol))
+            .setName(nepNames)
+            .setSupportedCepLayerProtocolQualifierInstances(
+                createSupportedCepLayerProtocolQualifier(sicColl, nepProtocol))
             .setDirection(Direction.BIDIRECTIONAL)
             .setLinkPortRole(PortRole.SYMMETRIC)
             .setAdministrativeState(adminState)
@@ -996,33 +939,28 @@ public class ConvertORToTapiTopology {
             onepBldr.setMappedServiceInterfacePoint(
                 createMSIP(1, nepProtocol, oorTp.getTpId().getValue(), keyword, sicColl, operState, adminState));
         }
-        List<OperationalModeKey> opModeList = new ArrayList<>();
         if (oorTp.augmentation(TerminationPoint1.class).getTpType().equals(OpenroadmTpType.XPONDERNETWORK)) {
-            if (oorTp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526
-                        .TerminationPoint1.class) == null
-                    || oorTp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm
-                        .network.topology.rev230526.TerminationPoint1.class).getXpdrNetworkAttributes()
-                    == null) {
+            List<OperationalModeKey> opModeList = new ArrayList<>();
+            var tp11 = oorTp.augmentation(
+                org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class);
+            if (tp11 == null || tp11.getXpdrNetworkAttributes() == null) {
                 for (SupportedInterfaceCapability sic : sicColl) {
                     String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
                     if (("IfOCHOTUCnODUCn").equals(ifCapType) || ("IfOCHOTUCnODUCnUniregen").equals(ifCapType)
                             || ("IfOCHOTUCnODUCnRegen").equals(ifCapType)) {
                         opModeList.add(new OperationalModeKey("400G"));
-                        LOG.warn(TopologyUtils.NOOPMODEDECLARED + "400G rate available", oorTp.getTpId().toString());
+                        LOG.warn(TopologyUtils.NOOPMODEDECLARED + "400G rate available", oorTp.getTpId());
                         break;
                     }
                 }
                 opModeList.add(new OperationalModeKey("100G"));
-                LOG.warn(TopologyUtils.NOOPMODEDECLARED + "100G rate available", oorTp.getTpId().toString());
+                LOG.warn(TopologyUtils.NOOPMODEDECLARED + "100G rate available", oorTp.getTpId());
             } else {
-                opModeList = oorTp.augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev230526.TerminationPoint1.class)
-                    .getXpdrNetworkAttributes().getSupportedOperationalModes().getOperationalMode().keySet().stream()
-                    .toList();
+                opModeList = tp11.getXpdrNetworkAttributes().getSupportedOperationalModes().getOperationalMode()
+                    .keySet().stream().toList();
             }
-            Map<Double, Double> freqWidthMap = getXpdrUsedWavelength(oorTp);
-            onepBldr = addPayloadStructureAndPhotSpecToOnep(this.ietfNodeId, freqWidthMap, opModeList, sicColl,
-                onepBldr, keyword);
+            onepBldr = addPayloadStructureAndPhotSpecToOnep(
+                this.ietfNodeId, getXpdrUsedWavelength(oorTp), opModeList, sicColl, onepBldr, keyword);
         }
         return onepBldr.build();
     }
@@ -1036,7 +974,6 @@ public class ConvertORToTapiTopology {
             .setValueName("SIP name")
             .setValue(String.join("+", nodeid, tpId))
             .build();
-
         return new ServiceInterfacePointBuilder()
             .setUuid(sipUuid)
             .setName(Map.of(sipName.key(), sipName))
@@ -1054,20 +991,18 @@ public class ConvertORToTapiTopology {
     @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH",
         justification = "Voluntarily No break in switchcase where comment is inserted in following method")
     private List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev221121
-            .service._interface.point.SupportedCepLayerProtocolQualifierInstances>
-            createSipSupportedLayerProtocolQualifier(
-            Collection<SupportedInterfaceCapability> supportedInterfaceCapability,
-            LayerProtocolName lpn) {
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev221121
-            .service._interface.point.SupportedCepLayerProtocolQualifierInstances> sclpqiList = new ArrayList<>();
+                .service._interface.point.SupportedCepLayerProtocolQualifierInstances>
+             createSipSupportedLayerProtocolQualifier(
+                Collection<SupportedInterfaceCapability> supportedInterfaceCapability, LayerProtocolName lpn) {
         if (supportedInterfaceCapability == null) {
-            sclpqiList.add(new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev221121
-                .service._interface.point.SupportedCepLayerProtocolQualifierInstancesBuilder()
+            return new ArrayList<>(List.of(new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev221121
+                    .service._interface.point.SupportedCepLayerProtocolQualifierInstancesBuilder()
                 .setLayerProtocolQualifier(PHOTONICLAYERQUALIFIEROTS.VALUE)
                 .setNumberOfCepInstances(Uint64.valueOf(1))
-                .build());
-            return sclpqiList;
+                .build()));
         }
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev221121
+            .service._interface.point.SupportedCepLayerProtocolQualifierInstances> sclpqiList = new ArrayList<>();
         for (SupportedInterfaceCapability sic : supportedInterfaceCapability) {
             String ifCapType = sic.getIfCapType().toString().split("\\{")[0];
             switch (lpn.getName()) {
@@ -1242,20 +1177,18 @@ public class ConvertORToTapiTopology {
     }
 
     public AdministrativeState transformAsToTapiAdminState(String adminState) {
-        if (adminState == null) {
-            return null;
-        }
-        return adminState.equals(AdminStates.InService.getName())
-            || adminState.equals(AdministrativeState.UNLOCKED.getName()) ? AdministrativeState.UNLOCKED
-                : AdministrativeState.LOCKED;
+        return adminState == null
+            ? null
+            : adminState.equals(AdminStates.InService.getName())
+                    || adminState.equals(AdministrativeState.UNLOCKED.getName())
+                ? AdministrativeState.UNLOCKED : AdministrativeState.LOCKED;
     }
 
     public OperationalState transformOsToTapiOperationalState(String operState) {
-        if (operState == null) {
-            return null;
-        }
-        return operState.equals("inService") || operState.equals(OperationalState.ENABLED.getName())
-            ? OperationalState.ENABLED : OperationalState.DISABLED;
+        return operState == null
+            ? null
+            : operState.equals("inService") || operState.equals(OperationalState.ENABLED.getName())
+                ? OperationalState.ENABLED : OperationalState.DISABLED;
     }
 
     public Map<ServiceInterfacePointKey, ServiceInterfacePoint> getTapiSips() {
index a01165d7d26c0a2491763ae31ad250db5be3fbf2..0c371e95de83d10b88e5c7ed3eb29bfd952a1367 100644 (file)
@@ -1298,28 +1298,19 @@ public class ConvertORTopoToFullTapiTopoTest extends AbstractTest {
 
     private Integer nrgContainsClientAndNetwork(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid) {
         // 1 NRG should at least contain the NEP of interest in the NEP List
-        Boolean foundClient = false;
-        Boolean foundNetwork = false;
         Integer indexNrg = 0;
         for (NodeRuleGroup nrg : nrgList) {
+            Boolean foundClient = false;
+            Boolean foundNetwork = false;
             for (NodeEdgePoint nep : nrg.nonnullNodeEdgePoint().values()) {
-                if (nep.getNodeEdgePointUuid().equals(clientNepUuid)) {
-                    foundClient = true;
-                } else if (nep.getNodeEdgePointUuid().equals(networkNepUuid)) {
-                    foundNetwork = true;
-                }
+                foundClient = foundClient || nep.getNodeEdgePointUuid().equals(clientNepUuid);
+                foundNetwork = foundNetwork || nep.getNodeEdgePointUuid().equals(networkNepUuid);
             }
             if (foundClient && foundNetwork) {
-                break;
-            } else {
-                foundClient = false;
-                foundNetwork = false;
+                return indexNrg;
             }
             indexNrg++;
         }
-        if (foundClient && foundNetwork) {
-            return indexNrg;
-        }
         return null;
     }
 
index bda081ce670d36c476153fcda867ae9a2feef659..b017dd0c62f44ecb1cc8ec0c6a4f25eb29051b82 100644 (file)
@@ -94,7 +94,6 @@ import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.no
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.node.rule.group.Rule;
 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Link;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.Decimal64;
 import org.opendaylight.yangtools.yang.common.Uint64;
 import org.slf4j.Logger;
@@ -117,54 +116,64 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @BeforeAll
     static void setUp() throws InterruptedException, ExecutionException {
-        TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(),
-            TapiTopologyDataUtils.OPENROADM_TOPOLOGY_FILE, InstanceIdentifiers.OVERLAY_NETWORK_II);
-        TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(),
-            TapiTopologyDataUtils.OTN_TOPOLOGY_FILE, InstanceIdentifiers.OTN_NETWORK_II);
-        TopologyDataUtils.writePortmappingFromFileToDatastore(getDataStoreContextUtil(),
+        TopologyDataUtils.writeTopologyFromFileToDatastore(
+            getDataStoreContextUtil(),
+            TapiTopologyDataUtils.OPENROADM_TOPOLOGY_FILE,
+            InstanceIdentifiers.OVERLAY_NETWORK_II);
+        TopologyDataUtils.writeTopologyFromFileToDatastore(
+            getDataStoreContextUtil(),
+            TapiTopologyDataUtils.OTN_TOPOLOGY_FILE,
+            InstanceIdentifiers.OTN_NETWORK_II);
+        TopologyDataUtils.writePortmappingFromFileToDatastore(
+            getDataStoreContextUtil(),
             TapiTopologyDataUtils.PORTMAPPING_FILE);
-
-        KeyedInstanceIdentifier<Node, NodeKey> muxAIID = InstanceIdentifier.create(Networks.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network
-                .class, new NetworkKey(new NetworkId("otn-topology")))
-            .child(Node.class, new NodeKey(new NodeId("SPDR-SA1-XPDR1")));
         FluentFuture<Optional<Node>> muxAFuture = dataBroker.newReadOnlyTransaction()
-            .read(LogicalDatastoreType.CONFIGURATION, muxAIID);
-        KeyedInstanceIdentifier<Node, NodeKey> muxCIID = InstanceIdentifier.create(Networks.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network
-                .class, new NetworkKey(new NetworkId("otn-topology")))
-            .child(Node.class, new NodeKey(new NodeId("SPDR-SC1-XPDR1")));
-        FluentFuture<Optional<Node>> muxCFuture = dataBroker.newReadOnlyTransaction()
-            .read(LogicalDatastoreType.CONFIGURATION, muxCIID);
-        KeyedInstanceIdentifier<Node, NodeKey> switchIID = InstanceIdentifier.create(Networks.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network
-                .class, new NetworkKey(new NetworkId("otn-topology")))
-            .child(Node.class, new NodeKey(new NodeId("SPDR-SA1-XPDR2")));
-        FluentFuture<Optional<Node>> switchFuture = dataBroker.newReadOnlyTransaction()
-            .read(LogicalDatastoreType.CONFIGURATION, switchIID);
-
+            .read(LogicalDatastoreType.CONFIGURATION,
+            //muxAIID
+            InstanceIdentifier.create(Networks.class)
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226
+                        .networks.Network.class,
+                    new NetworkKey(new NetworkId("otn-topology")))
+                .child(Node.class, new NodeKey(new NodeId("SPDR-SA1-XPDR1"))));
+        FluentFuture<Optional<Node>> muxCFuture =
+            dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION,
+            //muxCIID
+            InstanceIdentifier.create(Networks.class)
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226
+                        .networks.Network.class,
+                    new NetworkKey(new NetworkId("otn-topology")))
+                .child(Node.class, new NodeKey(new NodeId("SPDR-SC1-XPDR1"))));
+        FluentFuture<Optional<Node>> switchFuture =
+            dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION,
+            //switchIID
+            InstanceIdentifier.create(Networks.class)
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226
+                        .networks.Network.class,
+                    new NetworkKey(new NetworkId("otn-topology")))
+                .child(Node.class, new NodeKey(new NodeId("SPDR-SA1-XPDR2"))));
         otnMuxA = muxAFuture.get().orElseThrow();
         otnMuxC = muxCFuture.get().orElseThrow();
         otnSwitch = switchFuture.get().orElseThrow();
-
-        KeyedInstanceIdentifier<Node, NodeKey> tpdrIID = InstanceIdentifier.create(Networks.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network
-                .class, new NetworkKey(new NetworkId("otn-topology")))
-            .child(Node.class, new NodeKey(new NodeId("XPDR-A1-XPDR1")));
-        FluentFuture<Optional<Node>> tpdrFuture = dataBroker.newReadOnlyTransaction()
-            .read(LogicalDatastoreType.CONFIGURATION, tpdrIID);
+        FluentFuture<Optional<Node>> tpdrFuture =
+            dataBroker.newReadOnlyTransaction().read(LogicalDatastoreType.CONFIGURATION,
+            //tpdrIID
+            InstanceIdentifier.create(Networks.class)
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226
+                        .networks.Network.class,
+                    new NetworkKey(new NetworkId("otn-topology")))
+                .child(Node.class, new NodeKey(new NodeId("XPDR-A1-XPDR1"))));
         tpdr100G = tpdrFuture.get().orElseThrow();
-
-        InstanceIdentifier<Network1> linksIID = InstanceIdentifier.create(Networks.class)
-            .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.Network
-                .class, new NetworkKey(new NetworkId("otn-topology")))
-            .augmentation(Network1.class);
         FluentFuture<Optional<Network1>> linksFuture = dataBroker.newReadOnlyTransaction()
-            .read(LogicalDatastoreType.CONFIGURATION, linksIID);
+            .read(LogicalDatastoreType.CONFIGURATION,
+            //linksIID
+            InstanceIdentifier.create(Networks.class)
+                .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226
+                        .networks.Network.class,
+                    new NetworkKey(new NetworkId("otn-topology")))
+                .augmentation(Network1.class));
         otnLinks = linksFuture.get().orElseThrow().getLink();
-
-        topologyUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.T0_MULTILAYER.getBytes(
-            Charset.forName("UTF-8"))).toString());
+        topologyUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.T0_MULTILAYER
+            .getBytes(Charset.forName("UTF-8"))).toString());
         networkTransactionService = new NetworkTransactionImpl(getDataBroker());
         tapiLink = new TapiLinkImpl(networkTransactionService);
         LOG.info("TEST SETUP READY");
@@ -182,11 +191,11 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         ConvertORToTapiTopology tapiFactory = new ConvertORToTapiTopology(topologyUuid);
         tapiFactory.convertNode(tpdr, networkPortList);
 
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node dsrNode = tapiFactory
-            .getTapiNodes().get(new
-                org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.NodeKey(dsrNodeUuid));
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        var dsrNode = tapiFactory.getTapiNodes()
+            .get(new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                .topology.NodeKey(dsrNodeUuid));
         Uuid networkNepUuid = new Uuid(
             UUID.nameUUIDFromBytes(("XPDR-A1-XPDR1+iODU+XPDR1-NETWORK1").getBytes(Charset.forName("UTF-8")))
                 .toString());
@@ -198,8 +207,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertNodeWhenBadStates1() {
-        Node tpdr = changeTerminationPointState(tpdr100G, "XPDR1-NETWORK1", AdminStates.OutOfService,
-            State.OutOfService);
+        Node tpdr =
+            changeTerminationPointState(tpdr100G, "XPDR1-NETWORK1", AdminStates.OutOfService, State.OutOfService);
         List<String> networkPortList = new ArrayList<>();
         for (TerminationPoint tp : tpdr100G.augmentation(Node1.class).getTerminationPoint().values()) {
             if (tp.augmentation(TerminationPoint1.class).getTpType().equals(OpenroadmTpType.XPONDERNETWORK)) {
@@ -209,11 +218,11 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         ConvertORToTapiTopology tapiFactory = new ConvertORToTapiTopology(topologyUuid);
         tapiFactory.convertNode(tpdr, networkPortList);
 
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node dsrNode = tapiFactory
-            .getTapiNodes().get(new
-                org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.NodeKey(dsrNodeUuid));
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        var dsrNode = tapiFactory.getTapiNodes()
+            .get(new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                    .topology.NodeKey(dsrNodeUuid));
         Uuid networkNepUuid = new Uuid(
             UUID.nameUUIDFromBytes(("XPDR-A1-XPDR1+iODU+XPDR1-NETWORK1").getBytes(Charset.forName("UTF-8")))
                 .toString());
@@ -225,8 +234,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertNodeWhenBadStates2() {
-        Node tpdr = changeTerminationPointState(tpdr100G, "XPDR1-NETWORK1", AdminStates.Maintenance,
-            State.Degraded);
+        Node tpdr = changeTerminationPointState(tpdr100G, "XPDR1-NETWORK1", AdminStates.Maintenance, State.Degraded);
         List<String> networkPortList = new ArrayList<>();
         for (TerminationPoint tp : tpdr100G.augmentation(Node1.class).getTerminationPoint().values()) {
             if (tp.augmentation(TerminationPoint1.class).getTpType().equals(OpenroadmTpType.XPONDERNETWORK)) {
@@ -236,11 +244,11 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         ConvertORToTapiTopology tapiFactory = new ConvertORToTapiTopology(topologyUuid);
         tapiFactory.convertNode(tpdr, networkPortList);
 
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node dsrNode = tapiFactory
-            .getTapiNodes().get(new
-                org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.NodeKey(dsrNodeUuid));
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        var dsrNode = tapiFactory.getTapiNodes()
+            .get(new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
+                    .topology.NodeKey(dsrNodeUuid));
         Uuid networkNepUuid = new Uuid(
             UUID.nameUUIDFromBytes(("XPDR-A1-XPDR1+iODU+XPDR1-NETWORK1").getBytes(Charset.forName("UTF-8")))
                 .toString());
@@ -252,10 +260,12 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertOtnLinkWhenNoState() {
-        HashMap<LinkKey, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
-            .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link
-            link = changeOtnLinkState(otnLinks.get(new LinkKey(
+        HashMap<LinkKey,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link link =
+            changeOtnLinkState(otnLinks.get(new LinkKey(
                 new LinkId("ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"))), null, null);
         otnLinksAlt.replace(link.key(), link);
 
@@ -292,10 +302,12 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertOtnLinkWhenNoStateOnOppositeLink() {
-        HashMap<LinkKey, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
-            .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link
-            link = changeOtnLinkState(otnLinks.get(new LinkKey(
+        HashMap<LinkKey,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link link =
+            changeOtnLinkState(otnLinks.get(new LinkKey(
                 new LinkId("ODTU4-SPDR-SC1-XPDR1-XPDR1-NETWORK1toSPDR-SA1-XPDR1-XPDR1-NETWORK1"))), null, null);
         otnLinksAlt.replace(link.key(), link);
 
@@ -332,10 +344,12 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertOtnLinkWhenBadState1() {
-        HashMap<LinkKey, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
-            .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link
-            link = changeOtnLinkState(otnLinks.get(new LinkKey(
+        HashMap<LinkKey,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link link =
+            changeOtnLinkState(otnLinks.get(new LinkKey(
                 new LinkId("ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"))),
                 AdminStates.OutOfService, State.OutOfService);
         otnLinksAlt.replace(link.key(), link);
@@ -358,11 +372,10 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         tapiFactory.convertNode(otnMuxC, networkPortListC);
         tapiAbsFactory.setTapiNodes(tapiFactory.getTapiNodes());
         tapiAbsFactory.convertLinks(otnLinksAlt);
-
         List<Link> tapiLinks = tapiAbsFactory.getTapiLinks().values().stream()
             .sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
             .collect(Collectors.toList());
-        LOG.info("TapiLinks are as follow : {}", tapiLinks.toString());
+        LOG.info("TapiLinks are as follow : {}", tapiLinks);
         assertEquals(AdministrativeState.LOCKED, tapiLinks.get(1).getAdministrativeState(),
             "Administrative state should be LOCKED");
         assertEquals(AdministrativeState.UNLOCKED, tapiLinks.get(0).getAdministrativeState(),
@@ -375,10 +388,12 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertOtnLinkWhenBadState2() {
-        HashMap<LinkKey, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
-            .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link
-            link = changeOtnLinkState(otnLinks.get(new LinkKey(
+        HashMap<LinkKey,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link link =
+            changeOtnLinkState(otnLinks.get(new LinkKey(
                 new LinkId("ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"))),
                 AdminStates.Maintenance, State.Degraded);
         otnLinksAlt.replace(link.key(), link);
@@ -401,7 +416,6 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         tapiFactory.convertNode(otnMuxC, networkPortListC);
         tapiAbsFactory.setTapiNodes(tapiFactory.getTapiNodes());
         tapiAbsFactory.convertLinks(otnLinksAlt);
-
         List<Link> tapiLinks = tapiAbsFactory.getTapiLinks().values().stream()
             .sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
             .collect(Collectors.toList());
@@ -417,10 +431,12 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
     @Test
     void convertOtnLinkWhenBadStateOnOppositeLink() {
-        HashMap<LinkKey, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
-            .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link
-            link = changeOtnLinkState(otnLinks.get(new LinkKey(
+        HashMap<LinkKey,
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link> otnLinksAlt = new HashMap<>(otnLinks);
+        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link link =
+            changeOtnLinkState(otnLinks.get(new LinkKey(
                 new LinkId("ODTU4-SPDR-SC1-XPDR1-XPDR1-NETWORK1toSPDR-SA1-XPDR1-XPDR1-NETWORK1"))),
                 AdminStates.OutOfService, State.OutOfService);
         otnLinksAlt.replace(link.key(), link);
@@ -467,16 +483,16 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             }
         }
         tapiFactory.convertNode(tpdr100G, networkPortList);
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes
-            tapiFactory.getTapiNodes().values().stream()
-            .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
-            .collect(Collectors.toList());
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes =
+            tapiFactory.getTapiNodes().values().stream()
+                .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
+                .collect(Collectors.toList());
 
         assertEquals(1, tapiFactory.getTapiNodes().size(), "Node list size should be 1 (DSR-ODU merged)");
         assertEquals(0, tapiFactory.getTapiLinks().size(), "Link list size should be 0 (no more transitional links)");
 
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("XPDR-A1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
         checkDsrNode(tapiNodes.get(getNodeRank("SPDR-SA1", tapiNodes)), dsrNodeUuid, "tpdr", "XPDR-A1-XPDR1+XPONDER");
     }
 
@@ -490,15 +506,15 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             }
         }
         tapiFactory.convertNode(otnMuxA, networkPortList);
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes
-            tapiFactory.getTapiNodes().values().stream()
-            .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
-            .collect(Collectors.toList());
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes =
+            tapiFactory.getTapiNodes().values().stream()
+                .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
+                .collect(Collectors.toList());
 
         assertEquals(1, tapiFactory.getTapiNodes().size(), "Node list size should be 1 (DSR & ODU merged");
         assertEquals(0, tapiFactory.getTapiLinks().size(), "Link list size should be 0, no more transitional links");
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
         checkDsrNode(tapiNodes.get(getNodeRank("SPDR-SA1", tapiNodes)), dsrNodeUuid, "mux", "SPDR-SA1-XPDR1+XPONDER");
     }
 
@@ -512,16 +528,16 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             }
         }
         tapiFactory.convertNode(otnSwitch, networkPortList);
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes
-            tapiFactory.getTapiNodes().values().stream()
-            .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
-            .collect(Collectors.toList());
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes =
+            tapiFactory.getTapiNodes().values().stream()
+                .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
+                .collect(Collectors.toList());
 
         assertEquals(1, tapiFactory.getTapiNodes().size(), "Node list size should be 1 (DSR/ODU merged)");
         assertEquals(0, tapiFactory.getTapiLinks().size(), "Link list size should be 0 : no more transitional link");
 
-        Uuid dsrNodeUuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR2+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
+        Uuid dsrNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR2+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
         checkDsrNode(tapiNodes.get(getNodeRank("SPDR-SA1", tapiNodes)), dsrNodeUuid, "switch",
             "SPDR-SA1-XPDR2+XPONDER");
     }
@@ -550,38 +566,41 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         tapiAbsFactory.convertLinks(otnLinks);
         assertEquals(2, tapiAbsFactory.getTapiLinks().size(), "Link list size should be 2 : no transitional link");
 
-        Uuid node1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid node2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid node3Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid node4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid tp1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1"
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid tp2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid tp3Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1"
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid tp4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid link1Uuid =
-            new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1toSPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
-                .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid link2Uuid =
-            new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1toSPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
-                .getBytes(Charset.forName("UTF-8"))).toString());
-
+        Uuid node1Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid node2Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid node3Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid node4Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid tp1Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid tp2Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1".getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid tp3Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1".getBytes(Charset.forName("UTF-8")))
+                .toString());
+        Uuid tp4Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1".getBytes(Charset.forName("UTF-8")))
+                .toString());
+        Uuid link1Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1toSPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
+                    .getBytes(Charset.forName("UTF-8")))
+                .toString());
+        Uuid link2Uuid = new Uuid(
+            UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1toSPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
+                    .getBytes(Charset.forName("UTF-8")))
+                .toString());
         List<Link> links = tapiAbsFactory.getTapiLinks().values().stream()
             .sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
             .collect(Collectors.toList());
-        LOG.info("Node3 {}, Node4 = {},", node3Uuid.toString(), node4Uuid.toString());
+        LOG.info("Node3 {}, Node4 = {},", node3Uuid, node4Uuid);
         checkOtnLink(links.get(1), node1Uuid, node2Uuid, tp1Uuid, tp2Uuid, link1Uuid,
             "SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1toSPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1");
         checkOtnLink(links.get(0), node3Uuid, node4Uuid, tp3Uuid, tp4Uuid, link2Uuid,
             "SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1toSPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1");
-        LOG.info("The link we check  has name {}", links.get(0).getName().toString());
+        LOG.info("The link we check  has name {}", links.get(0).getName());
     }
 
     @Test
@@ -591,10 +610,10 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
         assertEquals(1, tapiAbsFactory.getTapiNodes().size(), "Node list size should be 1");
         assertEquals(0, tapiAbsFactory.getTapiLinks().size(), "Link list size should be empty");
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes
-            tapiAbsFactory.getTapiNodes().values().stream().collect(Collectors.toList());
-        Uuid photNodeUuid = new Uuid(UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8")))
-            .toString());
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes =
+            tapiAbsFactory.getTapiNodes().values().stream().collect(Collectors.toList());
+        Uuid photNodeUuid = new Uuid(
+            UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8"))).toString());
         checkOtsiNode(tapiNodes.get(0), photNodeUuid, "infra", "ROADM-infra");
     }
 
@@ -618,38 +637,43 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
 
         Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.NodeKey,
             org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> nodeMap =
-            tapiFactory.getTapiNodes();
+                tapiFactory.getTapiNodes();
         nodeMap.putAll(tapiAbsFactory.getTapiNodes());
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes
-            nodeMap.values().stream()
-            .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
-            .collect(Collectors.toList());
-
-        Uuid otsiNodeUuid = new Uuid(UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        checkOtsiNode(tapiNodes.get(getNodeRank("ROADM", tapiNodes)), otsiNodeUuid, "infra", "ROADM-infra");
-
+        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> tapiNodes =
+            nodeMap.values().stream()
+                .sorted((n1, n2) -> n1.getUuid().getValue().compareTo(n2.getUuid().getValue()))
+                .collect(Collectors.toList());
+        checkOtsiNode(
+            tapiNodes.get(getNodeRank("ROADM", tapiNodes)),
+            //otsiNodeUuid,
+            new Uuid(UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8"))).toString()),
+            "infra", "ROADM-infra");
         List<Link> links = tapiAbsFactory.getTapiLinks().values().stream()
             .sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
             .collect(Collectors.toList());
-        Uuid node1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid node2Uuid = new Uuid(UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8")))
-            .toString());
-        Uuid tp1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+PHOTONIC_MEDIA_OTS+XPDR1-NETWORK1"
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        Uuid tp2Uuid = new Uuid(UUID.nameUUIDFromBytes(("roadm node+nep+1")
-            .getBytes(Charset.forName("UTF-8"))).toString());
-        String str1 = "SPDR-SA1-XPDR1+XPONDER--SPDR-SA1-XPDR1+PHOTONIC_MEDIA_OTS+XPDR1-NETWORK1 and ROADM-infra-"
-            + "-NodeEdgePoint_1";
-        Uuid linkUuid =
-            new Uuid(UUID.nameUUIDFromBytes(str1.getBytes(Charset.forName("UTF-8"))).toString());
-        LOG.info("LinksCheck 0 = {} ", links.get(0).getName().toString());
-        checkOmsLink(links.get(0), node1Uuid, node2Uuid, tp1Uuid, tp2Uuid, linkUuid, str1);
+        String str1 =
+            "SPDR-SA1-XPDR1+XPONDER--SPDR-SA1-XPDR1+PHOTONIC_MEDIA_OTS+XPDR1-NETWORK1 and ROADM-infra--NodeEdgePoint_1";
+        LOG.info("LinksCheck 0 = {} ", links.get(0).getName());
+        checkOmsLink(links.get(0),
+            //node1Uuid,
+            new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+XPONDER".getBytes(Charset.forName("UTF-8"))).toString()),
+            //node2Uuid,
+            new Uuid(UUID.nameUUIDFromBytes("ROADM-infra".getBytes(Charset.forName("UTF-8"))).toString()),
+            //tp1Uuid,
+            new Uuid(
+                UUID.nameUUIDFromBytes(
+                        "SPDR-SA1-XPDR1+PHOTONIC_MEDIA_OTS+XPDR1-NETWORK1".getBytes(Charset.forName("UTF-8")))
+                    .toString()),
+            //tp2Uuid,
+            new Uuid(UUID.nameUUIDFromBytes(("roadm node+nep+1").getBytes(Charset.forName("UTF-8"))).toString()),
+            //linkUuid,
+            new Uuid(UUID.nameUUIDFromBytes(str1.getBytes(Charset.forName("UTF-8"))).toString()),
+            str1);
     }
 
-    private void checkDsrNode(org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node node,
-                              Uuid nodeUuid, String dsrNodeType, String nodeId) {
+    private void checkDsrNode(
+            org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node node,
+            Uuid nodeUuid, String dsrNodeType, String nodeId) {
         assertEquals(nodeUuid, node.getUuid(), "incorrect node uuid");
         assertEquals(nodeId, node.getName().get(new NameKey("dsr/odu node name")).getValue(), "incorrect node name");
         assertEquals(AdministrativeState.UNLOCKED, node.getAdministrativeState(),
@@ -750,8 +774,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
     }
 
     private void checkOtsiNode(
-        org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node node,
-        Uuid nodeUuid, String otsiNodeType, String nodeId) {
+            org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node node,
+            Uuid nodeUuid, String otsiNodeType, String nodeId) {
         assertEquals(nodeUuid, node.getUuid(), "incorrect node uuid");
         assertEquals(nodeId, node.getName().get(new NameKey("otsi node name")).getValue(), "incorrect node name");
         assertEquals(AdministrativeState.UNLOCKED, node.getAdministrativeState(),
@@ -853,19 +877,18 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         }
     }
 
-    private void checkNepClient10G(OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName,
-                                   String nodeId, String extension) {
+    private void checkNepClient10G(
+            OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName, String nodeId, String extension) {
         assertEquals(nepUuid, nep.getUuid(), "bad uuid for " + portName);
-        List<Name> nameList = new ArrayList<>(nep.nonnullName().values());
-        Name name = nameList.get(0);
-        assertEquals(String.join("+", nodeId, extension, portName), name.getValue(),
+        Name name = new ArrayList<>(nep.nonnullName().values()).get(0);
+        assertEquals(
+            String.join("+", nodeId, extension, portName),
+            name.getValue(),
             "value of client nep should be '" + portName + "'");
         assertEquals(nepName, name.getValueName(),
             "value-name of client nep for '" + portName + "' should be '" + nepName + "'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry : nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(3, lpql.size(), "Client nep should support 3 kind of cep");
@@ -876,8 +899,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         checkSIP(nep, portName, nodeId, extension);
     }
 
-    private void checkNepNetworkODU4(OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName,
-                                     String nodeId, String extension) {
+    private void checkNepNetworkODU4(
+            OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName, String nodeId, String extension) {
         assertEquals(nepUuid, nep.getUuid(), "bad uuid for " + portName);
         List<Name> nameList = new ArrayList<>(nep.nonnullName().values());
         Name name = nameList.get(0);
@@ -886,9 +909,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         assertEquals(nepName, name.getValueName(),
             "value-name of network nep for '" + portName + "' should be '" + nepName + "'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry :nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(1, lpql.size(), "Network nep should support 1 kind of cep");
@@ -898,8 +919,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         checkSIP(nep, portName, nodeId, extension);
     }
 
-    private void checkNodeRuleGroupForTpdrDSR(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid,
-                                              Uuid nodeUuid) {
+    private void checkNodeRuleGroupForTpdrDSR(
+            List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid, Uuid nodeUuid) {
         assertEquals(4, nrgList.size(), "transponder DSR should contain 4 node rule group (2*DSR/I_ODU+2*E_ODU/I_ODU)");
         for (NodeRuleGroup nodeRuleGroup : nrgList) {
             assertEquals(2, nodeRuleGroup.getNodeEdgePoint().size(),
@@ -925,8 +946,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNodeRuleGroupForMuxDSR(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid,
-                                             Uuid nodeUuid) {
+    private void checkNodeRuleGroupForMuxDSR(
+            List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid, Uuid nodeUuid) {
         assertEquals(8, nrgList.size(), "muxponder DSR should contain 8 node rule group (4*DSR/I_ODU + 4*E_ODU/I_ODU)");
         for (NodeRuleGroup nodeRuleGroup : nrgList) {
             assertEquals(2, nodeRuleGroup.getNodeEdgePoint().size(),
@@ -952,8 +973,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNodeRuleGroupForSwitchDSR(List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid,
-                                                Uuid nodeUuid) {
+    private void checkNodeRuleGroupForSwitchDSR(
+            List<NodeRuleGroup> nrgList, Uuid clientNepUuid, Uuid networkNepUuid, Uuid nodeUuid) {
         assertEquals(2, nrgList.size(), "Switch-DSR should contain 2 node rule groups (DSR/I_ODU + E_ODU/I_ODU)");
         assertEquals(8, nrgList.get(0).getNodeEdgePoint().size(), "Switch-DSR node-rule-group should contain 8 NEP");
         List<NodeEdgePoint> nrg = nrgList.get(0).nonnullNodeEdgePoint().values().stream()
@@ -996,8 +1017,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNodeRuleGroupForTpdrOTSi(List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid,
-                                               Uuid nodeUuid) {
+    private void checkNodeRuleGroupForTpdrOTSi(
+            List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid, Uuid nodeUuid) {
         assertEquals(2, nrgList.size(), "Tpdr-OTSi should contain two node rule groups");
         List<NodeEdgePoint> nodeEdgePointList = new ArrayList<>(nrgList.get(0).getNodeEdgePoint().values());
         assertEquals(2, nodeEdgePointList.size(), "Tpdr-OTSi node-rule-group should contain 2 NEP");
@@ -1020,8 +1041,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNodeRuleGroupForMuxOTSi(List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid,
-                                              Uuid nodeUuid) {
+    private void checkNodeRuleGroupForMuxOTSi(
+            List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid, Uuid nodeUuid) {
         assertEquals(1, nrgList.size(), "Mux-OTSi should contain a single node rule group");
         List<NodeEdgePoint> nodeEdgePointList = new ArrayList<>(nrgList.get(0).getNodeEdgePoint().values());
         assertEquals(2, nodeEdgePointList.size(), "Mux-OTSi node-rule-group should contain 2 NEP");
@@ -1044,8 +1065,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNodeRuleGroupForSwitchOTSi(List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid,
-                                                 Uuid nodeUuid) {
+    private void checkNodeRuleGroupForSwitchOTSi(
+            List<NodeRuleGroup> nrgList, Uuid enepUuid, Uuid inepUuid, Uuid nodeUuid) {
         assertEquals(4, nrgList.size(), "Switch-OTSi should contain 4 node rule group");
         for (NodeRuleGroup nodeRuleGroup : nrgList) {
             assertEquals(2, nodeRuleGroup.getNodeEdgePoint().size(),
@@ -1072,8 +1093,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "the rule type should be 'FORWARDING'");
     }
 
-    private void checkNepClient100GSwitch(OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName,
-                                          String nodeId, String extension) {
+    private void checkNepClient100GSwitch(
+            OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName, String nodeId, String extension) {
         assertEquals(nepUuid, nep.getUuid(), "bad uuid for " + portName);
         List<Name> nameList = new ArrayList<>(nep.nonnullName().values());
         assertEquals(String.join("+", nodeId, extension, portName), nameList.get(0).getValue(),
@@ -1081,9 +1102,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         assertEquals(nepName, nameList.get(0).getValueName(),
             "value-name of client nep for '" + portName + "' should be '" + nepName + "'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry : nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(2, lpql.size(), "Client nep should support 2 kind of cep");
@@ -1094,8 +1113,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         checkSIP(nep, portName, nodeId, extension);
     }
 
-    private void checkNepClient100GTpdr(OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName,
-                                        String nodeId, String extension) {
+    private void checkNepClient100GTpdr(
+            OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName, String nodeId, String extension) {
         assertEquals(nepUuid, nep.getUuid(), "bad uuid for " + portName);
         List<Name> nameList = new ArrayList<>(nep.nonnullName().values());
         assertEquals(String.join("+", nodeId, extension, portName), nameList.get(0).getValue(),
@@ -1103,9 +1122,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         assertEquals(nepName, nameList.get(0).getValueName(),
             "value-name of client nep for '" + portName + "' should be 100G-tpdr'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry : nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(1, lpql.size(), "Client nep should support 1 kind of cep");
@@ -1115,17 +1132,15 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         checkSIP(nep, portName, nodeId, extension);
     }
 
-    private void checkNepOtsiNode(OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName,
-                                  String nodeId, String extension) {
+    private void checkNepOtsiNode(
+            OwnedNodeEdgePoint nep, Uuid nepUuid, String portName, String nepName, String nodeId, String extension) {
         assertEquals(nepUuid, nep.getUuid(), "bad uuid for " + portName);
         List<Name> nameList = new ArrayList<>(nep.nonnullName().values());
         assertEquals(String.join("+", nodeId, extension, portName), nameList.get(0).getValue(),
             "value of OTSi nep should be '" + portName + "'");
         assertEquals(nepName, nameList.get(0).getValueName(), "value-name of OTSi nep should be '" + nepName + "'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry : nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(2, lpql.size(), "OTSi nep should support 2 kind of cep");
@@ -1139,8 +1154,10 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
     }
 
     private void checkSIP(OwnedNodeEdgePoint nep, String portName, String nodeId, String extension) {
-        Uuid sipUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "SIP", nodeId, extension, portName))
-            .getBytes(Charset.forName("UTF-8"))).toString());
+        Uuid sipUuid = new Uuid(
+            UUID.nameUUIDFromBytes((String.join("+", "SIP", nodeId, extension, portName))
+                    .getBytes(Charset.forName("UTF-8")))
+                .toString());
         assertEquals(
             sipUuid,
             nep.getMappedServiceInterfacePoint().get(new MappedServiceInterfacePointKey(sipUuid))
@@ -1155,9 +1172,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         assertEquals(portName, nameList.get(0).getValue(), "value of OTSi nep should be '" + portName + "'");
         assertEquals(nepName, nameList.get(0).getValueName(), "value-name of OTSi nep should be '" + nepName + "'");
         List<LAYERPROTOCOLQUALIFIER> lpql = new ArrayList<>();
-        List<SupportedCepLayerProtocolQualifierInstances> lsclpqi = nep
-                .getSupportedCepLayerProtocolQualifierInstances();
-        for (SupportedCepLayerProtocolQualifierInstances entry : lsclpqi) {
+        for (SupportedCepLayerProtocolQualifierInstances entry : nep.getSupportedCepLayerProtocolQualifierInstances()) {
             lpql.add(entry.getLayerProtocolQualifier());
         }
         assertEquals(1, lpql.size(), "OTSi nep of RDM infra node should support only 1 kind of cep");
@@ -1189,8 +1204,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         assertEquals(PortRole.SYMMETRIC, nep.getLinkPortRole(), "link-port-role of client nep should be SYMMETRIC");
     }
 
-    private void checkOtnLink(Link link, Uuid node1Uuid, Uuid node2Uuid, Uuid tp1Uuid, Uuid tp2Uuid, Uuid linkUuid,
-                              String linkName) {
+    private void checkOtnLink(
+            Link link, Uuid node1Uuid, Uuid node2Uuid, Uuid tp1Uuid, Uuid tp2Uuid, Uuid linkUuid, String linkName) {
         assertEquals(linkName, link.getName().get(new NameKey("otn link name")).getValue(), "bad name for the link");
         assertEquals(linkUuid, link.getUuid(), "bad uuid for link");
         assertEquals(CAPACITYUNITGBPS.VALUE, link.getAvailableCapacity().getTotalSize().getUnit(),
@@ -1220,9 +1235,9 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         }
         assertEquals(ForwardingDirection.BIDIRECTIONAL, link.getDirection(), "otn tapi link should be BIDIRECTIONAL");
         List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
-            .link.NodeEdgePoint> nodeEdgePointList = new ArrayList<>(link.nonnullNodeEdgePoint().values());
-        LOG.info("OUTPUT: Node1UUID = {}, Node2UU2D = {},", node1Uuid.toString(), node2Uuid.toString());
-        LOG.info("NEPLIST = {}", nodeEdgePointList.toString());
+                .link.NodeEdgePoint> nodeEdgePointList = new ArrayList<>(link.nonnullNodeEdgePoint().values());
+        LOG.info("OUTPUT: Node1UUID = {}, Node2UU2D = {},", node1Uuid, node2Uuid);
+        LOG.info("NEPLIST = {}", nodeEdgePointList);
         assertEquals(topologyUuid, nodeEdgePointList.get(0).getTopologyUuid(),
             "topology uuid should be the same for the two termination point of the link");
         assertEquals(topologyUuid, nodeEdgePointList.get(1).getTopologyUuid(),
@@ -1244,8 +1259,8 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "administrative state should be UNLOCKED");
     }
 
-    private void checkOmsLink(Link link, Uuid node1Uuid, Uuid node2Uuid, Uuid tp1Uuid, Uuid tp2Uuid, Uuid linkUuid,
-                              String linkName) {
+    private void checkOmsLink(
+            Link link, Uuid node1Uuid, Uuid node2Uuid, Uuid tp1Uuid, Uuid tp2Uuid, Uuid linkUuid, String linkName) {
         assertEquals(linkName, link.getName().get(new NameKey("OTS link name")).getValue(), "bad name for the link");
         assertEquals(linkUuid, link.getUuid(), "bad uuid for link");
         assertEquals(
@@ -1254,7 +1269,7 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
             "oms link should be between 2 nodes of protocol layers PHOTONIC_MEDIA");
         assertEquals(ForwardingDirection.BIDIRECTIONAL, link.getDirection(), "otn tapi link should be BIDIRECTIONAL");
         List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121
-            .link.NodeEdgePoint> nodeEdgePointList = new ArrayList<>(link.nonnullNodeEdgePoint().values());
+                .link.NodeEdgePoint> nodeEdgePointList = new ArrayList<>(link.nonnullNodeEdgePoint().values());
         assertEquals(2, nodeEdgePointList.size(), "oms link should be between 2 neps");
         assertEquals(topologyUuid, nodeEdgePointList.get(0).getTopologyUuid(),
             "topology uuid should be the same for the two termination point of the link");
@@ -1275,42 +1290,42 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
     }
 
     private Node changeTerminationPointState(Node initialNode, String tpid, AdminStates admin, State oper) {
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder tpdr1Bldr
-            = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1Builder(
-            initialNode.augmentation(Node1.class));
+        var tpdr1Bldr = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .Node1Builder(initialNode.augmentation(Node1.class));
         Map<TerminationPointKey, TerminationPoint> tps = new HashMap<>(tpdr1Bldr.getTerminationPoint());
-        TerminationPointBuilder tpBldr = new TerminationPointBuilder(
-            tps.get(new TerminationPointKey(new TpId(tpid))));
-        TerminationPoint1Builder tp1Bldr = new TerminationPoint1Builder(tpBldr.augmentation(TerminationPoint1.class));
-        tp1Bldr.setAdministrativeState(admin)
-            .setOperationalState(oper);
+        TerminationPointBuilder tpBldr = new TerminationPointBuilder(tps.get(new TerminationPointKey(new TpId(tpid))));
+        TerminationPoint1Builder tp1Bldr =
+            new TerminationPoint1Builder(tpBldr.augmentation(TerminationPoint1.class))
+                .setAdministrativeState(admin)
+                .setOperationalState(oper);
         tpBldr.addAugmentation(tp1Bldr.build());
         tps.replace(tpBldr.key(), tpBldr.build());
-        tpdr1Bldr.setTerminationPoint(tps);
-        return new NodeBuilder(initialNode).addAugmentation(tpdr1Bldr.build()).build();
+        return new NodeBuilder(initialNode).addAugmentation(tpdr1Bldr.setTerminationPoint(tps).build()).build();
     }
 
-    private org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
-            .Link changeOtnLinkState(
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
-            .Link initiallink, AdminStates admin, State oper) {
-
-        org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
-            .LinkBuilder linkBldr = new
-            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
-            .LinkBuilder(initiallink);
-        Link1Builder link1Bldr = new Link1Builder(linkBldr.augmentation(Link1.class));
-        link1Bldr.setAdministrativeState(admin)
-            .setOperationalState(oper);
-        linkBldr.addAugmentation(link1Bldr.build());
-        return linkBldr.build();
+    private org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link changeOtnLinkState(
+            org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.Link initiallink,
+            AdminStates admin,
+            State oper) {
+        var linkBldr = new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
+                .networks.network.LinkBuilder(initiallink);
+        return linkBldr
+            .addAugmentation(
+                new Link1Builder(linkBldr.augmentation(Link1.class))
+                    .setAdministrativeState(admin)
+                    .setOperationalState(oper)
+                    .build())
+            .build();
     }
 
-    private int getNodeRank(String searchedChar,
-        List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> nodeList) {
+    private int getNodeRank(
+            String searchedChar,
+            List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node> nodeList) {
         int foundAtRank = 0;
         int rank = 0;
-        for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev221121.topology.Node node: nodeList) {
+        for (var node: nodeList) {
             for (Map.Entry<NameKey, Name> entry: node.getName().entrySet()) {
                 if (entry.getValue().getValue().contains(searchedChar)) {
                     foundAtRank = rank;
@@ -1321,4 +1336,4 @@ public class ConvertORTopoToTapiTopoTest extends AbstractTest {
         LOG.info("searched Char {} found at rank {}", searchedChar, foundAtRank);
         return foundAtRank;
     }
-}
\ No newline at end of file
+}