diff options
author | 2021-03-30 10:06:04 -0400 | |
---|---|---|
committer | 2021-11-17 11:17:39 +0000 | |
commit | d84cfb0bd5806af231e01ef1bc9271bf25f89ad9 (patch) | |
tree | 91a87fd4f16a21528b4d85f92b8fecfeadbf6fe7 /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | 4ca055af415aa965426a973d38d9d3b5fe201578 (diff) |
Disable VnfDeleteValidator for non-alacarte requests.
The validator will fail if there are active vf-modules for the vnf.
The downstream vnf-delete macro will delete these vf-modules so the
validator should not apply for this flow.
Change-Id: If45c872e3b06d9dbb925bff21f7643694503c481
Issue-ID: SO-3801
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
(cherry picked from commit 16785537a48d0ca0847b826226d7d81731dba271)
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/infra/rest/validators/VnfDeleteValidator.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VnfDeleteValidator.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VnfDeleteValidator.java index 44bab7e087..3dc4e8e4ac 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VnfDeleteValidator.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/validators/VnfDeleteValidator.java @@ -19,7 +19,8 @@ public class VnfDeleteValidator implements RequestValidator { @Override public boolean shouldRunFor(String requestUri, ServiceInstancesRequest request, Actions action) { return Pattern.compile("[Vv][5-8]/serviceInstances/[^/]+/vnfs/[^/]+").matcher(requestUri).matches() - && action.equals(Action.deleteInstance); + && action.equals(Action.deleteInstance) + && Boolean.TRUE.equals(request.getRequestDetails().getRequestParameters().getALaCarte()); } @Override |