From 3dd653fdc5822f64d48960c62b8ee9322e7c4029 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 27 Apr 2020 07:12:27 +0000 Subject: Changes for MDONS usecase Change-Id: Idba82d86ea85cbe07e6eddaa8b1a176843f04623 Issue-ID: USECASEUI-371 Signed-off-by: root --- .../server/controller/lcm/ServiceLcmController.java | 17 +++++++++++------ .../server/service/lcm/domain/aai/AAIService.java | 2 +- .../server/service/lcm/impl/DefaultCustomerService.java | 5 +++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java index 4e9102f8..2f63425d 100644 --- a/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java +++ b/server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java @@ -83,12 +83,17 @@ public class ServiceLcmController { if(UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation)&&UuiCommonUtil.isNotNullOrEmpty(operationProgressInformation.getOperationStatus())){ //serviceLcmService.updateServiceInstanceStatusById(operationProgressInformation.getOperationStatus().getResult(), serviceId); int progress =operationProgressInformation.getOperationStatus().getProgress(); - if(0<=progress&&progress<100){ - operationResult= CommonConstant.IN_PROGRESS_CODE; - }else if(progress==100){ - operationResult= CommonConstant.SUCCESS_CODE; - } - serviceLcmService.updateServiceInstanceOperation(serviceId,operationType,progress+"",operationResult); + String status = operationProgressInformation.getOperationStatus().getOperationContent().toLowerCase(); + if (status.contains("failed")) { + operationResult = CommonConstant.FAIL_CODE; + } else { + if(0<=progress&&progress<100){ + operationResult= CommonConstant.IN_PROGRESS_CODE; + }else if(progress==100){ + operationResult= CommonConstant.SUCCESS_CODE; + } + } + serviceLcmService.updateServiceInstanceOperation(serviceId,operationType,progress+"",operationResult); } return operationProgressInformation; } diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java index 3ba4fc90..71baa791 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java @@ -353,7 +353,7 @@ public interface AAIService { "Authorization: Basic QUFJOkFBSQ==", "Accept: application/json" }) - @PUT("/api/aai-query/v16?format=resource") + @PUT("/api/aai-query/v19?format=resource") Call querynNetworkResourceList(@Body RequestBody body); @Headers({ "X-TransactionId: 7777", diff --git a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java index c63bd5fe..7cfb762e 100644 --- a/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java +++ b/server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java @@ -325,8 +325,9 @@ public class DefaultCustomerService implements CustomerService { PInterface pInterface = result.getPinterface(); niList.add(pInterface.getInterfaceName()); } - } - + + } + Collections.sort(niList); return niList; } -- cgit 1.2.3-korg