use of alien4cloud.model.orchestrators.locations.LocationSupport in project alien4cloud by alien4cloud.
the class LocationService method ensureMultipleLocations.
/**
* ensure that we cannot create more locations than supported by the orchestrator
*
* @param orchestratorId
*/
private void ensureMultipleLocations(String orchestratorId) {
LocationSupport locationSupport = orchestratorService.getLocationSupport(orchestratorId);
List<Location> locations = getAll(orchestratorId);
if (!locationSupport.isMultipleLocations() && !locations.isEmpty()) {
throw new LocationSupportException("The orchestrator <" + orchestratorId + "> already has a location and does'nt support multiple locations.");
}
}
Aggregations