summaryrefslogtreecommitdiffstats
path: root/appc-outbound/appc-aai-client
diff options
context:
space:
mode:
authorGeorge, Lina (lg941u) <lg941u@att.com>2018-09-18 22:24:49 -0400
committerTakamune Cho <tc012c@att.com>2018-09-19 20:18:17 +0000
commit55393633ac29b83662db980ccbf03b9991c7b06c (patch)
tree4df3b1b184ee7a08ef9d9414c47e868c486ec21a /appc-outbound/appc-aai-client
parent0b7cd61bb7db6ab4e71a35b85647f6fa8bb6e099 (diff)
Fix for multistep vnf level actions
Issue-ID: APPC-1197 Change-Id: I12e7107d88e9d1ca21f0d90500292c31a00260d6 Signed-off-by: George, Lina (lg941u) <lg941u@att.com>
Diffstat (limited to 'appc-outbound/appc-aai-client')
-rw-r--r--appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java2
-rw-r--r--appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/node/AAIResourceNode.java20
2 files changed, 20 insertions, 2 deletions
diff --git a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
index b10abc47e..76336c1de 100644
--- a/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
+++ b/appc-outbound/appc-aai-client/provider/src/main/java/org/onap/appc/aai/client/aai/AaiService.java
@@ -774,7 +774,7 @@ public class AaiService {
cloudOwner = cloudOwner.replaceAll("'", "");
cloudRegionId = cloudRegionId.replaceAll("'", "");
log.debug("cloudOwner" +cloudOwner +"," +"cloudRegionId"+ cloudRegionId);
- String resourceKey = "cloud-region.cloud-owner = '" + cloudOwner +
+ String resourceKey = "depth = '" + 0 + "' AND cloud-region.cloud-owner = '" + cloudOwner +
"' AND cloud-region.cloud-region-id = '" + cloudRegionId + "'";
String queryPrefix ="urlInfo";
String resourceType = "cloud-region";
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 cc3e804cc..853565fad 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
@@ -79,6 +79,24 @@ public class AAIResourceNode implements SvcLogicJavaPlugin {
AaiService aai = getAaiService();
aai.getGenericVnfInfo(inParams, ctx);
+ String cloudOwnerValue=ctx.getAttribute(responsePrefix + "vm[0].cloud-owner");
+ String cloudRegionValue=ctx.getAttribute(responsePrefix + "vm[0].cloud-region-id");
+
+ log.debug("Cloud Owner" + cloudOwnerValue);
+ log.debug("CloudRegionId" + cloudOwnerValue);
+ SvcLogicContext cloudCtx = new SvcLogicContext();
+ Map<String, String> paramsCloud = new HashMap<String, String>();
+ paramsCloud.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX,
+ inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX));
+
+ if(StringUtils.isNotBlank(cloudOwnerValue)&&StringUtils.isNotBlank(cloudRegionValue)) {
+
+ paramsCloud.put("cloudOwner", cloudOwnerValue);
+ paramsCloud.put("cloudRegionId", cloudRegionValue);
+
+ aai.getIdentityUrl(paramsCloud, ctx);
+ }
+
ctx.setAttribute(responsePrefix + AppcAaiClientConstant.OUTPUT_PARAM_STATUS,
AppcAaiClientConstant.OUTPUT_STATUS_SUCCESS);
log.info("getVnfInfo Successful ");
@@ -142,7 +160,7 @@ public class AAIResourceNode implements SvcLogicJavaPlugin {
vserverMap.put(PARAM_VSERVER_NAME, vmServerCtx.getAttribute(responsePrefix + "vm.vserver-name"));
vserverMap.put("vf-module-id", vmServerCtx.getAttribute(responsePrefix + "vm.vf-module-id"));
vserverMap.put(PARAM_VSERVER_SELFLINK, vmServerCtx.getAttribute(responsePrefix + "vm.vserver-selflink"));
-
+
log.info("VSERVER-LINK VALUE:" + vmServerCtx.getAttribute(responsePrefix + "vm.vserver-selflink"));
// as Per 17.07 requirements we are supporting only one VNFC per VM.