+
+ public void getIdentityUrl(Map<String, String> params, SvcLogicContext ctx) throws Exception{
+ log.info("Recieved getIdentityUrl call with params : "+params);
+ String prefix = params.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX);
+ prefix = StringUtils.isNotBlank(prefix) ? (prefix + ".") : "";
+
+ String cloudOwner = params.get("cloudOwner");
+ String cloudRegionId = params.get("cloudRegionId");
+ // per comment from git review, we need to sanitize the two parameters
+ // to avoid security issues
+ cloudOwner = cloudOwner.replaceAll("'", "");
+ cloudRegionId = cloudRegionId.replaceAll("'", "");
+ log.debug("cloudOwner" +cloudOwner +"," +"cloudRegionId"+ cloudRegionId);
+ String resourceKey = "cloud-region.cloud-owner = '" + cloudOwner +
+ "' AND cloud-region.cloud-region-id = '" + cloudRegionId + "'";
+ String queryPrefix ="urlInfo";
+ String resourceType = "cloud-region";
+ SvcLogicContext urlCtx = readResource(resourceKey, queryPrefix, resourceType);
+ log.info("IdentityUrl: "+urlCtx.getAttribute("urlInfo.identity-url"));
+ ctx.setAttribute(prefix+"cloud-region.identity-url", urlCtx.getAttribute("urlInfo.identity-url"));
+
+ }