aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/mountpoint-registrar/provider
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/mountpoint-registrar/provider')
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java6
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java8
2 files changed, 8 insertions, 6 deletions
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java
index b9cd5fc1a..ec5198012 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java
@@ -21,6 +21,8 @@ package org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
+import java.time.Instant;
+import java.time.ZoneId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,8 +61,8 @@ public class DMaaPFaultVESMsgConsumer extends DMaaPVESMsgConsumerImpl {
return;
}
faultNodeId = dmaapMessageRootNode.at("/event/commonEventHeader/sourceName").textValue();
- faultOccurrenceTime =
- dmaapMessageRootNode.at("/event/faultFields/alarmAdditionalInformation/eventTime").textValue();
+ faultOccurrenceTime = Instant.ofEpochMilli(dmaapMessageRootNode.at("/event/commonEventHeader/startEpochMicrosec").longValue()/1000)
+ .atZone(ZoneId.of("Z")).toString();
faultObjectId = dmaapMessageRootNode.at("/event/faultFields/alarmInterfaceA").textValue();
faultReason = dmaapMessageRootNode.at("/event/faultFields/specificProblem").textValue();
faultSeverity = dmaapMessageRootNode.at("/event/faultFields/eventSeverity").textValue();
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
index 0d9f107a8..cf25e1e7b 100644
--- a/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
+++ b/sdnr/wt/mountpoint-registrar/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/test/TestDMaaPFaultVESMsgConsumer.java
@@ -44,8 +44,8 @@ public class TestDMaaPFaultVESMsgConsumer {
+ " \"reportingEntityName\":\"1e9a28bcd119_50007\","
+ " \"sourceId\":\"\","
+ " \"sourceName\":\"1e9a28bcd119_50007\","
- + " \"startEpochMicrosec\":94801033822670,"
- + " \"lastEpochMicrosec\":94801033822670,"
+ + " \"startEpochMicrosec\":1614004128699785,"
+ + " \"lastEpochMicrosec\":1614004128699785,"
+ " \"nfNamingCode\":\"sdn controller\","
+ " \"nfVendorName\":\"sdn\","
+ " \"timeZoneOffset\":\"+00:00\","
@@ -86,8 +86,8 @@ public class TestDMaaPFaultVESMsgConsumer {
+ " \"reportingEntityName\":\"1e9a28bcd119_50007\","
+ " \"sourceId\":\"\","
+ " \"sourceName\":\"1e9a28bcd119_50007\","
- + " \"startEpochMicrosec\":94801033822670,"
- + " \"lastEpochMicrosec\":94801033822670,"
+ + " \"startEpochMicrosec\":1612349525626,"
+ + " \"lastEpochMicrosec\":1612349525626,"
+ " \"nfNamingCode\":\"sdn controller\","
+ " \"nfVendorName\":\"sdn\","
+ " \"timeZoneOffset\":\"+00:00\","