String msg =
"Invalid Partition Detected : " + partitionId +
" - Cause: Invalid Region: " + region;
log.error(msg);
throw new InvalidPartitionException(msg);
}
iaas.isValidRegion(region);
IaasProvider updatedIaasProvider = new IaasProvider(iaasProvider);
Iaas updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
updatedIaas.setIaasProvider(updatedIaasProvider);
if (properties.containsKey(Scope.zone.toString())) {
String zone = properties.getProperty(Scope.zone.toString());
iaas.isValidZone(region, zone);
updatedIaasProvider.setProperty(CloudControllerConstants.AVAILABILITY_ZONE, zone);
updatedIaas = CloudControllerUtil.getIaas(updatedIaasProvider);
updatedIaas.setIaasProvider(updatedIaasProvider);
}
return updatedIaasProvider;
} else {
return iaasProvider;
}
} catch (Exception ex) {
String msg = "Invalid Partition Detected : "+partitionId+". Cause: "+ex.getMessage();
log.error(msg, ex);
throw new InvalidPartitionException(msg, ex);
}
}