if(iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE) != null) {
Set<? extends Location> locations = iaasInfo.getComputeService().listAssignableLocations();
for(Location location : locations) {
if(location.getScope().toString().equalsIgnoreCase(CloudControllerConstants.ZONE_ELEMENT) &&
location.getId().equals(iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE))) {
templateBuilder.locationId(location.getId());
log.info("ZONE has been set as " + iaasInfo.getProperty(CloudControllerConstants.AVAILABILITY_ZONE)
+ " with id: " + location.getId());
break;
}
}