diff options
author | Steve Smokowski <ss835w@att.com> | 2019-03-14 12:57:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-14 12:57:41 +0000 |
commit | ad73b9e2686d5eabe6e2289fd3cc7fefcad9558e (patch) | |
tree | cfb472d2b8069a16784869353a5904bcf19140e4 /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | 6bcd113098d1211dbe578335719c6bb95be31310 (diff) | |
parent | da10fa6c82bafad3f2b01f4a52fbdc5f7b5d2e04 (diff) |
Merge "Pass the revised value of usePreload to JSON"
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); } |