aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-08-23 15:56:18 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-23 15:56:18 +0000
commit2a55fbf61c4450bfc2bb3f90b060c3aa65af91f3 (patch)
tree7fda01bd9195d9a2317844a5d5ba861d9334f5e4
parentc7b35a2071b8f692ea5bbd9813452c0416e796b2 (diff)
parentf9a40915be030cd446a843b26a603907538ab971 (diff)
Merge "Fix severity mapping in VES Fault"
-rw-r--r--sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanFaultToVESFaultMapper.java6
-rw-r--r--sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/TestAlarmNotif.java3
2 files changed, 6 insertions, 3 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/impl/ORanFaultToVESFaultMapper.java b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanFaultToVESFaultMapper.java
index 0d68bdbf5..ec8eaa7b7 100644
--- a/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanFaultToVESFaultMapper.java
+++ b/sdnr/wt/devicemanager-o-ran-sc/o-ran/ru-fh/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/oran/impl/ORanFaultToVESFaultMapper.java
@@ -148,7 +148,11 @@ public class ORanFaultToVESFaultMapper {
vesFaultFields.setAlarmCondition(alarmNotif.getFaultId().toString());
vesFaultFields.setAlarmInterfaceA(alarmNotif.getFaultSource());
vesFaultFields.setEventCategory(VES_EVENT_CATEGORY);
- vesFaultFields.setEventSeverity(alarmNotif.getFaultSeverity().getName());
+ if (alarmNotif.getIsCleared()) {
+ vesFaultFields.setEventSeverity("NORMAL");
+ } else {
+ vesFaultFields.setEventSeverity(alarmNotif.getFaultSeverity().getName());
+ }
vesFaultFields.setEventSourceType(getModelName());
vesFaultFields.setFaultFieldsVersion(VES_FAULT_FIELDS_VERSION);
vesFaultFields.setSpecificProblem(alarmNotif.getFaultText());
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/TestAlarmNotif.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/TestAlarmNotif.java
index b3388114b..4d10dd154 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/TestAlarmNotif.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/TestAlarmNotif.java
@@ -83,8 +83,7 @@ public class TestAlarmNotif implements AlarmNotif {
@Override
public Boolean getIsCleared() {
- // TODO Auto-generated method stub
- return null;
+ return true;
}
}