diff options
author | Michael Dürre <michael.duerre@highstreet-technologies.com> | 2024-08-15 10:04:54 +0200 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2024-09-12 15:48:04 -0400 |
commit | 7964e8aa9b9748678f6dadfe7b0c17c936679351 (patch) | |
tree | f4859812acd6ccccdaa698c567bb121f03f7b985 /sdnr/wt/devicemanager-onap/onf14/provider/src/main | |
parent | 556306410bc9c3a421cde351d287adeb705d1e8c (diff) |
migrate sdnr features to potassium
adapt features and poms for potassium-sr2
Issue-ID: CCSDK-4046
Change-Id: I67e8fc442811eca40c19f1f3777f1a36812d3e35
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf14/provider/src/main')
7 files changed, 102 insertions, 102 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/Onf14DomNetworkElement.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/Onf14DomNetworkElement.java index 4431865e2..61381554b 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/Onf14DomNetworkElement.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/Onf14DomNetworkElement.java @@ -30,7 +30,6 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.dataprovider import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.equipment.Onf14DomEquipmentManager; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.interfaces.Onf14DomInterfacePacManager; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.interfaces.TechnologySpecificPacKeys; -import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.qnames.Onf14DevicemanagerQNames; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.yangspecs.CoreModel14; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; @@ -131,6 +130,7 @@ public class Onf14DomNetworkElement implements NetworkElement, PerformanceDataPr @Override public void deregister() { + faultService.removeAllCurrentProblemsOfNode(netconfDomAccessor.getNodeId()); performanceManager.deRegistration(netconfDomAccessor.getNodeId()); } @@ -146,7 +146,17 @@ public class Onf14DomNetworkElement implements NetworkElement, PerformanceDataPr } @Override - public void warmstart() {} + public void warmstart() { + int problems = removeAllCurrentProblemsOfNode(); + log.debug("Removed all {} problems from database at deregistration for {}", problems, netconfDomAccessor.getNodeId().getValue()); + } + + /** + * Remove all entries from list + */ + public int removeAllCurrentProblemsOfNode() { + return faultService.removeAllCurrentProblemsOfNode(netconfDomAccessor.getNodeId()); + } @Override public Optional<NetconfAccessor> getAcessor() { diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/equipment/Onf14DomEquipmentManager.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/equipment/Onf14DomEquipmentManager.java index 6f7b24a19..557ddbca7 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/equipment/Onf14DomEquipmentManager.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/equipment/Onf14DomEquipmentManager.java @@ -85,6 +85,7 @@ public class Onf14DomEquipmentManager { List<Inventory> inventoryList = new ArrayList<>(); for (String uuid : getTopLevelEquipment(controlConstruct)) { Optional<NormalizedNode> equipment = readEquipmentInstance(netconfDomAccessor, uuid); + log.info("Equipment Data is - {}", equipment.get().prettyTree()); MapEntryNode equipmentEntry = (MapEntryNode) equipment.get(); if (equipmentEntry != null) { collectEquipment(inventoryList, equipmentEntry, null, EQUIPMENTROOTLEVEL); diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/AirInterface20.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/AirInterface20.java index 19dab4be9..f6f2fac74 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/AirInterface20.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/AirInterface20.java @@ -21,12 +21,10 @@ */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.yangspecs; -import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Optional; -import org.eclipse.jdt.annotation.NonNull; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.dataprovider.InternalDataModelSeverity; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.interfaces.TechnologySpecificPacKeys; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.pm.PerformanceDataAirInterface; @@ -43,10 +41,8 @@ import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.Revision; import org.opendaylight.yangtools.yang.common.XMLNamespace; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; @@ -70,8 +66,7 @@ public class AirInterface20 extends YangModule { this.coreModel14 = coreModel14; } - public FaultData readAllCurrentProblems(FaultData resultList, - List<TechnologySpecificPacKeys> airInterfaceList) { + public FaultData readAllCurrentProblems(FaultData resultList, List<TechnologySpecificPacKeys> airInterfaceList) { int idxStart; // Start index for debug messages @@ -107,20 +102,24 @@ public class AirInterface20 extends YangModule { // model YangInstanceIdentifier layerProtocolIID = coreModel14.getLayerProtocolIId(ltpUuid, localId); - - @NonNull - AugmentationIdentifier airInterfacePacIID = - YangInstanceIdentifier.AugmentationIdentifier.create(Sets.newHashSet(getQName("air-interface-pac"))); - - InstanceIdentifierBuilder augmentedAirInterfacePacIID = - YangInstanceIdentifier.builder(layerProtocolIID).node(airInterfacePacIID); - + InstanceIdentifierBuilder airInterfacePacIID = + YangInstanceIdentifier.builder(layerProtocolIID).node(getQName("air-interface-pac")); + + // @NonNull + // AugmentationIdentifier airInterfacePacIID = + // YangInstanceIdentifier.AugmentationIdentifier.create(Sets.newHashSet(getQName("air-interface-pac"))); + // + // InstanceIdentifierBuilder augmentedAirInterfacePacIID = + // YangInstanceIdentifier.builder(layerProtocolIID).node(airInterfacePacIID); + // // reading all the current-problems list for this specific LTP and LP Optional<NormalizedNode> airInterfacePacDataOpt = - netconfDomAccessor.readDataNode(LogicalDatastoreType.OPERATIONAL, augmentedAirInterfacePacIID.build()); - + netconfDomAccessor.readDataNode(LogicalDatastoreType.OPERATIONAL, airInterfacePacIID.build()); if (airInterfacePacDataOpt.isPresent()) { - AugmentationNode airInterfacePacData = (AugmentationNode) airInterfacePacDataOpt.get(); + LOG.info("Air Interface = {}", airInterfacePacDataOpt.get().prettyTree()); + } + if (airInterfacePacDataOpt.isPresent()) { + ContainerNode airInterfacePacData = (ContainerNode) airInterfacePacDataOpt.get(); MapNode airInterfaceCurrentProblemsList = (MapNode) airInterfacePacData.childByArg(new NodeIdentifier(getQName("current-problem-list"))); if (airInterfaceCurrentProblemsList != null) { @@ -151,42 +150,44 @@ public class AirInterface20 extends YangModule { // model YangInstanceIdentifier layerProtocolIID = coreModel14.getLayerProtocolIId(ltpUuid, localId); - - @NonNull - AugmentationIdentifier airInterfacePacIID = YangInstanceIdentifier.AugmentationIdentifier - .create(Sets.newHashSet(Onf14DevicemanagerQNames.AIR_INTERFACE_PAC)); - - InstanceIdentifierBuilder augmentedAirInterfacePacIID = - YangInstanceIdentifier.builder(layerProtocolIID).node(airInterfacePacIID); - - // reading historical performance list for this specific LTP and LP - Optional<NormalizedNode> airInterfacePacDataOpt = - netconfDomAccessor.readDataNode(LogicalDatastoreType.OPERATIONAL, augmentedAirInterfacePacIID.build()); - LOG.debug("Performance Data = {}", airInterfacePacDataOpt.get().body()); - if (airInterfacePacDataOpt.isPresent()) { - AugmentationNode airInterfacePacData = (AugmentationNode) airInterfacePacDataOpt.get(); - ContainerNode cn = (ContainerNode) airInterfacePacData - .childByArg(new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_PAC)); - if (cn != null) { - ContainerNode airIntfHistPerf = (ContainerNode) cn - .childByArg(new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_HISTORICAL_PERFORMANCES)); - if (airIntfHistPerf != null) { - MapNode airInterfaceHistoricalPerformanceList = (MapNode) airIntfHistPerf.childByArg( - new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_HISTORICAL_PERFORMANCES_LIST)); - if (airInterfaceHistoricalPerformanceList != null) { - Collection<MapEntryNode> airInterfaceHistoricalPerfCollection = - airInterfaceHistoricalPerformanceList.body(); - for (MapEntryNode airInterfaceHistPerf : airInterfaceHistoricalPerfCollection) { - res.add(new PerformanceDataAirInterface(netconfDomAccessor.getNodeId(), ltpUuid, localId, - airInterfaceHistPerf)); + InstanceIdentifierBuilder airInterfacePacIID = + YangInstanceIdentifier.builder(layerProtocolIID).node(getQName("air-interface-pac")); + + // @NonNull + // AugmentationIdentifier airInterfacePacIID = YangInstanceIdentifier.AugmentationIdentifier + // .create(Sets.newHashSet(Onf14DevicemanagerQNames.AIR_INTERFACE_PAC)); + // + // InstanceIdentifierBuilder augmentedAirInterfacePacIID = + // YangInstanceIdentifier.builder(layerProtocolIID).node(airInterfacePacIID); + // + // // reading historical performance list for this specific LTP and LP + Optional<NormalizedNode> airInterfacePacDataOpt = + netconfDomAccessor.readDataNode(LogicalDatastoreType.OPERATIONAL, airInterfacePacIID.build()); + LOG.debug("Performance Data = {}", airInterfacePacDataOpt.get().body()); + if (airInterfacePacDataOpt.isPresent()) { + ContainerNode airInterfacePacData = (ContainerNode) airInterfacePacDataOpt.get(); + ContainerNode cn = (ContainerNode) airInterfacePacData + .childByArg(new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_PAC)); + if (cn != null) { + ContainerNode airIntfHistPerf = (ContainerNode) cn + .childByArg(new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_HISTORICAL_PERFORMANCES)); + if (airIntfHistPerf != null) { + MapNode airInterfaceHistoricalPerformanceList = (MapNode) airIntfHistPerf.childByArg( + new NodeIdentifier(Onf14DevicemanagerQNames.AIR_INTERFACE_HISTORICAL_PERFORMANCES_LIST)); + if (airInterfaceHistoricalPerformanceList != null) { + Collection<MapEntryNode> airInterfaceHistoricalPerfCollection = + airInterfaceHistoricalPerformanceList.body(); + for (MapEntryNode airInterfaceHistPerf : airInterfaceHistoricalPerfCollection) { + res.add(new PerformanceDataAirInterface(netconfDomAccessor.getNodeId(), ltpUuid, localId, + airInterfaceHistPerf)); + } + return res; + } else { + LOG.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } } - return res; - } else { - LOG.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); } } - } - } return null; } diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/Alarms10.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/Alarms10.java index 3f92eb0ca..efbcab158 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/Alarms10.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/Alarms10.java @@ -21,7 +21,6 @@ */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.yangspecs; -import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -44,10 +43,8 @@ import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.Revision; import org.opendaylight.yangtools.yang.common.XMLNamespace; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; @@ -132,21 +129,22 @@ public class Alarms10 extends YangModule { YangInstanceIdentifier alarmsPacIID = YangInstanceIdentifier.builder().node(coreModel14.getControlConstructQName()).build(); - - @NonNull - AugmentationIdentifier alarmsContainerIID = - YangInstanceIdentifier.AugmentationIdentifier.create(Sets.newHashSet(ALARM_PAC)); - - InstanceIdentifierBuilder augmentedAlarmsIID = - YangInstanceIdentifier.builder(alarmsPacIID).node(alarmsContainerIID); - - // reading all the alarms + InstanceIdentifierBuilder alarmsContainerIID = YangInstanceIdentifier.builder(alarmsPacIID).node(ALARM_PAC); + + // @NonNull + // AugmentationIdentifier alarmsContainerIID = + // YangInstanceIdentifier.AugmentationIdentifier.create(Sets.newHashSet(ALARM_PAC)); + // + // InstanceIdentifierBuilder augmentedAlarmsIID = + // YangInstanceIdentifier.builder(alarmsPacIID).node(alarmsContainerIID); + // + // // reading all the alarms Optional<NormalizedNode> alarms = - this.getNetconfDomAccessor().readDataNode(LogicalDatastoreType.OPERATIONAL, augmentedAlarmsIID.build()); + this.getNetconfDomAccessor().readDataNode(LogicalDatastoreType.OPERATIONAL, alarmsContainerIID.build()); FaultData resultList = new FaultData(); if (alarms.isPresent()) { - AugmentationNode alarmsDataNode = (AugmentationNode) alarms.get(); + ContainerNode alarmsDataNode = (ContainerNode) alarms.get(); ContainerNode alarmsContainer = (ContainerNode) alarmsDataNode.childByArg(new NodeIdentifier(ALARM_PAC)); ContainerNode currentAlarmsContainer = (ContainerNode) alarmsContainer.childByArg(new NodeIdentifier(CURRENT_ALARMS)); @@ -167,6 +165,7 @@ public class Alarms10 extends YangModule { } } return resultList; + } public boolean isSupported(Capabilities capabilites) { diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/CoreModel14.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/CoreModel14.java index 5a2b5772b..f2990a07d 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/CoreModel14.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/CoreModel14.java @@ -68,11 +68,6 @@ public class CoreModel14 extends YangModule { return module.getRevision().get().toString(); } - @Override - public QName getQName(String localName) { - return QName.create(module, localName); - } - public QName getControlConstructQName() { return CONTROL_CONSTRUCT; } diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/EthernetContainer20.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/EthernetContainer20.java index 81aec9dd0..cbc76bc7f 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/EthernetContainer20.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/EthernetContainer20.java @@ -21,12 +21,10 @@ */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.yangspecs; -import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Optional; -import org.eclipse.jdt.annotation.NonNull; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.dataprovider.InternalDataModelSeverity; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.interfaces.TechnologySpecificPacKeys; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.util.Debug; @@ -40,10 +38,9 @@ import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.Revision; import org.opendaylight.yangtools.yang.common.XMLNamespace; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; +import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -74,20 +71,20 @@ public class EthernetContainer20 extends YangModule { // constructing the IID needs the augmentation exposed by the // ethernet-container-2-0 model YangInstanceIdentifier layerProtocolIID = coreModel14.getLayerProtocolIId(ltpUuid, localId); - - @NonNull - AugmentationIdentifier ethernetContainerIID = YangInstanceIdentifier.AugmentationIdentifier - .create(Sets.newHashSet(getQName("ethernet-container-pac"))); - - InstanceIdentifierBuilder augmentedEthernetContainerConfigurationIID = - YangInstanceIdentifier.builder(layerProtocolIID).node(ethernetContainerIID); - - // reading all the current-problems list for this specific LTP and LP + InstanceIdentifierBuilder ethernetContainerIID = YangInstanceIdentifier.builder(layerProtocolIID).node(getQName("ethernet-container-pac")); +// @NonNull +// AugmentationIdentifier ethernetContainerIID = YangInstanceIdentifier.AugmentationIdentifier +// .create(Sets.newHashSet(getQName("ethernet-container-pac"))); +// +// InstanceIdentifierBuilder augmentedEthernetContainerConfigurationIID = +// YangInstanceIdentifier.builder(layerProtocolIID).node(ethernetContainerIID); +// +// // reading all the current-problems list for this specific LTP and LP Optional<NormalizedNode> etherntContainerConfigurationOpt = netconfDomAccessor - .readDataNode(LogicalDatastoreType.OPERATIONAL, augmentedEthernetContainerConfigurationIID.build()); + .readDataNode(LogicalDatastoreType.OPERATIONAL, ethernetContainerIID.build()); if (etherntContainerConfigurationOpt.isPresent()) { - AugmentationNode etherntContainerConfiguration = (AugmentationNode) etherntContainerConfigurationOpt.get(); + ContainerNode etherntContainerConfiguration = (ContainerNode) etherntContainerConfigurationOpt.get(); MapNode ethernetContainerCurrentProblemsList = (MapNode) etherntContainerConfiguration .childByArg(new NodeIdentifier(getQName("current-problem-list"))); if (ethernetContainerCurrentProblemsList != null) { diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/WireInterface20.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/WireInterface20.java index c97449d69..977fdb19c 100644 --- a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/WireInterface20.java +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/dom/impl/yangspecs/WireInterface20.java @@ -21,12 +21,10 @@ */ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.yangspecs; -import com.google.common.collect.Sets; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Optional; -import org.eclipse.jdt.annotation.NonNull; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.dataprovider.InternalDataModelSeverity; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.interfaces.TechnologySpecificPacKeys; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.dom.impl.qnames.Onf14DevicemanagerQNames; @@ -41,10 +39,9 @@ import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.common.Revision; import org.opendaylight.yangtools.yang.common.XMLNamespace; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.AugmentationNode; +import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode; import org.opendaylight.yangtools.yang.data.api.schema.MapNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -74,20 +71,21 @@ public class WireInterface20 extends YangModule { // constructing the IID needs the augmentation exposed by the wire-interface-2-0 // model YangInstanceIdentifier layerProtocolIID = coreModel14.getLayerProtocolIId(ltpUuid, localId); - - @NonNull - AugmentationIdentifier wireInterfacePacIID = YangInstanceIdentifier.AugmentationIdentifier - .create(Sets.newHashSet(Onf14DevicemanagerQNames.WIRE_INTERFACE_PAC)); - - InstanceIdentifierBuilder augmentedWireInterfaceConfigurationIID = - YangInstanceIdentifier.builder(layerProtocolIID).node(wireInterfacePacIID); + InstanceIdentifierBuilder wireInterfacePacIID = + YangInstanceIdentifier.builder(layerProtocolIID).node(Onf14DevicemanagerQNames.WIRE_INTERFACE_PAC); + // @NonNull + // YangInstanceIdentifier wireInterfacePacIID = + // YangInstanceIdentifier.of(Onf14DevicemanagerQNames.WIRE_INTERFACE_PAC); + // + // InstanceIdentifierBuilder augmentedWireInterfaceConfigurationIID = + // YangInstanceIdentifier.builder(layerProtocolIID).node(wireInterfacePacIID.getLastPathArgument()); // reading all the current-problems list for this specific LTP and LP - Optional<NormalizedNode> wireInterfaceConfigurationOpt = netconfDomAccessor - .readDataNode(LogicalDatastoreType.OPERATIONAL, augmentedWireInterfaceConfigurationIID.build()); + Optional<NormalizedNode> wireInterfaceConfigurationOpt = + netconfDomAccessor.readDataNode(LogicalDatastoreType.OPERATIONAL, wireInterfacePacIID.build()); if (wireInterfaceConfigurationOpt.isPresent()) { - AugmentationNode wireInterfaceConfiguration = (AugmentationNode) wireInterfaceConfigurationOpt.get(); + ContainerNode wireInterfaceConfiguration = (ContainerNode) wireInterfaceConfigurationOpt.get(); MapNode wireInterfaceCurrentProblemsList = (MapNode) wireInterfaceConfiguration .childByArg(new NodeIdentifier(Onf14DevicemanagerQNames.WIRE_INTERFACE_CURRENT_PROBLEMS_LIST)); if (wireInterfaceCurrentProblemsList != null) { @@ -111,8 +109,7 @@ public class WireInterface20 extends YangModule { return resultList; } - public FaultData readAllCurrentProblems(FaultData resultList, - List<TechnologySpecificPacKeys> wireInterfaceList) { + public FaultData readAllCurrentProblems(FaultData resultList, List<TechnologySpecificPacKeys> wireInterfaceList) { int idxStart; // Start index for debug messages |