From 2270d14546b6e7876fe3ae04f0d32eb330eb4374 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Wed, 13 Mar 2019 12:48:52 -0400 Subject: Set fromPreload to true for aLaCarte and to false Set fromPreload to true for aLaCarte and to false for Macro if no usePreload value is specified. Change-Id: I3ca148dc93c03040de32174566dee2bf90851ced Issue-ID: SO-1641 Signed-off-by: Benjamin, Max (mb388a) --- .../validation/RequestParametersValidation.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RequestParametersValidation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RequestParametersValidation.java index edb92ef68b..8e1a6f5d35 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RequestParametersValidation.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/validation/RequestParametersValidation.java @@ -71,6 +71,23 @@ public class RequestParametersValidation implements ValidationRule{ } if(requestScope.equalsIgnoreCase(ModelType.vfModule.name())){ if(action == Action.createInstance || action == Action.updateInstance){ + if(requestParameters.isUsePreload() == null){ + if(reqVersion >= 4){ + if (requestParameters.getALaCarte() == null || requestParameters.getALaCarte() == true) { + requestParameters.setUsePreload(true); + } + else { + requestParameters.setUsePreload(false); + } + } + else { + requestParameters.setUsePreload(true); + } + } + } + } + if(requestScope.equalsIgnoreCase(ModelType.service.name())){ + if(action == Action.createInstance){ if(requestParameters.isUsePreload() == null){ if(reqVersion >= 4){ if (requestParameters.getALaCarte() == null || requestParameters.getALaCarte() == false) { -- cgit 1.2.3-korg