aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2018-09-12 17:09:23 +0530
committerOren Kleks <orenkle@amdocs.com>2018-09-13 11:52:43 +0000
commit79ba4fbed10cabac5c32ba91e57fa55253005c37 (patch)
tree30d53122e265dc12f58d18353f23c476ef7a993b /openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest
parentc58f445fcef56a6440f3b21d54b390700623c48c (diff)
Bugfix - Action mandatory param validation
Fix for actions getting created without passing mandatory parameters Change-Id: I3e332d92d0ad99b85d945ab25d7406e916642314 Issue-ID: SDC-1755 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
index 23f11843b8..2927a7fdd3 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/main/java/org/openecomp/sdcrests/action/rest/services/ActionsImpl.java
@@ -97,7 +97,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -1040,10 +1039,8 @@ public class ActionsImpl implements Actions {
if (StringUtils.isEmpty(requestJSON) || requestJSON.equals(REQUEST_EMPTY_BODY)) {
requestBodyErrorMap.put(ACTION_INVALID_REQUEST_BODY_CODE, ACTION_REQUEST_BODY_EMPTY);
} else {
- if(requestType == ActionConstants.REQUEST_TYPE_CREATE_ACTION){
- //placeholder for future implementation
- }
- if(requestType == ActionConstants.REQUEST_TYPE_UPDATE_ACTION){
+ if(requestType == ActionConstants.REQUEST_TYPE_CREATE_ACTION
+ || requestType == ActionConstants.REQUEST_TYPE_UPDATE_ACTION){
//Semantic request specific validations
Action action = JsonUtil.json2Object(requestJSON, Action.class);
if(StringUtils.isEmpty(action.getName())){