aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java80
2 files changed, 3 insertions, 79 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
index 83755ca253..dc6889802e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
@@ -562,7 +562,7 @@ public class E2EServiceInstances {
msoLogger.debug("Received from Camunda: " + camundaJSONResponseBody);
// currently only for delete case we update the status here
- if(action.name().equals("DELETE")){
+ if(action == Action.deleteInstance){
ObjectMapper mapper = new ObjectMapper();
try{
DelE2ESvcResp jo = mapper.readValue(camundaJSONResponseBody, DelE2ESvcResp.class);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
index 92a45a71dd..2f32e80dc1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequests.java
@@ -134,58 +134,7 @@ public class OrchestrationRequests {
return Response.status(200).entity(orchestrationResponse).build();
}
- @GET
- @Path("e2eServiceInstances/{version:[vV][3-5]}/{serviceId}/operations/{operationId}")
- @ApiOperation(value = "Find e2eServiceInstances Requests for a given serviceId and operationId", response = Response.class)
- @Produces(MediaType.APPLICATION_JSON)
- public Response getE2EServiceInstances(@PathParam("serviceId") String serviceId,
- @PathParam("version") String version, @PathParam("operationId") String operationId) {
-
- GetE2EServiceInstanceResponse e2eServiceResponse = new GetE2EServiceInstanceResponse();
-
- MsoRequest msoRequest = new MsoRequest(serviceId);
-
- long startTime = System.currentTimeMillis();
-
- OperationStatus requestDB = null;
-
- try {
- requestDB = requestsDB.getOperationStatus(serviceId, operationId);
-
- } catch (Exception e) {
- msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
- MsoLogger.ErrorCode.AvailabilityError,
- "Exception while communciate with Request DB - Infra Request Lookup", e);
- msoRequest.setStatus(org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
- Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NOT_FOUND,
- MsoException.ServiceException, e.getMessage(), ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB, null);
- alarmLogger.sendAlarm("MsoDatabaseAccessError", MsoAlarmLogger.CRITICAL,
- Messages.errors.get(ErrorNumbers.NO_COMMUNICATION_TO_REQUESTS_DB));
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError,
- "Exception while communciate with Request DB");
- msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
- return response;
-
- }
-
- if (requestDB == null) {
- Response resp = msoRequest.buildServiceErrorResponse(HttpStatus.SC_NO_CONTENT,
- MsoException.ServiceException, "E2E serviceId " + serviceId + " is not found in DB",
- ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null);
- msoLogger.error(MessageEnum.APIH_BPEL_COMMUNICATE_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "",
- MsoLogger.ErrorCode.BusinessProcesssError,
- "Null response from RequestDB when searching by serviceId");
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound,
- "Null response from RequestDB when searching by serviceId");
- msoLogger.debug("End of the transaction, the final response is: " + (String) resp.getEntity());
- return resp;
-
- }
-
- e2eServiceResponse.setE2eRequest(requestDB);
-
- return Response.status(200).entity(e2eServiceResponse).build();
- }
+
@GET
@Path("orchestrationRequests/{version:[vV][2-5]}")
@@ -242,7 +191,7 @@ public class OrchestrationRequests {
}
@POST
- @Path("/{version: [vV][3-5]}/{requestId}/unlock")
+ @Path("orchestrationRequests/{version: [vV][3-5]}/{requestId}/unlock")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Unlock Orchestrated Requests for a given requestId", response = Response.class)
@@ -437,29 +386,4 @@ public class OrchestrationRequests {
return request;
}
- private E2ERequest mapInfraActiveRequestToE2ERequest(InfraActiveRequests requestDB) {
-
- E2ERequest e2erequest = new E2ERequest();
-
- e2erequest.setOperationId(requestDB.getRequestId());
- // e2erequest.setRequestScope(requestDB.getRequestScope());
- e2erequest.setOperation(requestDB.getRequestAction());
- e2erequest.setResult(requestDB.getRequestStatus());
- e2erequest.setReason(requestDB.getStatusMessage());
- e2erequest.setUserId(requestDB.getRequestorId());
- e2erequest.setOperationContent(requestDB.getStatusMessage());
- e2erequest.setProgress(requestDB.getProgress());
-
- String startTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getStartTime())
- + " GMT";
- e2erequest.setOperateAt(startTimeStamp);
-
- if (requestDB.getEndTime() != null) {
- String endTimeStamp = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss").format(requestDB.getEndTime())
- + " GMT";
- e2erequest.setFinishedAt(endTimeStamp);
- }
-
- return e2erequest;
- }
} \ No newline at end of file
id='n322' href='#n322'>322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378