diff options
author | Rupali Shirode <rupali.shirode@t-systems.com> | 2023-08-28 18:39:15 +0530 |
---|---|---|
committer | Rupali Shirode <rupali.shirode@t-systems.com> | 2023-08-28 18:40:43 +0530 |
commit | f46e824fe4730738cc422e87facc5c80ffa44b10 (patch) | |
tree | 8dcc4c8861596586a913d8db530ed18f089ecb62 /mso-api-handlers | |
parent | 43224c4dc5ff3bf67979f480d8628f300497da07 (diff) |
[SO] Macro flow for PNF-Modify operation
Macro flow for PNF-Modify operation
Issue-ID: SO-4111
Change-Id: Ic51cbee5fe59f3aafb2ec41773504b183763d9ec
Signed-off-by: Rupali Shirode <rupali.shirode@t-systems.com>
Diffstat (limited to 'mso-api-handlers')
-rw-r--r-- | mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java | 23 |
1 files changed, 23 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 d4331dcfe8..17967ca904 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 @@ -809,6 +809,29 @@ public class ServiceInstances extends AbstractRestHandler { } } + @PUT + @Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/pnfs/{pnfInstanceId}") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @Operation(description = "Create PNF on a specified version and serviceInstance", responses = @ApiResponse( + content = @Content(array = @ArraySchema(schema = @Schema(implementation = Response.class))))) + @Transactional + public Response updatePnfInstance(String request, @PathParam("version") String version, + @PathParam("serviceInstanceId") String serviceInstanceId, @PathParam("pnfInstanceId") String pnfInstanceId, + @Context ContainerRequestContext requestContext) throws ApiException { + String requestId = requestHandlerUtils.getRequestId(requestContext); + HashMap<String, String> instanceIdMap = new HashMap<>(); + instanceIdMap.put("serviceInstanceId", serviceInstanceId); + instanceIdMap.put("pnfInstanceId", pnfInstanceId); + try { + return serviceInstances(request, Action.updateInstance, instanceIdMap, version, requestId, + requestHandlerUtils.getRequestUri(requestContext, uriPrefix)); + } catch (Exception e) { + logger.error("Error in pnf", e); + throw e; + } + } + @POST @Path("/{version:[vV][5-7]}/serviceInstances/{serviceInstanceId}/networks") @Consumes(MediaType.APPLICATION_JSON) |