summaryrefslogtreecommitdiffstats
path: root/appc-provider/appc-provider-bundle/src/main
diff options
context:
space:
mode:
authorvidhyasree <sn141y@att.com>2018-05-31 23:49:10 -0400
committerPatrick Brady <pb071s@att.com>2018-06-01 22:03:23 +0000
commit6f44e217b73e2eca6abd00ffabb67e1aa4fca237 (patch)
tree2a40546c099feb5ba68ee87d1bce2277404fdae9 /appc-provider/appc-provider-bundle/src/main
parentf52f019fc49a37a68c285af6d5d289f4322819f4 (diff)
ConfigScaleOut-Payload parameter to manadatory
Issue-ID: APPC-929 Change-Id: Ifd0b8f303dd77acbf37774f749b9063dc67e7620 Signed-off-by: vidhyasree <sn141y@att.com>
Diffstat (limited to 'appc-provider/appc-provider-bundle/src/main')
-rw-r--r--appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/ConfigScaleOutService.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/ConfigScaleOutService.java b/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/ConfigScaleOutService.java
index 86699e6ba..e656aed2e 100644
--- a/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/ConfigScaleOutService.java
+++ b/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/ConfigScaleOutService.java
@@ -41,6 +41,7 @@ public class ConfigScaleOutService extends AbstractBaseService {
super(Action.ConfigScaleOut);
logger.debug("ConfigScaleOutService starts");
}
+
public ConfigScaleOutOutputBuilder process(ConfigScaleOutInput input) {
CommonHeader commonHeader = input.getCommonHeader();
ActionIdentifiers actionIdentifiers = input.getActionIdentifiers();
@@ -48,7 +49,7 @@ public class ConfigScaleOutService extends AbstractBaseService {
validate(commonHeader, input.getAction(), actionIdentifiers, payload);
if (status == null) {
- proceedAction(commonHeader,actionIdentifiers,payload);
+ proceedAction(commonHeader, actionIdentifiers, payload);
}
ConfigScaleOutOutputBuilder outputBuilder = new ConfigScaleOutOutputBuilder();
@@ -69,14 +70,14 @@ public class ConfigScaleOutService extends AbstractBaseService {
// validate payload
String keyName = "payload";
-// if (payload == null) {
-// status = buildStatusForParamName(LCMCommandStatus.MISSING_MANDATORY_PARAMETER, keyName);
-// return;
-// }
- if (payload !=null) {
+ if (payload == null) {
+ status = buildStatusForParamName(LCMCommandStatus.MISSING_MANDATORY_PARAMETER, keyName);
+ return;
+ }
+// if (payload !=null) {
String payloadString = payload.getValue();
status = validateMustHaveParamValue(
- payloadString == null ? payloadString : payloadString.trim(), "payload");
+ payloadString == null ? payloadString : payloadString.trim(), "payload");
if (status != null) {
return;
}
@@ -84,12 +85,14 @@ public class ConfigScaleOutService extends AbstractBaseService {
try {
Map<String, String> payloadMap = JsonUtil.convertJsonStringToFlatMap(payloadString);
validateMustHaveParamValue(payloadMap.get(keyName), keyName);
+ validateMustHaveParamValue(payloadMap.get("payload.request-parameters.vf-module-id"), "vf-module-id");
} catch (IOException e) {
logger.error(String.format("ConfigScaleOutService (%s) got IOException when converting payload", rpcName), e);
status = buildStatusForErrorMsg(LCMCommandStatus.UNEXPECTED_ERROR, e.getMessage());
}
}
- }
+
+// }
void proceedAction(CommonHeader commonHeader,
ActionIdentifiers actionIdentifiers,