aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
index 483ac47235..3104c8415f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/Network.java
@@ -32,9 +32,14 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
+import com.fasterxml.jackson.core.JsonProcessingException;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.onap.so.apihandler.filters.ResponseUpdater;
import org.onap.so.apihandlerinfra.Action;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.infra.rest.exception.AAIEntityNotFound;
+import org.onap.so.apihandlerinfra.infra.rest.exception.NoRecipeException;
+import org.onap.so.apihandlerinfra.infra.rest.exception.WorkflowEngineConnectionException;
import org.onap.so.apihandlerinfra.infra.rest.handler.NetworkRestHandler;
import org.onap.so.db.catalog.beans.Recipe;
import org.onap.so.db.request.beans.InfraActiveRequests;
@@ -71,14 +76,15 @@ public class Network {
public Response deleteNetworkInstance(@PathParam("version") String version,
@PathParam("serviceInstanceId") String serviceInstanceId,
@PathParam("networkInstanceId") String networkInstanceId, @Context ContainerRequestContext requestContext)
- throws Exception {
- InfraActiveRequests currentRequest = null;
+ throws AAIEntityNotFound, NoRecipeException, JsonProcessingException, WorkflowEngineConnectionException,
+ ValidateException {
+
String requestId = networkRestHandler.getRequestId(requestContext);
String requestorId = "Unknown";
String source = MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME);
String requestURI = requestContext.getUriInfo().getAbsolutePath().toString();
- currentRequest = networkRestHandler.createInfraActiveRequestForDelete(requestId, serviceInstanceId,
- networkInstanceId, requestorId, source, requestURI);
+ InfraActiveRequests currentRequest = networkRestHandler.createInfraActiveRequestForDelete(requestId,
+ serviceInstanceId, networkInstanceId, requestorId, source, requestURI);
ServiceInstancesRequest request = requestBuilder.buildNetworkDeleteRequest(networkInstanceId);
networkRestHandler.saveInstanceName(request, currentRequest);
networkRestHandler.checkDuplicateRequest(serviceInstanceId, networkInstanceId,