diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2024-03-01 14:17:05 +0530 |
---|---|---|
committer | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2024-03-01 17:12:58 +0100 |
commit | 2a06bf83bac4042370715a450c7d3d83b497b50f (patch) | |
tree | a83c6a92f1fc662b7136be3f71e4efa834d310f4 /sdnr/wt | |
parent | a3af380c3e82676d3fca1deecd4307c60c540cbb (diff) |
Change event time mapping
Use event-time from o-ran-fm instead of eventTime from notification
Issue-ID: CCSDK-3988
Change-Id: I3e3445a99315527ddcf1996fd96c269ae85748a6
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt')
4 files changed, 17 insertions, 24 deletions
diff --git a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/dataprovider/ORanDOMToInternalDataModel.java b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/dataprovider/ORanDOMToInternalDataModel.java index cad7d2cda..a1ec2fc9e 100644 --- a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/dataprovider/ORanDOMToInternalDataModel.java +++ b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/dataprovider/ORanDOMToInternalDataModel.java @@ -237,7 +237,7 @@ public class ORanDOMToInternalDataModel { faultAlarm.setId(ORanDMDOMUtility.getLeafValue(cn, oranfm.getFaultIdQName())); faultAlarm.setSourceType(SourceType.Netconf); faultAlarm.setTimestamp(NetconfTimeStampImpl.getConverter() - .getTimeStamp(ORanDMDOMUtility.getNotificationInstant(notification).toString())); + .getTimeStamp(ORanDMDOMUtility.getLeafValue(cn, oranfm.getFaultEventTimeQName()))); return faultAlarm.build(); } @@ -249,7 +249,8 @@ public class ORanDOMToInternalDataModel { faultAlarm.setSeverity(getSeverityType( ORanDMDOMUtility.getLeafValue(activeAlarmEntry, oranfm.getFaultSeverityQName()), ORanDMDOMUtility.getLeafValue(activeAlarmEntry, oranfm.getFaultIsClearedQName()).equals("true"))); - faultAlarm.setCounter(Integer.parseInt(ORanDMDOMUtility.getLeafValue(activeAlarmEntry, oranfm.getFaultIdQName()))); + faultAlarm.setCounter( + Integer.parseInt(ORanDMDOMUtility.getLeafValue(activeAlarmEntry, oranfm.getFaultIdQName()))); faultAlarm.setId(ORanDMDOMUtility.getLeafValue(activeAlarmEntry, oranfm.getFaultIdQName())); faultAlarm.setSourceType(SourceType.Netconf); faultAlarm.setTimestamp(NetconfTimeStampImpl.getConverter() diff --git a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/yangspecs/ORANFM.java b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/yangspecs/ORANFM.java index 5be18e75b..a4ef8b9fa 100644 --- a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/yangspecs/ORANFM.java +++ b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/yangspecs/ORANFM.java @@ -39,23 +39,9 @@ public class ORANFM extends YangModule { public static final QNameModule ORANFM_2022_08_15 = QNameModule.create(XMLNamespace.of(NAMESPACE), Revision.of("2022-08-15")); private static final List<QNameModule> MODULES = Arrays.asList(ORANFM_2019_02_04, ORANFM_2022_08_15); -// private final QName ORAN_FM_ALARM_NOTIF; -// private final QName ORAN_FM_FAULT_ID; -// private final QName ORAN_FM_FAULT_SOURCE; -// private final QName ORAN_FM_FAULT_SEVERITY; -// private final QName ORAN_FM_FAULT_TEXT; -// private final QName ORAN_FM_FAULT_IS_CLEARED; - - ORANFM(NetconfDomAccessor netconfDomAccessor, QNameModule module) { super(netconfDomAccessor, module); -// ORAN_FM_ALARM_NOTIF = QName.create(module, "alarm-notif"); -// ORAN_FM_FAULT_ID = QName.create(module, "fault-id"); -// ORAN_FM_FAULT_SOURCE = QName.create(module, "fault-source"); -// ORAN_FM_FAULT_SEVERITY = QName.create(module, "fault-severity"); -// ORAN_FM_FAULT_TEXT = QName.create(module, "fault-text"); -// ORAN_FM_FAULT_IS_CLEARED = QName.create(module, "is-cleared"); } public QName getFaultSourceQName() { @@ -83,17 +69,17 @@ public class ORANFM extends YangModule { } public QName getFaultEventTimeQName() { - return getQName("event-time"); + return getQName("event-time"); } - + public QName getFaultActiveAlarmListQName() { - return getQName("active-alarm-list"); + return getQName("active-alarm-list"); } - + public QName getFaultActiveAlarmsQName() { - return getQName("active-alarms"); + return getQName("active-alarms"); } - + /** * Get specific instance, depending on capabilities * diff --git a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMFaultNotificationListener.java b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMFaultNotificationListener.java index de19bf1a2..65ad9fe55 100644 --- a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMFaultNotificationListener.java +++ b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMFaultNotificationListener.java @@ -133,7 +133,10 @@ public class TestORanDOMFaultNotificationListener { .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultSourceQName(), "Slot-2-Port-B")) .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultSeverityQName(), "MAJOR")) .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultIsClearedQName(), "true")) - .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultTextQName(), "CPRI Port Down")).build(); + .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultTextQName(), "CPRI Port Down")) + .withChild( + ImmutableNodes.leafNode(oranfm.get().getFaultEventTimeQName(), "2024-02-29T09:33:31.000+00:00")) + .build(); } public static class NetconfDeviceNotification implements DOMNotification, DOMEvent { diff --git a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMToInternalDataModel.java b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMToInternalDataModel.java index f8a6dfd40..b86177cdb 100644 --- a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMToInternalDataModel.java +++ b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/dom/TestORanDOMToInternalDataModel.java @@ -216,7 +216,10 @@ public class TestORanDOMToInternalDataModel { .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultSourceQName(), "Slot-2-Port-B")) .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultSeverityQName(), "MAJOR")) .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultIsClearedQName(), "true")) - .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultTextQName(), "CPRI Port Down")).build(); + .withChild(ImmutableNodes.leafNode(oranfm.get().getFaultTextQName(), "CPRI Port Down")) + .withChild( + ImmutableNodes.leafNode(oranfm.get().getFaultEventTimeQName(), "2024-02-29T09:33:31.000+00:00")) + .build(); } public static class NetconfDeviceNotification implements DOMNotification, DOMEvent { |