diff options
author | Tomek Osinski <tomasz.osinski2@orange.com> | 2018-10-17 13:13:18 +0200 |
---|---|---|
committer | Tomek Osinski <tomasz.osinski2@orange.com> | 2018-10-17 13:30:21 +0200 |
commit | cf87390b00bb7aa3968f31e92a24737270006e00 (patch) | |
tree | 395c91041f1554ecc8825c275e16ac9c7546f4c0 /appc-provider/appc-provider-bundle/src/main/java | |
parent | 80bb680c6ac93d8007630b5070cb58138a551711 (diff) |
Make validation of DistributeTraffic less strict.
In order to pass configuration-parameters we need to make validation less strict.
Issue-ID: APPC-1173
Change-Id: I62e3f0acce8d4b577705dd5fe3b7e6ea7740cae1
Signed-off-by: Tomek Osinski <tomasz.osinski2@orange.com>
Diffstat (limited to 'appc-provider/appc-provider-bundle/src/main/java')
-rw-r--r-- | appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/DistributeTrafficService.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/DistributeTrafficService.java b/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/DistributeTrafficService.java index 367135265..49b245b8a 100644 --- a/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/DistributeTrafficService.java +++ b/appc-provider/appc-provider-bundle/src/main/java/org/onap/appc/provider/lcm/service/DistributeTrafficService.java @@ -37,8 +37,6 @@ import java.util.Map; */ public class DistributeTrafficService extends AbstractBaseService { - - private static final String CONFIG_FILE_NAME_PARAMETER = "ConfigFileName"; private static final String PAYLOAD = "payload"; /** @@ -91,12 +89,7 @@ public class DistributeTrafficService extends AbstractBaseService { try { Map<String, String> payloadMap = JsonUtil.convertJsonStringToFlatMap(payloadString); - // ConfigFileName validation - final String configFileName = payloadMap.get(CONFIG_FILE_NAME_PARAMETER); - if (configFileName == null) { - status = buildStatusForParamName(LCMCommandStatus.MISSING_MANDATORY_PARAMETER, CONFIG_FILE_NAME_PARAMETER); - } - + validateMustHaveParamValue(payloadMap.get(PAYLOAD), PAYLOAD); } catch(IOException e) { logger.error(String.format("DistributeTrafficService (%s) got IOException when converting payload", rpcName), e); status = buildStatusForErrorMsg(LCMCommandStatus.UNEXPECTED_ERROR, e.getMessage()); |