aboutsummaryrefslogtreecommitdiffstats
path: root/appc-outbound/appc-aai-client/provider/src/test
diff options
context:
space:
mode:
authorBalaji, Ramya (rb111y) <rb111y@att.com>2018-03-12 21:14:03 -0400
committerTakamune Cho <tc012c@att.com>2018-03-13 17:43:38 +0000
commit51d88e957a81396a26c909dda6ab05d48decc643 (patch)
tree936eede2a29b7962b305101d26ae919b66fa41a2 /appc-outbound/appc-aai-client/provider/src/test
parentd6969f09272b77687b24aa333f45de6b33844470 (diff)
Code changes for A&AI add/update
Code and Unit Test updates to updating vnfc records when vf module is provided in request. Issue-ID: APPC-622 Change-Id: I76903eb8bfa6910e3fb2f6e404504d2b9b5fb477 Signed-off-by: Balaji, Ramya (rb111y) <rb111y@att.com>
Diffstat (limited to 'appc-outbound/appc-aai-client/provider/src/test')
-rw-r--r--appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java6
-rw-r--r--appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java7
2 files changed, 10 insertions, 3 deletions
diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
index 717348584..a68e59af9 100644
--- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
+++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/aai/TestAaiService.java
@@ -250,7 +250,7 @@ public class TestAaiService {
mockAai.populateAllVnfInfo1(ctx, "tmp.vnfInfo");
- mockAai.insertVnfcs(inParams, ctx, 2, 2);
+ mockAai.insertVnfcs(inParams, ctx, 2, 2,"vfModuleId1");
}
@@ -269,7 +269,7 @@ public class TestAaiService {
mockAai.populateAllVnfInfo1(ctx, "tmp.vnfInfo");
- mockAai.insertVnfcs(inParams, ctx, 2, 2);
+ mockAai.insertVnfcs(inParams, ctx, 2, 2, null);
assertEquals(ctx.getAttribute("tmp.vnfInfo.vm[0].vnfc-name"), "dbjx0001vm001dbj001");
assertEquals(ctx.getAttribute("tmp.vnfInfo.vm[0].vnfc-function-code"), "dbj");
@@ -296,7 +296,7 @@ public class TestAaiService {
mockAai.populateAllVnfInfo1(ctx, "tmp.vnfInfo");
- mockAai.insertVnfcs(inParams, ctx, 2, 2);
+ mockAai.insertVnfcs(inParams, ctx, 2, 2,null);
diff --git a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
index efb09e0be..e509a3403 100644
--- a/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
+++ b/appc-outbound/appc-aai-client/provider/src/test/java/org/onap/appc/aai/client/node/TestAAIResourceNode.java
@@ -131,7 +131,14 @@ public class TestAAIResourceNode {
assertEquals(ctx.getAttribute("tmp.vnfInfo.vm[1].vnfc-type"), "vnfcType2");
assertEquals(ctx.getAttribute("tmp.vnfInfo.vm[1].vnfc-function-code"), "vnfcFuncCode2");
assertEquals(ctx.getAttribute("tmp.vnfInfo.vm[1].group-notation"), "vnfcGrpNot2");
+
+ ctx.setAttribute("tmp.vnfInfo.vm[0].vserver-id","ibcm0001id");
+ ctx.setAttribute("req-vf-module-id","vfModule1");
+ mrn.getAllVServersVnfcsInfo(inParams, ctx);
+ assertEquals(ctx.getAttribute("tmp.vnfInfo.vnf.vm-with-no-vnfcs-count-vf-module"),"1");
+ assertEquals(ctx.getAttribute("tmp.vnfInfo.vnf.vm-count-for-vf-module"),"1");
}
+
public void populateAllVServerInfo(SvcLogicContext ctx, String prefix) throws Exception {
ctx.setAttribute("vnf-id", "ibcx0001v");
ctx.setAttribute("vnf-host-ip-address", "000.00.00.00");