summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-11-20 20:56:44 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-11-20 20:56:44 -0500
commitba40eeb0df65eba18fa150c8736f6cc084508d4b (patch)
treeb8f0b906a8677a22a931391ea9db2416fccfccb2 /common
parentdf2db9f4a7c3fccc5f617792a057d8dbc6bf9d34 (diff)
vnf and vf module replace requests to make
Added cloudConfiguration when not sent in replace request Added robot test for vfModule request with no cloud config Started adding unit tests for ServiceInstances Added unit tests for BpmnRequestBuilder changes Added ServiceInstances tests to test replace without CloudConfig Removed unused wiremock stubbings from test Added check for replaceInstanceRetainAssignments action Added action to common package to fix failing robot tests Removed new test, updated existing vfModule replace Added jackson annotations to RequestError object Fixed failing unit tests apih common Issue-ID: SO-2523 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I9470a0a9c7e356ef98ceb7269e066e79e0afb074
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java11
-rw-r--r--common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java3
2 files changed, 12 insertions, 2 deletions
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
index 121fd4a1a5..33678b336f 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/RequestError.java
@@ -33,7 +33,12 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
+import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
+import com.fasterxml.jackson.annotation.JsonTypeName;
/**
@@ -63,7 +68,9 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {"policyException", "serviceException"})
@XmlRootElement(name = "requestError")
-@JsonRootName(value = "requestError")
+@JsonTypeName("requestError")
+@JsonTypeInfo(include = As.WRAPPER_OBJECT, use = Id.NAME)
+@JsonInclude(Include.NON_NULL)
public class RequestError {
protected PolicyException policyException;
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
index f2976136e9..cbbc7f61c1 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/ServiceException.java
@@ -31,6 +31,8 @@ package org.onap.so.serviceinstancebeans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -55,6 +57,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "serviceException")
@JsonRootName(value = "serviceException")
+@JsonInclude(Include.NON_EMPTY)
public class ServiceException extends ExceptionType {