summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/mountpoint-registrar/provider/src/main/java
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-02-23 07:20:02 +0100
committerRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-02-23 07:20:33 +0100
commitf0f6564eddb19286454130e9d645228bca38d98b (patch)
tree0ea0c3223bb2a1d850c6776425c64beef6f2ce93 /sdnr/wt/mountpoint-registrar/provider/src/main/java
parentf333557c8bf0a74eb7b88d6294dea2a420b1ec61 (diff)
VES fault read from DMaaP fails
VES eventtime now read from the mandatory field in commoneventheader Issue-ID: CCSDK-3157 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: I7bbfddcbb2c0c6fbb1b91b2a2e5e16fd5703ad56 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/mountpoint-registrar/provider/src/main/java')
-rw-r--r--sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/DMaaPFaultVESMsgConsumer.java6
1 files changed, 4 insertions, 2 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();