feat:Adjust ccvpn performance monitoring time and display unit. 68/129168/1
author’zhaoyh6‘ <zhaoyh6@asiainfo.com>
Mon, 9 May 2022 02:18:30 +0000 (10:18 +0800)
committer’zhaoyh6‘ <zhaoyh6@asiainfo.com>
Mon, 9 May 2022 02:18:38 +0000 (10:18 +0800)
Issue-ID: REQ-1075
Signed-off-by: ’zhaoyh6‘ <zhaoyh6@asiainfo.com>
Change-Id: Id4498477450059f3f029bf3057a5294314a655d7

server/src/main/java/org/onap/usecaseui/server/conf/intent/IntentScheduleTask.java
server/src/main/java/org/onap/usecaseui/server/service/intent/IntentApiService.java
server/src/main/java/org/onap/usecaseui/server/service/intent/impl/IntentInstanceServiceImpl.java

index f84ad49..31296fd 100644 (file)
@@ -35,7 +35,7 @@ public class IntentScheduleTask {
     public void getIntentInstanceCompleteness() {
         intentInstanceService.getIntentInstanceProgress();
     }
-    @Scheduled(cron = "0/20 * * * * ?")
+    @Scheduled(cron = "0/5 * * * * ?")
     public void getIntentInstanceBandwidth() throws IOException {
         intentInstanceService.getIntentInstanceBandwidth();
     }
index dba140a..8202c98 100644 (file)
@@ -136,8 +136,8 @@ public interface IntentApiService {
             "Authorization: Basic QUFJOkFBSQ==",
             "Accept: application/json"
     })
-    @DELETE("/aai/v24/business/customers/customer/{globalCustomerId}/service-subscriptions/service-subscription/{serviceType}/service-instances/service-instance/{serviceInstanceId}?resource-version={resourceVersion}")
-    Call<Void> deleteServiceInstance(@Path("globalCustomerId") String globalCustomerId, @Path("serviceType") String serviceType, @Path("serviceInstanceId") String serviceInstanceId, @Path("resourceVersion") String resourceVersion);
+    @DELETE("/aai/v24/business/customers/customer/{globalCustomerId}/service-subscriptions/service-subscription/{serviceType}/service-instances/service-instance/{serviceInstanceId}")
+    Call<Void> deleteServiceInstance(@Path("globalCustomerId") String globalCustomerId, @Path("serviceType") String serviceType, @Path("serviceInstanceId") String serviceInstanceId, @Query("resource-version") String resourceVersion);
 
     @Headers({
             "Authorization: Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
index 0a5623c..ffe8b49 100644 (file)
@@ -205,7 +205,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
         params.put("subscriptionServiceType", "IBN");
         params.put("serviceType", "CLL");
         Map<String, Object> additionalProperties = new HashMap<>();
-        additionalProperties.put("enableSdnc", "false");
+        additionalProperties.put("enableSdnc", "true");
         additionalProperties.put("serviceInstanceID", "cll-" + instance.getInstanceId());
         List<Map<String, Object>> transportNetworks = new ArrayList<>();
         Map<String, Object> transportNetwork = new HashMap<>();
@@ -404,7 +404,7 @@ public class IntentInstanceServiceImpl implements IntentInstanceService {
                 continue;
             }
             JSONObject networkPolicyInfo = networkPolicyInfoResponse.body();
-            int maxBandwidth =  networkPolicyInfo.getIntValue("max-bandwidth");
+            int maxBandwidth =  networkPolicyInfo.getIntValue("max-bandwidth") * 1000;
             InstancePerformance instancePerformance = new InstancePerformance();
             instancePerformance.setMaxBandwidth(maxBandwidth);
             instancePerformance.setResourceInstanceId(instance.getResourceInstanceId());