Fix the message content that SLICEANALYSISMS sends to Policy for CCVPN bw adjustment and suppress exceptions and error in job builder
Issue-ID: DCAEGEN2-3147
Issue-ID: DCAEGEN2-3143
Signed-off-by: decheng zhang <decheng.zhang@huawei.com>
Change-Id: I3c0c2b526960ab0e08945ba47d06aeb8a6471d9f
Signed-off-by: decheng zhang <decheng.zhang@huawei.com>
 The format is based on [Keep a Changelog](http://keepachangelog.com/)
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
-## [1.1.2] - 2022/04/28
+## [1.1.2] - 2022/05/01
          - [DCAEGEN2-3145](https://jira.onap.org/browse/DCAEGEN2-3145) - Filter RAN related service instances in AAI
 
          - [DCAEGEN2-3146](https://jira.onap.org/browse/DCAEGEN2-3146) - Fetch CU Cells instead of DU cells data for ML message processing
 
+         - [DCAEGEN2-3147](https://jira.onap.org/browse/DCAEGEN2-3147) - Fix the message content that SLICEANALYSISMS sends to Policy for CCVPN bw adjustment and suppress exceptions and error in job builder
+
+         - [DCAEGEN2-3143](https://jira.onap.org/browse/DCAEGEN2-3143) - Suppress exceptions and ERRORS in slice-analysis-ms job building
+
 ## [1.1.1] - 2022/04/12
          - [DCAEGEN2-3142](https://jira.onap.org/browse/DCAEGEN2-3142) - Filter data from AAI to avoid possible exceptions, remove null parameters in policy payload and add logs
 
-         - [DCAEGEN2-3141](https://jira.onap.org/browse/DCAEGEN2-3142) - Bugfix in DCAE-SliceAnalysisMs for IBN user-triggered CCVPN closed-loop
+         - [DCAEGEN2-3141](https://jira.onap.org/browse/DCAEGEN2-3141) - Bugfix in DCAE-SliceAnalysisMs for IBN user-triggered CCVPN closed-loop
 
 ## [1.1.0] - 2022/3/10
          - [DCAEGEN2-3063](https://jira.onap.org/browse/DCAEGEN2-3063) - IBN user-triggered CLoud Leased Line update and CCVPN closed-loop
 
  *  slice-analysis-ms
  *  ================================================================================
  *   Copyright (C) 2020 Wipro Limited.
+ *   Copyright (C) 2022 Huawei Canada Limited.
  *   ==============================================================================
  *     Licensed under the Apache License, Version 2.0 (the "License");
  *     you may not use this file except in compliance with the License.
 
 package org.onap.slice.analysis.ms.models.policy;
 
+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 
-/** 
+/**
  * Model class for the AAI Object 
  */
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class AAI {
-       @JsonProperty("vserver.is-closed-loop-disabled")
-       private String vserverIsClosedLoopDisabled;
-       @JsonProperty("vserver.prov-status")
-       private String vserverProvStatus;
-       @JsonProperty("generic-vnf.vnf-id")
-       private String vServerVNFId;
-
-       public String getVserverIsClosedLoopDisabled() {
-               return vserverIsClosedLoopDisabled;
-       }
-
-       public void setVserverIsClosedLoopDisabled(String vserverIsClosedLoopDisabled) {
-               this.vserverIsClosedLoopDisabled = vserverIsClosedLoopDisabled;
-       }
-
-       public String getVserverProvStatus() {
-               return vserverProvStatus;
-       }
-
-       public void setVserverProvStatus(String vserverProvStatus) {
-               this.vserverProvStatus = vserverProvStatus;
-       }
-
-       public String getvServerVNFId() {
-               return vServerVNFId;
-       }
-
-       public void setvServerVNFId(String vServerVNFId) {
-               this.vServerVNFId = vServerVNFId;
-       }
-       
+    @JsonProperty("vserver.is-closed-loop-disabled")
+    private String vserverIsClosedLoopDisabled;
+    @JsonProperty("vserver.prov-status")
+    private String vserverProvStatus;
+    @JsonProperty("generic-vnf.vnf-id")
+    private String genericVnfVNFId;
+    @JsonProperty("generic-vnf.is-closed-loop-disabled")
+    private String genericVnfIsClosedLoopDisabled;
+    @JsonProperty("generic-vnf.prov-status")
+    private String genericVnfProvStatus;
+    @JsonProperty("generic-vnf.vnf-name")
+    private String genericVnfVnfName;
+
+    public String getVserverIsClosedLoopDisabled() {
+        return vserverIsClosedLoopDisabled;
+    }
+
+    public void setVserverIsClosedLoopDisabled(String vserverIsClosedLoopDisabled) {
+        this.vserverIsClosedLoopDisabled = vserverIsClosedLoopDisabled;
+    }
+
+    public String getVserverProvStatus() {
+        return vserverProvStatus;
+    }
+
+    public void setVserverProvStatus(String vserverProvStatus) {
+        this.vserverProvStatus = vserverProvStatus;
+    }
+
+    public String getGenericVnfVNFId() {
+        return genericVnfVNFId;
+    }
+
+    public void setGenericVnfVNFId(String genericVnfVNFId) {
+        this.genericVnfVNFId = genericVnfVNFId;
+    }
+
+    public String getGenericVnfProvStatus() {
+        return genericVnfProvStatus;
+    }
+
+    public void setGenericVnfProvStatus(String genericVnfProvStatus) {
+        this.genericVnfProvStatus = genericVnfProvStatus;
+    }
+
+    public String getGenericVnfIsClosedLoopDisabled() {
+        return genericVnfIsClosedLoopDisabled;
+    }
+
+    public void setGenericVnfIsClosedLoopDisabled(String genericVnfIsClosedLoopDisabled) {
+        this.genericVnfIsClosedLoopDisabled = genericVnfIsClosedLoopDisabled;
+    }
+
+    public String getGenericVnfVnfName() {
+        return genericVnfVnfName;
+    }
+
+    public void setGenericVnfVnfName(String genericVnfVnfName) {
+        this.genericVnfVnfName = genericVnfVnfName;
+    }
 }
 
         AAI aai = new AAI();
         aai.setVserverIsClosedLoopDisabled("false");
         aai.setVserverProvStatus("ACTIVE");
-        aai.setvServerVNFId(serviceDetails.get("ranNFNSSIId"));
+        aai.setGenericVnfVNFId(serviceDetails.get("ranNFNSSIId"));
         onsetmsg.setAai(aai);
         return onsetmsg;
     }
         onsetmsg.setFrom("DCAE");
         onsetmsg.setVersion("1.0.2");
         AAI aai = new AAI();
-        aai.setVserverIsClosedLoopDisabled("true");
+        aai.setGenericVnfIsClosedLoopDisabled("false");
+        aai.setGenericVnfProvStatus("ACTIVE");
+        aai.setGenericVnfVNFId("00000000-0000-0000-0000-000000000000");
+        aai.setGenericVnfVnfName("00000");
         onsetmsg.setAai(aai);
         return onsetmsg;
     }
 
  *
  *******************************************************************************/
 -->
-<configuration scan="true">
+<configuration>
 
     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
         <layout class="ch.qos.logback.classic.PatternLayout">
 
         try {
             output = obj.readValue(new String(Files.readAllBytes(Paths.get("src/test/resources/onsetMessage2.json"))), OnsetMessage.class);
             expected = obj.writeValueAsString(output);
-
-            String msg = obj.writeValueAsString(policyService
+            actual = new Gson().toJson(policyService
                     .formPolicyOnsetMessageForCCVPN(cllId, 3000, RequestOwner.UUI));
-            actual = new Gson().toJson(msg);
         }
         catch (IOException e) {
             e.printStackTrace();
 
         "aaf_password": null,
         "type": "message-router",
         "dmaap_info": {
-          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT",
+          "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.PERFORMANCE_MEASUREMENTS",
           "client_role": "sliceanalysis-subscriber",
           "location": "onap",
           "client_id": "sdnr-sliceanalysis-1"
         "aaf_password": null,
         "type": "message-router",
         "dmaap_info": {
-          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP",
+          "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/DCAE_CL_RSP",
+          "client_role": "sliceanalysis-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-sliceanalysis-1"
+        },
+        "aaf_username": null
+      },
+      "intelligent_slicing_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.ML_RESPONSE_TOPIC",
           "client_role": "sliceanalysis-subscriber",
           "location": "onap",
           "client_id": "sdnr-sliceanalysis-1"
         "aaf_password": null,
         "api_key" : null,
         "api_secret" : null,
-        "servers" : ["message-router:3904"],
+        "servers" : ["dmaap:3904"],
         "consumer_group" : "dcae_ccvpn_cl",
         "consumer_instance" : "dcae_ccvpn_cl_aaievent",
         "fetch_timeout" : 15000,
         "aaf_password": null,
         "type": "message-router",
         "dmaap_info": {
-          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT",
+          "topic_url": "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT",
           "client_role": "sliceanalysis-subscriber",
           "location": "onap",
           "client_id": "sdnr-sliceanalysis-1"
 
 {
   "closedLoopControlName": "ControlLoop-CCVPN-CLL-227e8b00-dbeb-4d03-8719-d0a658fb846c",
   "closedLoopAlarmStart": 1605691996370,
-  "modelInvariantUuid": "6790ab0e-034f-11eb-adc1-0242ac120002",
-  "modelUuid": "6790ab0e-034f-11eb-adc1-0242ac120002",
   "closedLoopEventClient": "microservice.sliceAnalysisMS",
   "closedLoopEventStatus": "ONSET",
   "requestID": "1e946480-1232-46d4-a39b-614ac534400f",
   "version": "1.0.2",
   "target_type": "VNF",
   "AAI": {
-    "generic-vnf.is-closed-loop-disabled": "true",
+    "generic-vnf.is-closed-loop-disabled": "false",
     "generic-vnf.prov-status": "ACTIVE",
-    "generic-vnf.vnf-id": "3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
+    "generic-vnf.vnf-id": "e51a9b12-f313-11ea-adc1-0242ac120003",
     "generic-vnf.vnf-name": "76543"
   }
 }