diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-13 15:52:08 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-13 15:52:26 -0400 |
commit | da10fa6c82bafad3f2b01f4a52fbdc5f7b5d2e04 (patch) | |
tree | 28ed924e08cbb5ef4877e5820339743a2c0289cc /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | 7321d01bda3524066d5a76276a4511554b7a4062 (diff) |
Pass the revised value of usePreload to JSON
Pass the possibly revised value of usePreload to JSON going to BPMN.
Change-Id: Idc46a8786bc7bbdbf860b59998785c1c885689e4
Issue-ID: SO-1652
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index 2dab494b07..ec1c4cb362 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -1125,12 +1125,16 @@ public class ServiceInstances { mapper.setSerializationInclusion(Include.NON_NULL); if(msoRawRequest != null){ ServiceInstancesRequest sir = mapper.readValue(msoRawRequest, ServiceInstancesRequest.class); - if( !isAlaCarte && Action.createInstance.equals(action) && serviceInstRequest != null && + if( serviceInstRequest != null && serviceInstRequest.getRequestDetails() != null && serviceInstRequest.getRequestDetails().getRequestParameters() != null) { - sir.getRequestDetails().setCloudConfiguration(serviceInstRequest.getRequestDetails().getCloudConfiguration()); - sir.getRequestDetails().getRequestParameters().setUserParams(serviceInstRequest.getRequestDetails().getRequestParameters().getUserParams()); + if( !isAlaCarte && Action.createInstance.equals(action)) { + sir.getRequestDetails().setCloudConfiguration(serviceInstRequest.getRequestDetails().getCloudConfiguration()); + sir.getRequestDetails().getRequestParameters().setUserParams(serviceInstRequest.getRequestDetails().getRequestParameters().getUserParams()); + } + sir.getRequestDetails().getRequestParameters().setUsePreload(serviceInstRequest.getRequestDetails().getRequestParameters().getUsePreload()); } + logger.debug("Value as string: {}", mapper.writeValueAsString(sir)); return mapper.writeValueAsString(sir); } |