Changes for MDONS usecase 56/106656/2
authorroot <preethamshyam.sathiyaseelan@us.fujitsu.com>
Mon, 27 Apr 2020 07:12:27 +0000 (07:12 +0000)
committerPreetham Shyam <PreethamShyam.Sathiyaseelan@us.fujitsu.com>
Tue, 28 Apr 2020 07:05:49 +0000 (07:05 +0000)
Change-Id: Idba82d86ea85cbe07e6eddaa8b1a176843f04623
Issue-ID: USECASEUI-371
Signed-off-by: root <preethamshyam.sathiyaseelan@us.fujitsu.com>
server/src/main/java/org/onap/usecaseui/server/controller/lcm/ServiceLcmController.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/domain/aai/AAIService.java
server/src/main/java/org/onap/usecaseui/server/service/lcm/impl/DefaultCustomerService.java

index 4e9102f..2f63425 100644 (file)
@@ -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;
     }
index 3ba4fc9..71baa79 100644 (file)
@@ -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<ResponseBody> querynNetworkResourceList(@Body RequestBody body);
     @Headers({
             "X-TransactionId: 7777",
index c63bd5f..7cfb762 100644 (file)
@@ -325,8 +325,9 @@ public class DefaultCustomerService implements CustomerService {
                 PInterface pInterface = result.getPinterface();
                 niList.add(pInterface.getInterfaceName());
             }
-        }
-
+        
+       }
+       Collections.sort(niList);
         return niList;
     }