Search in sources :

Example 6 with Coordinate

use of com.sequenceiq.cloudbreak.cloud.model.Coordinate in project cloudbreak by hortonworks.

the class AwsPlatformResources method readRegionCoordinates.

private Map<Region, Coordinate> readRegionCoordinates(String displayNames) {
    Map<Region, Coordinate> regionCoordinates = new HashMap<>();
    try {
        RegionCoordinateSpecifications regionCoordinateSpecifications = JsonUtil.readValue(displayNames, RegionCoordinateSpecifications.class);
        for (RegionCoordinateSpecification regionCoordinateSpecification : regionCoordinateSpecifications.getItems()) {
            Region region = region(regionCoordinateSpecification.getName());
            if (!enabledRegions.contains(region)) {
                continue;
            }
            Optional<Entry<Region, DisplayName>> regionEntry = regionDisplayNames.entrySet().stream().filter(e -> e.getKey().getRegionName().equalsIgnoreCase(regionCoordinateSpecification.getName())).findFirst();
            regionCoordinates.put(region, coordinate(regionCoordinateSpecification.getLongitude(), regionCoordinateSpecification.getLatitude(), regionCoordinateSpecification.getDisplayName(), regionEntry.isPresent() ? regionEntry.get().getKey().value() : regionCoordinateSpecification.getDisplayName(), regionCoordinateSpecification.isK8sSupported(), regionCoordinateSpecification.getEntitlements()));
        }
    } catch (IOException ignored) {
        return regionCoordinates;
    }
    return regionCoordinates;
}
Also used : CloudVmTypes(com.sequenceiq.cloudbreak.cloud.model.CloudVmTypes) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) AvailabilityZone.availabilityZone(com.sequenceiq.cloudbreak.cloud.model.AvailabilityZone.availabilityZone) ExtendedCloudCredential(com.sequenceiq.cloudbreak.cloud.model.ExtendedCloudCredential) MinimalHardwareFilter(com.sequenceiq.cloudbreak.filter.MinimalHardwareFilter) Cacheable(org.springframework.cache.annotation.Cacheable) ListKeysRequest(com.amazonaws.services.kms.model.ListKeysRequest) InstanceProfile(com.amazonaws.services.identitymanagement.model.InstanceProfile) Collections.singletonList(java.util.Collections.singletonList) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) VmType.vmTypeWithMeta(com.sequenceiq.cloudbreak.cloud.model.VmType.vmTypeWithMeta) AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) CloudAccessConfig(com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfig) ListTablesRequest(com.amazonaws.services.dynamodbv2.model.ListTablesRequest) Map(java.util.Map) Location(com.sequenceiq.cloudbreak.cloud.model.Location) AmazonIdentityManagementClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonIdentityManagementClient) CloudEncryptionKey(com.sequenceiq.cloudbreak.cloud.model.CloudEncryptionKey) CloudUnauthorizedException(com.sequenceiq.cloudbreak.cloud.exception.CloudUnauthorizedException) AmazonServiceException(com.amazonaws.AmazonServiceException) DescribeInternetGatewaysResult(com.amazonaws.services.ec2.model.DescribeInternetGatewaysResult) CloudEncryptionKeys(com.sequenceiq.cloudbreak.cloud.model.CloudEncryptionKeys) Set(java.util.Set) RegionSpecification(com.sequenceiq.cloudbreak.cloud.model.RegionSpecification) SecurityGroup(com.amazonaws.services.ec2.model.SecurityGroup) RegionCoordinateSpecifications(com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecifications) PlatformResourceVpcFilterView(com.sequenceiq.cloudbreak.cloud.model.view.PlatformResourceVpcFilterView) CloudSshKey(com.sequenceiq.cloudbreak.cloud.model.CloudSshKey) DescribeRouteTablesRequest(com.amazonaws.services.ec2.model.DescribeRouteTablesRequest) CloudPrivateDnsZones(com.sequenceiq.cloudbreak.cloud.model.dns.CloudPrivateDnsZones) Coordinate.coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate.coordinate) Tag(com.amazonaws.services.ec2.model.Tag) MAGNETIC(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterType.MAGNETIC) ListInstanceProfilesRequest(com.amazonaws.services.identitymanagement.model.ListInstanceProfilesRequest) RegionsSpecification(com.sequenceiq.cloudbreak.cloud.model.RegionsSpecification) DescribeRegionsResult(com.amazonaws.services.ec2.model.DescribeRegionsResult) CloudbreakResourceReaderService(com.sequenceiq.cloudbreak.service.CloudbreakResourceReaderService) Region(com.sequenceiq.cloudbreak.cloud.model.Region) ListTablesResult(com.amazonaws.services.dynamodbv2.model.ListTablesResult) DescribeKeyPairsRequest(com.amazonaws.services.ec2.model.DescribeKeyPairsRequest) CloudGateWays(com.sequenceiq.cloudbreak.cloud.model.CloudGateWays) CloudNetworks(com.sequenceiq.cloudbreak.cloud.model.CloudNetworks) CloudRegions(com.sequenceiq.cloudbreak.cloud.model.CloudRegions) StringUtils.isNotEmpty(org.apache.commons.lang3.StringUtils.isNotEmpty) ArrayList(java.util.ArrayList) Value(org.springframework.beans.factory.annotation.Value) CloudParameterConst(com.sequenceiq.cloudbreak.cloud.CloudParameterConst) CloudConnectorException(com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException) Strings(com.google.common.base.Strings) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) AliasListEntry(com.amazonaws.services.kms.model.AliasListEntry) AmazonRdsClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonRdsClient) DescribeInstanceTypesRequest(com.amazonaws.services.ec2.model.DescribeInstanceTypesRequest) AmazonDynamoDBClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonDynamoDBClient) Service(org.springframework.stereotype.Service) ConfigSpecification(com.sequenceiq.cloudbreak.cloud.model.ConfigSpecification) PlatformResourceSecurityGroupFilterView(com.sequenceiq.cloudbreak.cloud.model.view.PlatformResourceSecurityGroupFilterView) DescribeSecurityGroupsRequest(com.amazonaws.services.ec2.model.DescribeSecurityGroupsRequest) Filter(com.amazonaws.services.ec2.model.Filter) RouteTable(com.amazonaws.services.ec2.model.RouteTable) PRIVATE(com.sequenceiq.cloudbreak.cloud.model.network.SubnetType.PRIVATE) CloudConstants(com.sequenceiq.cloudbreak.common.type.CloudConstants) LinkedHashSet(java.util.LinkedHashSet) ST1(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterType.ST1) RegionCoordinateSpecification(com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecification) CloudSubnet(com.sequenceiq.cloudbreak.cloud.model.CloudSubnet) ListInstanceProfilesResult(com.amazonaws.services.identitymanagement.model.ListInstanceProfilesResult) Certificate(com.amazonaws.services.rds.model.Certificate) CloudNoSqlTable(com.sequenceiq.cloudbreak.cloud.model.nosql.CloudNoSqlTable) AwsPageCollector(com.sequenceiq.cloudbreak.cloud.aws.common.util.AwsPageCollector) IOException(java.io.IOException) CloudAccessConfigs(com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfigs) SSD(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterType.SSD) InternetGateway(com.amazonaws.services.ec2.model.InternetGateway) AmazonKmsClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonKmsClient) HttpStatus(org.springframework.http.HttpStatus) SdkClientException(com.amazonaws.SdkClientException) AmazonEC2Exception(com.amazonaws.services.ec2.model.AmazonEC2Exception) StringUtils.isNullOrEmpty(com.amazonaws.util.StringUtils.isNullOrEmpty) DescribeInternetGatewaysRequest(com.amazonaws.services.ec2.model.DescribeInternetGatewaysRequest) PermanentlyFailedException(com.sequenceiq.cloudbreak.util.PermanentlyFailedException) DisplayName.displayName(com.sequenceiq.cloudbreak.cloud.model.DisplayName.displayName) CloudDatabaseServerSslCertificate(com.sequenceiq.cloudbreak.cloud.model.database.CloudDatabaseServerSslCertificate) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) ListRolesResult(com.amazonaws.services.identitymanagement.model.ListRolesResult) Role(com.amazonaws.services.identitymanagement.model.Role) LoggerFactory(org.slf4j.LoggerFactory) JsonUtil(com.sequenceiq.cloudbreak.common.json.JsonUtil) ListAliasesRequest(com.amazonaws.services.kms.model.ListAliasesRequest) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) CloudSshKeys(com.sequenceiq.cloudbreak.cloud.model.CloudSshKeys) InternetGatewayAttachment(com.amazonaws.services.ec2.model.InternetGatewayAttachment) DescribeKeyResult(com.amazonaws.services.kms.model.DescribeKeyResult) EPHEMERAL(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterType.EPHEMERAL) DescribeAvailabilityZonesRequest(com.amazonaws.services.ec2.model.DescribeAvailabilityZonesRequest) InstanceStoreMetadata(com.sequenceiq.cloudbreak.cloud.model.InstanceStoreMetadata) DescribeRegionsRequest(com.amazonaws.services.ec2.model.DescribeRegionsRequest) Predicate(java.util.function.Predicate) Collection(java.util.Collection) CloudResourceGroups(com.sequenceiq.cloudbreak.cloud.model.resourcegroup.CloudResourceGroups) InstanceStorageInfo(com.amazonaws.services.ec2.model.InstanceStorageInfo) Collectors(java.util.stream.Collectors) VmType(com.sequenceiq.cloudbreak.cloud.model.VmType) CloudGateWay(com.sequenceiq.cloudbreak.cloud.model.CloudGateWay) CloudNoSqlTables(com.sequenceiq.cloudbreak.cloud.model.nosql.CloudNoSqlTables) Objects(java.util.Objects) List(java.util.List) VolumeParameterType(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterType) Entry(java.util.Map.Entry) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) DescribeCertificatesRequest(com.amazonaws.services.rds.model.DescribeCertificatesRequest) Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate) CloudDatabaseServerSslCertificates(com.sequenceiq.cloudbreak.cloud.model.database.CloudDatabaseServerSslCertificates) DescribeKeyRequest(com.amazonaws.services.kms.model.DescribeKeyRequest) KeyPairInfo(com.amazonaws.services.ec2.model.KeyPairInfo) CloudSecurityGroup(com.sequenceiq.cloudbreak.cloud.model.CloudSecurityGroup) CloudIpPools(com.sequenceiq.cloudbreak.cloud.model.CloudIpPools) HashMap(java.util.HashMap) ListKeysResult(com.amazonaws.services.kms.model.ListKeysResult) PlatformResourceSshKeyFilterView(com.sequenceiq.cloudbreak.cloud.model.view.PlatformResourceSshKeyFilterView) HashSet(java.util.HashSet) Inject(javax.inject.Inject) AvailabilityZone(com.sequenceiq.cloudbreak.cloud.model.AvailabilityZone) PUBLIC(com.sequenceiq.cloudbreak.cloud.model.network.SubnetType.PUBLIC) DescribeInstanceTypesResult(com.amazonaws.services.ec2.model.DescribeInstanceTypesResult) DescribeVpcsResult(com.amazonaws.services.ec2.model.DescribeVpcsResult) Objects.requireNonNull(java.util.Objects.requireNonNull) ListRolesRequest(com.amazonaws.services.identitymanagement.model.ListRolesRequest) Subnet(com.amazonaws.services.ec2.model.Subnet) CloudDatabaseServerSslCertificateType(com.sequenceiq.cloudbreak.cloud.model.database.CloudDatabaseServerSslCertificateType) LinkedList(java.util.LinkedList) DisplayName(com.sequenceiq.cloudbreak.cloud.model.DisplayName) Logger(org.slf4j.Logger) Vpc(com.amazonaws.services.ec2.model.Vpc) PlatformResources(com.sequenceiq.cloudbreak.cloud.PlatformResources) DiskInfo(com.amazonaws.services.ec2.model.DiskInfo) VmTypeMetaBuilder(com.sequenceiq.cloudbreak.cloud.model.VmTypeMeta.VmTypeMetaBuilder) Region.region(com.sequenceiq.cloudbreak.cloud.model.Region.region) CloudCredential(com.sequenceiq.cloudbreak.cloud.model.CloudCredential) InstanceTypeInfo(com.amazonaws.services.ec2.model.InstanceTypeInfo) CloudSecurityGroups(com.sequenceiq.cloudbreak.cloud.model.CloudSecurityGroups) ListAliasesResult(com.amazonaws.services.kms.model.ListAliasesResult) DescribeInstanceTypeOfferingsRequest(com.amazonaws.services.ec2.model.DescribeInstanceTypeOfferingsRequest) VisibleForTesting(com.google.common.annotations.VisibleForTesting) VolumeParameterConfig(com.sequenceiq.cloudbreak.cloud.model.VolumeParameterConfig) CloudNetwork(com.sequenceiq.cloudbreak.cloud.model.CloudNetwork) AliasListEntry(com.amazonaws.services.kms.model.AliasListEntry) Entry(java.util.Map.Entry) RegionCoordinateSpecification(com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecification) Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate) HashMap(java.util.HashMap) Region(com.sequenceiq.cloudbreak.cloud.model.Region) IOException(java.io.IOException) RegionCoordinateSpecifications(com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecifications)

