aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.