Sync up LF_APPC AAIResourceNode with ONAP.
Issue-ID: APPC-352
Change-Id: Ia0a64acd9a156782ef73f27e633b4c049fdf21e1
Signed-off-by: Dilip kumar Pampana <dp583p@att.com>
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
AaiService aai = getAaiService();
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
AaiService aai = getAaiService();
+ //no:of vnfcs from the vnfc_reference table
String vnfcRefLenStr = ctx.getAttribute("vnfcReference_length");
if ( vnfcRefLenStr == null) {
String vnfcRefLenStr = ctx.getAttribute("vnfcReference_length");
if ( vnfcRefLenStr == null) {
else
vnfcRefLen = Integer.parseInt(vnfcRefLenStr);
else
vnfcRefLen = Integer.parseInt(vnfcRefLenStr);
+ //Vms without vnfc from A&AI
String vmWithNoVnfcCountStr = ctx.getAttribute(responsePrefix+"vnf.vm-with-no-vnfcs-count");
//Commented for backward compatibility
String vmWithNoVnfcCountStr = ctx.getAttribute(responsePrefix+"vnf.vm-with-no-vnfcs-count");
//Commented for backward compatibility
aai.updateVnfStatusWithOAMAddress(inParams, ctx);
}
aai.updateVnfStatusWithOAMAddress(inParams, ctx);
}
- if ( vmWithNoVnfcCount!= vnfcRefLen ) {
- //throw new Exception("Unable to Add Vnfcs to A&AI. Reference data mismatch.");
- log.info("vmWithNoVnfcCount and vnfcRefLen data from table are not same ");
- aai.checkAndUpdateVnfc(inParams,ctx, vnfcRefLen, vmCount);
- }
-
- else {
-
- aai.insertVnfcs(inParams,ctx, vnfcRefLen, vmCount);
- }
+
+ aai.insertVnfcs(inParams,ctx, vnfcRefLen, vmCount);
+
ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
AppcAaiClientConstant.OUTPUT_STATUS_SUCCESS);
ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
AppcAaiClientConstant.OUTPUT_STATUS_SUCCESS);