summaryrefslogtreecommitdiffstats
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>2023-02-17 16:59:11 +0000
commitfb516859f920197eba4cbc1f5b82279f3e3753c6 (patch)
treeae72025fc67b49cfae46d892936ceb6449b5dcc8 /mso-api-handlers
parentd0493f954a48021662b5b6d3ba45b262750690c9 (diff)
[SO] SO changes to support Delete AS
Issue-ID: SO-4084 Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech> Change-Id: Ib75076bdd98291b48149a9ad859fd383a551cd45
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java19
1 files changed, 19 insertions, 0 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 021807703e..d4331dcfe8 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
@@ -402,6 +402,25 @@ public class ServiceInstances extends AbstractRestHandler {
}
}
+ @DELETE
+ @Path("/{version:[vV][7]}/serviceInstances/{serviceInstanceId}/cnfs/{cnfInstanceId}")
+ @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("cnfInstanceId") String cnfInstanceId,
+ @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("vnfInstanceId", cnfInstanceId);
+ 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)