aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkrishna <krishna.moorthy6@wipro.com>2019-05-13 20:06:22 +0530
committerkrishna <krishna.moorthy6@wipro.com>2019-05-13 22:46:03 +0530
commitcf1fb180941364f253de8aea9e1c811abe8b89db (patch)
treeae2aa0b21603f5e8a22002e77778135ec2580d62 /src
parentddae038a611fb6f2bc5cb42be3069a5dacbbfd6e (diff)
Ignore additional fields in FM and PM messages
Change-Id: I5de3f6d6c5f0bbf0e7d4f250b84ab51e5482525b Issue-ID: DCAEGEN2-1497 Signed-off-by: krishna <krishna.moorthy6@wipro.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java3
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/Event.java3
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java3
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java4
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java3
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java3
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java3
7 files changed, 19 insertions, 3 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java b/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java
index 013dc66..5863bd8 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java
@@ -21,6 +21,9 @@
package org.onap.dcaegen2.services.sonhms;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
public class CommonEventHeader {
private String version;
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java b/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java
index 3a71f2b..7338911 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java
@@ -21,6 +21,9 @@
package org.onap.dcaegen2.services.sonhms;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
public class Event {
private CommonEventHeader commonEventHeader;
private FaultFields faultFields;
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java
index a2c877d..e95d38e 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java
@@ -21,6 +21,9 @@
package org.onap.dcaegen2.services.sonhms;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
public class FaultFields {
@Override
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java b/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java
index 3860311..12113ce 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java
@@ -23,8 +23,6 @@ package org.onap.dcaegen2.services.sonhms.dmaap;
import com.att.nsa.cambria.client.CambriaConsumer;
-import java.io.IOException;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -51,7 +49,7 @@ public class NotificationConsumer implements Runnable {
log.debug(msg);
notificationCallback.activateCallBack(msg);
}
- } catch (IOException e) {
+ } catch (Exception e) {
log.debug("exception when fetching msgs from dmaap", e);
}
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java
index c55c6d6..f71df00 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java
@@ -21,8 +21,11 @@
package org.onap.dcaegen2.services.sonhms.model;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
import java.util.Map;
+@JsonIgnoreProperties(ignoreUnknown = true)
public class AdditionalMeasurements {
String name;
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java
index 73edc39..e6a1869 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java
@@ -21,8 +21,11 @@
package org.onap.dcaegen2.services.sonhms.model;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
import org.onap.dcaegen2.services.sonhms.CommonEventHeader;
+@JsonIgnoreProperties(ignoreUnknown = true)
public class Event {
CommonEventHeader commonEventHeader;
MeasurementFields measurementFields;
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java
index 477a2d3..fea6271 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java
@@ -21,8 +21,11 @@
package org.onap.dcaegen2.services.sonhms.model;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+
import java.util.List;
+@JsonIgnoreProperties(ignoreUnknown = true)
public class MeasurementFields {
String measurementInterval;