Example 7 with Coordinate

use of com.sequenceiq.cloudbreak.cloud.model.Coordinate in project cloudbreak by hortonworks.

the class AzureRegionProvider method regions.

public CloudRegions regions(Region region, Collection<com.microsoft.azure.management.resources.fluentcore.arm.Region> azureRegions, List<String> entitlements) {
    Map<Region, List<AvailabilityZone>> cloudRegions = new HashMap<>();
    Map<Region, String> displayNames = new HashMap<>();
    Map<Region, Coordinate> coordinates = new HashMap<>();
    String defaultRegion = armZoneParameterDefault;
    azureRegions = filterByEnabledRegions(azureRegions);
    for (com.microsoft.azure.management.resources.fluentcore.arm.Region azureRegion : azureRegions) {
        Coordinate coordinate = enabledRegions.get(region(azureRegion.label()));
        if (isEntitledFor(coordinate, entitlements)) {
            cloudRegions.put(region(azureRegion.label()), new ArrayList<>());
            displayNames.put(region(azureRegion.label()), azureRegion.label());
            if (coordinate == null || coordinate.getLongitude() == null || coordinate.getLatitude() == null) {
                LOGGER.warn("Unregistered region with location coordinates on azure side: {} using default California", azureRegion.label());
                coordinates.put(region(azureRegion.label()), Coordinate.defaultCoordinate());
            } else {
                coordinates.put(region(azureRegion.label()), coordinate);
            }
        }
    }
    if (region != null && !Strings.isNullOrEmpty(region.value())) {
        defaultRegion = region.value();
    }
    return new CloudRegions(cloudRegions, displayNames, coordinates, defaultRegion, true);
}
Also used : HashMap(java.util.HashMap) CloudRegions(com.sequenceiq.cloudbreak.cloud.model.CloudRegions) Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate) Region(com.sequenceiq.cloudbreak.cloud.model.Region) ArrayList(java.util.ArrayList) List(java.util.List)

