aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
authorraviteja.karumuri <raviteja.karumuri@est.tech>2022-07-13 13:17:49 +0100
committerraviteja.karumuri <raviteja.karumuri@est.tech>2022-07-22 12:14:00 +0100
commit0248e0fe15cb1712e0216de64b0c4000bc2a1547 (patch)
tree1a5463c4806ac69ece3895e2553a52ceeefb7c7f /mso-api-handlers
parentea82b9bcfd6584bd6f8a5c3e058f744c09e6e09d (diff)
[SO] SO BPMN Infra shall trigger Delete AS Instance workflow(s).
Issue-ID: SO-3885 Change-Id: I6e5a1501fcbb68b98ce0c7787d67996b96fa95f2 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
index 955d6a9a94..d11ae75c69 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java
@@ -6,15 +6,15 @@
* Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
- * ================================================================================
+ * ================================================================================
* Modifications Copyright (c) 2022 Ericsson. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -418,6 +418,26 @@ public class ServiceInstances extends AbstractRestHandler {
}
}
+ @DELETE
+ @Path("/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/cnfs/{asInstanceId}")
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Operation(description = "Delete provided for CNF instance",
+ responses = @ApiResponse(
+ content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class)))))
+ @Transactional
+ public Response deleteCnfInstance(String request, @PathParam("version") String version,
+ @PathParam("serviceInstanceId") String serviceInstanceId, @PathParam("asInstanceId") String asInstanceId,
+ @Context ContainerRequestContext requestContext) throws ApiException {
+ logger.debug("Inside API Handler to perform delete CNF Instance");
+ String requestId = requestHandlerUtils.getRequestId(requestContext);
+ HashMap<String, String> instanceIdMap = new HashMap<>();
+ instanceIdMap.put("serviceInstanceId", serviceInstanceId);
+ instanceIdMap.put("asInstanceId", asInstanceId);
+ return serviceInstances(request, Action.deleteInstance, instanceIdMap, version, requestId,
+ requestHandlerUtils.getRequestUri(requestContext, uriPrefix));
+ }
+
@POST
@Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/upgrade")
@Consumes(MediaType.APPLICATION_JSON)