diff options
author | Dilip kumar Pampana <dp583p@att.com> | 2018-01-19 10:11:40 -0500 |
---|---|---|
committer | Skip Wonnell <skip@att.com> | 2018-01-19 16:03:11 +0000 |
commit | 807546231d446577fc96f91a1f1ee1a8560af265 (patch) | |
tree | d42a99046be219f1654cda812006ed58dedb2708 /appc-outbound/appc-aai-client/provider/src | |
parent | 96692b8094227545bc37ab13f6ed92fbfaeec40d (diff) |
AAIResourceNode file update in AAI Client
Sync up LF_APPC AAIResourceNode with ONAP.
Issue-ID: APPC-352
Change-Id: Ia0a64acd9a156782ef73f27e633b4c049fdf21e1
Signed-off-by: Dilip kumar Pampana <dp583p@att.com>
Diffstat (limited to 'appc-outbound/appc-aai-client/provider/src')
-rw-r--r-- | appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java index 676e98173..92b74dac2 100644 --- a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java +++ b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java @@ -238,6 +238,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { 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) { @@ -248,6 +249,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { 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 @@ -303,18 +305,10 @@ public class AAIResourceNode implements SvcLogicJavaPlugin { 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); + - //// Modified 1710 ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS, AppcAaiClientConstant.OUTPUT_STATUS_SUCCESS); |