Example 8 with Coordinate

use of com.sequenceiq.cloudbreak.cloud.model.Coordinate in project cloudbreak by hortonworks.

the class EnvironmentService method setLocation.

public void setLocation(Environment environment, RegionWrapper regionWrapper, CloudRegions cloudRegions) {
    if (regionWrapper != null) {
        LOGGER.debug("Setting location for environment. Location: '{}'.", regionWrapper);
        Optional<Entry<com.sequenceiq.cloudbreak.cloud.model.Region, Coordinate>> coordinate = cloudRegions.getCoordinates().entrySet().stream().filter(e -> e.getKey().getRegionName().equals(regionWrapper.getName()) || e.getValue().getDisplayName().equals(regionWrapper.getName()) || e.getValue().getKey().equals(regionWrapper.getName())).findFirst();
        if (coordinate.isPresent()) {
            environment.setLocation(coordinate.get().getValue().getKey());
            environment.setLocationDisplayName(coordinate.get().getValue().getDisplayName());
            environment.setLatitude(coordinate.get().getValue().getLatitude());
            environment.setLongitude(coordinate.get().getValue().getLongitude());
        } else if (regionWrapper.getLatitude() != null && regionWrapper.getLongitude() != null) {
            environment.setLocation(regionWrapper.getName());
            environment.setLocationDisplayName(regionWrapper.getDisplayName());
            environment.setLatitude(regionWrapper.getLatitude());
            environment.setLongitude(regionWrapper.getLongitude());
        } else {
            throw new BadRequestException(String.format("No location found with name %s in the location list. The supported locations are: [%s]", regionWrapper.getName(), cloudRegions.locationNames()));
        }
    }
}
Also used : EnvironmentDtoConverter(com.sequenceiq.environment.environment.dto.EnvironmentDtoConverter) Environment(com.sequenceiq.environment.environment.domain.Environment) RoleCrnGenerator(com.sequenceiq.cloudbreak.auth.altus.service.RoleCrnGenerator) LoggerFactory(org.slf4j.LoggerFactory) StringUtils(org.apache.commons.lang3.StringUtils) ThreadBasedUserCrnProvider(com.sequenceiq.cloudbreak.auth.ThreadBasedUserCrnProvider) TransactionService(com.sequenceiq.cloudbreak.common.service.TransactionService) AccountAwareResourceRepository(com.sequenceiq.cloudbreak.common.dal.repository.AccountAwareResourceRepository) Map(java.util.Map) RegionWrapper(com.sequenceiq.environment.environment.domain.RegionWrapper) BadRequestException(javax.ws.rs.BadRequestException) Region(com.sequenceiq.environment.environment.domain.Region) StringUtils.isEmpty(org.apache.commons.lang3.StringUtils.isEmpty) NotFoundException(com.sequenceiq.cloudbreak.common.exception.NotFoundException) EnvironmentStatus(com.sequenceiq.environment.environment.EnvironmentStatus) EnumSet(java.util.EnumSet) Tunnel(com.sequenceiq.common.api.type.Tunnel) ResourceWithId(com.sequenceiq.authorization.service.list.ResourceWithId) PayloadContext(com.sequenceiq.cloudbreak.common.event.PayloadContext) PlatformParameterService(com.sequenceiq.environment.platformresource.PlatformParameterService) Collection(java.util.Collection) Set(java.util.Set) InternalServerErrorException(javax.ws.rs.InternalServerErrorException) SecurityAccessDto(com.sequenceiq.environment.environment.dto.SecurityAccessDto) JobResource(com.sequenceiq.cloudbreak.quartz.model.JobResource) Crn(com.sequenceiq.cloudbreak.auth.crn.Crn) Collectors(java.util.stream.Collectors) RegionAwareInternalCrnGeneratorFactory(com.sequenceiq.cloudbreak.auth.crn.RegionAwareInternalCrnGeneratorFactory) EnvironmentRepository(com.sequenceiq.environment.environment.repository.EnvironmentRepository) EnvironmentPropertyProvider(com.sequenceiq.authorization.service.EnvironmentPropertyProvider) List(java.util.List) MDCUtils(com.sequenceiq.cloudbreak.logger.MDCUtils) Entry(java.util.Map.Entry) Optional(java.util.Optional) Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate) AbstractAccountAwareResourceService(com.sequenceiq.cloudbreak.common.service.account.AbstractAccountAwareResourceService) OwnerAssignmentService(com.sequenceiq.authorization.service.OwnerAssignmentService) MDCBuilder(com.sequenceiq.cloudbreak.logger.MDCBuilder) HashMap(java.util.HashMap) CompositeAuthResourcePropertyProvider(com.sequenceiq.authorization.service.CompositeAuthResourcePropertyProvider) EnvironmentDto(com.sequenceiq.environment.environment.dto.EnvironmentDto) CloudRegions(com.sequenceiq.cloudbreak.cloud.model.CloudRegions) HashSet(java.util.HashSet) Value(org.springframework.beans.factory.annotation.Value) Code(io.grpc.Status.Code) Lists(com.google.common.collect.Lists) Service(org.springframework.stereotype.Service) PlatformResourceRequest(com.sequenceiq.environment.platformresource.PlatformResourceRequest) ExperimentalFeatures(com.sequenceiq.environment.environment.domain.ExperimentalFeatures) NotFoundException.notFound(com.sequenceiq.cloudbreak.common.exception.NotFoundException.notFound) Logger(org.slf4j.Logger) NotFoundException.notFoundException(com.sequenceiq.cloudbreak.common.exception.NotFoundException.notFoundException) PayloadContextProvider(com.sequenceiq.flow.core.PayloadContextProvider) GrpcUmsClient(com.sequenceiq.cloudbreak.auth.altus.GrpcUmsClient) StatusRuntimeException(io.grpc.StatusRuntimeException) EnvironmentValidatorService(com.sequenceiq.environment.environment.validation.EnvironmentValidatorService) ResourceIdProvider(com.sequenceiq.flow.core.ResourceIdProvider) Entry(java.util.Map.Entry) BadRequestException(javax.ws.rs.BadRequestException)

Example 9 with Coordinate

use of com.sequenceiq.cloudbreak.cloud.model.Coordinate in project cloudbreak by hortonworks.

the class GcpPlatformResources method addCoordinate.

public void addCoordinate(Map<Region, Coordinate> coordinates, com.google.api.services.compute.model.Region gcpRegion) {
    Coordinate coordinate = regionCoordinates.get(region(gcpRegion.getName()));
    if (coordinate == null || coordinate.getLongitude() == null || coordinate.getLatitude() == null) {
        LOGGER.warn("Unregistered region with location coordinates on gcp side: {} using default California", gcpRegion.getName());
        coordinates.put(region(gcpRegion.getName()), Coordinate.defaultCoordinate());
    } else {
        coordinates.put(region(gcpRegion.getName()), coordinate);
    }
}
Also used : Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate)

Example 10 with Coordinate

use of com.sequenceiq.cloudbreak.cloud.model.Coordinate in project cloudbreak by hortonworks.

the class AwsPlatformResources method addCoordinate.

public void addCoordinate(Map<Region, Coordinate> coordinates, com.amazonaws.services.ec2.model.Region awsRegion) {
    Coordinate coordinate = regionCoordinates.get(region(awsRegion.getRegionName()));
    if (coordinate == null || coordinate.getLongitude() == null || coordinate.getLatitude() == null) {
        LOGGER.warn("Unregistered region with location coordinates on aws side: {} using default California", awsRegion.getRegionName());
        coordinates.put(region(awsRegion.getRegionName()), Coordinate.defaultCoordinate());
    } else {
        coordinates.put(region(awsRegion.getRegionName()), coordinate);
    }
}
Also used : Coordinate(com.sequenceiq.cloudbreak.cloud.model.Coordinate)

Aggregations

Coordinate (com.sequenceiq.cloudbreak.cloud.model.Coordinate)11 CloudRegions (com.sequenceiq.cloudbreak.cloud.model.CloudRegions)8 HashMap (java.util.HashMap)8 List (java.util.List)8 Region (com.sequenceiq.cloudbreak.cloud.model.Region)7 ArrayList (java.util.ArrayList)5 Map (java.util.Map)4 AvailabilityZone (com.sequenceiq.cloudbreak.cloud.model.AvailabilityZone)3 Entry (java.util.Map.Entry)3 Collectors (java.util.stream.Collectors)3 AmazonEC2Exception (com.amazonaws.services.ec2.model.AmazonEC2Exception)2 DescribeRegionsResult (com.amazonaws.services.ec2.model.DescribeRegionsResult)2 RegionCoordinateSpecification (com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecification)2 RegionCoordinateSpecifications (com.sequenceiq.cloudbreak.cloud.model.RegionCoordinateSpecifications)2 IOException (java.io.IOException)2 Collection (java.util.Collection)2 HashSet (java.util.HashSet)2 Optional (java.util.Optional)2 Set (java.util.Set)2 Logger (org.slf4j.Logger)2