Search in sources :

Example 1 with AmazonEc2Client

use of com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client in project cloudbreak by hortonworks.

the class AwsAttachmentResourceBuilder method checkResources.

@Override
protected List<CloudResourceStatus> checkResources(ResourceType type, AwsContext context, AuthenticatedContext auth, Iterable<CloudResource> resources) {
    AmazonEc2Client client = getAmazonEc2Client(auth);
    Pair<List<String>, List<CloudResource>> volumes = volumeResourceCollector.getVolumeIdsByVolumeResources(resources, resourceType(), volumeSetAttributes());
    if (volumes.getFirst().isEmpty()) {
        return collectCloudResourceStatuses(volumes.getSecond(), ResourceStatus.CREATED);
    }
    DescribeVolumesRequest describeVolumesRequest = new DescribeVolumesRequest(volumes.getFirst());
    DescribeVolumesResult result = client.describeVolumes(describeVolumesRequest);
    ResourceStatus volumeSetStatus = result.getVolumes().stream().map(com.amazonaws.services.ec2.model.Volume::getState).allMatch("in-use"::equals) ? ResourceStatus.CREATED : ResourceStatus.IN_PROGRESS;
    LOGGER.debug("[{}] volume set status is {}", String.join(",", volumes.getFirst()), volumeSetStatus);
    return collectCloudResourceStatuses(volumes.getSecond(), volumeSetStatus);
}
Also used : ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) List(java.util.List) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) DescribeVolumesRequest(com.amazonaws.services.ec2.model.DescribeVolumesRequest)

Example 2 with AmazonEc2Client

use of com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client in project cloudbreak by hortonworks.

the class AwsVolumeResourceBuilder method checkResources.

@Override
protected List<CloudResourceStatus> checkResources(ResourceType type, AwsContext context, AuthenticatedContext auth, Iterable<CloudResource> resources) {
    AmazonEc2Client client = getAmazonEC2Client(auth);
    Pair<List<String>, List<CloudResource>> volumes = volumeResourceCollector.getVolumeIdsByVolumeResources(resources, resourceType(), volumeSetAttributes());
    DescribeVolumesRequest describeVolumesRequest = new DescribeVolumesRequest(volumes.getFirst());
    LOGGER.debug("Going to describe volume(s) with id(s): [{}]", String.join(",", describeVolumesRequest.getVolumeIds()));
    AtomicReference<ResourceStatus> volumeSetStatus = new AtomicReference<>();
    try {
        DescribeVolumesResult result = client.describeVolumes(describeVolumesRequest);
        volumeSetStatus.set(getResourceStatus(result));
    } catch (AmazonEC2Exception e) {
        if (!"InvalidVolume.NotFound".equals(e.getErrorCode())) {
            throw e;
        }
        LOGGER.info("The volume doesn't need to be deleted as it does not exist on the provider side. Reason: {}", e.getMessage());
        volumeSetStatus.set(DELETED);
    }
    LOGGER.debug("[{}] volume set status is {}", String.join(",", volumes.getFirst()), volumeSetStatus);
    return volumes.getSecond().stream().map(resource -> new CloudResourceStatus(resource, volumeSetStatus.get())).collect(Collectors.toList());
}
Also used : AwsResourceNameService(com.sequenceiq.cloudbreak.cloud.aws.common.service.AwsResourceNameService) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) CREATED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.CREATED) AsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor) LoggerFactory(org.slf4j.LoggerFactory) AwsDiskType(com.sequenceiq.common.model.AwsDiskType) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) TagSpecification(com.amazonaws.services.ec2.model.TagSpecification) StringUtils(org.apache.commons.lang3.StringUtils) DeviceNameGenerator(com.sequenceiq.cloudbreak.util.DeviceNameGenerator) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) Future(java.util.concurrent.Future) AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) FAILED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.FAILED) CreateVolumeRequest(com.amazonaws.services.ec2.model.CreateVolumeRequest) Map(java.util.Map) EbsInstanceBlockDeviceSpecification(com.amazonaws.services.ec2.model.EbsInstanceBlockDeviceSpecification) Pair(org.springframework.data.util.Pair) NotFoundException(com.sequenceiq.cloudbreak.common.exception.NotFoundException) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudVolumeUsageType(com.sequenceiq.cloudbreak.cloud.model.CloudVolumeUsageType) IN_PROGRESS(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.IN_PROGRESS) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) CollectionUtils(org.springframework.util.CollectionUtils) Group(com.sequenceiq.cloudbreak.cloud.model.Group) Optional(java.util.Optional) AwsMethodExecutor(com.sequenceiq.cloudbreak.cloud.aws.common.util.AwsMethodExecutor) NotNull(org.jetbrains.annotations.NotNull) AwsInstanceView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsInstanceView) HashMap(java.util.HashMap) Image(com.sequenceiq.cloudbreak.cloud.model.Image) ResourceRetriever(com.sequenceiq.cloudbreak.cloud.service.ResourceRetriever) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) Supplier(java.util.function.Supplier) InstanceBlockDeviceMappingSpecification(com.amazonaws.services.ec2.model.InstanceBlockDeviceMappingSpecification) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) CreateVolumeResult(com.amazonaws.services.ec2.model.CreateVolumeResult) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) Builder(com.sequenceiq.cloudbreak.cloud.model.CloudResource.Builder) AwsContext(com.sequenceiq.cloudbreak.cloud.aws.common.context.AwsContext) Qualifier(org.springframework.beans.factory.annotation.Qualifier) DescribeVolumesRequest(com.amazonaws.services.ec2.model.DescribeVolumesRequest) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate) Subnet(com.amazonaws.services.ec2.model.Subnet) ResourceType(com.sequenceiq.common.api.type.ResourceType) Logger(org.slf4j.Logger) ATTACHED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.ATTACHED) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) DELETED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.DELETED) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) ModifyInstanceAttributeResult(com.amazonaws.services.ec2.model.ModifyInstanceAttributeResult) Component(org.springframework.stereotype.Component) PreserveResourceException(com.sequenceiq.cloudbreak.cloud.template.compute.PreserveResourceException) ModifyInstanceAttributeRequest(com.amazonaws.services.ec2.model.ModifyInstanceAttributeRequest) DeleteVolumeRequest(com.amazonaws.services.ec2.model.DeleteVolumeRequest) AmazonEC2Exception(com.amazonaws.services.ec2.model.AmazonEC2Exception) CommonAwsClient(com.sequenceiq.cloudbreak.cloud.aws.common.CommonAwsClient) Collections(java.util.Collections) Volume(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes.Volume) AwsTaggingService(com.sequenceiq.cloudbreak.cloud.aws.common.AwsTaggingService) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) List(java.util.List) ArrayList(java.util.ArrayList) AtomicReference(java.util.concurrent.atomic.AtomicReference) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) DescribeVolumesRequest(com.amazonaws.services.ec2.model.DescribeVolumesRequest) AmazonEC2Exception(com.amazonaws.services.ec2.model.AmazonEC2Exception)

Example 3 with AmazonEc2Client

use of com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client in project cloudbreak by hortonworks.

the class AwsVolumeResourceBuilder method build.

@Override
public List<CloudResource> build(AwsContext context, CloudInstance instance, long privateId, AuthenticatedContext auth, Group group, List<CloudResource> buildableResource, CloudStack cloudStack) throws Exception {
    LOGGER.debug("Create volumes on provider: {}", buildableResource.stream().map(CloudResource::getName).collect(Collectors.toList()));
    AmazonEc2Client client = getAmazonEC2Client(auth);
    Map<String, List<Volume>> volumeSetMap = Collections.synchronizedMap(new HashMap<>());
    List<Future<?>> futures = new ArrayList<>();
    boolean encryptedVolume = isEncryptedVolumeRequested(group);
    String volumeEncryptionKey = getVolumeEncryptionKey(group, encryptedVolume);
    TagSpecification tagSpecification = new TagSpecification().withResourceType(com.amazonaws.services.ec2.model.ResourceType.Volume).withTags(awsTaggingService.prepareEc2Tags(cloudStack.getTags()));
    List<CloudResource> requestedResources = buildableResource.stream().filter(cloudResource -> CommonStatus.REQUESTED.equals(cloudResource.getStatus())).collect(Collectors.toList());
    Long ephemeralCount = getEphemeralCount(group);
    LOGGER.debug("Start creating data volumes for stack: '{}' group: '{}'", auth.getCloudContext().getName(), group.getName());
    for (CloudResource resource : requestedResources) {
        volumeSetMap.put(resource.getName(), Collections.synchronizedList(new ArrayList<>()));
        VolumeSetAttributes volumeSet = resource.getParameter(CloudResource.ATTRIBUTES, VolumeSetAttributes.class);
        DeviceNameGenerator generator = new DeviceNameGenerator(DEVICE_NAME_TEMPLATE, ephemeralCount.intValue());
        futures.addAll(volumeSet.getVolumes().stream().map(createVolumeRequest(encryptedVolume, volumeEncryptionKey, tagSpecification, volumeSet)).map(requestWithUsage -> intermediateBuilderExecutor.submit(() -> {
            CreateVolumeRequest request = requestWithUsage.getFirst();
            CreateVolumeResult result = client.createVolume(request);
            String volumeId = result.getVolume().getVolumeId();
            Volume volume = new Volume(volumeId, generator.next(), request.getSize(), request.getVolumeType(), requestWithUsage.getSecond());
            volumeSetMap.get(resource.getName()).add(volume);
        })).collect(Collectors.toList()));
    }
    LOGGER.debug("Waiting for volumes creation requests");
    for (Future<?> future : futures) {
        future.get();
    }
    LOGGER.debug("Volume creation requests sent");
    String defaultAvailabilityZone = auth.getCloudContext().getLocation().getAvailabilityZone().value();
    return requestedResources.stream().peek(resource -> {
        List<Volume> volumes = volumeSetMap.get(resource.getName());
        if (!CollectionUtils.isEmpty(volumes)) {
            resource.getParameter(CloudResource.ATTRIBUTES, VolumeSetAttributes.class).setVolumes(volumes);
        }
    }).map(copyResourceWithCreatedStatus(defaultAvailabilityZone)).collect(Collectors.toList());
}
Also used : AwsResourceNameService(com.sequenceiq.cloudbreak.cloud.aws.common.service.AwsResourceNameService) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest) CREATED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.CREATED) AsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor) LoggerFactory(org.slf4j.LoggerFactory) AwsDiskType(com.sequenceiq.common.model.AwsDiskType) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) TagSpecification(com.amazonaws.services.ec2.model.TagSpecification) StringUtils(org.apache.commons.lang3.StringUtils) DeviceNameGenerator(com.sequenceiq.cloudbreak.util.DeviceNameGenerator) DescribeSubnetsResult(com.amazonaws.services.ec2.model.DescribeSubnetsResult) Future(java.util.concurrent.Future) AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) FAILED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.FAILED) CreateVolumeRequest(com.amazonaws.services.ec2.model.CreateVolumeRequest) Map(java.util.Map) EbsInstanceBlockDeviceSpecification(com.amazonaws.services.ec2.model.EbsInstanceBlockDeviceSpecification) Pair(org.springframework.data.util.Pair) NotFoundException(com.sequenceiq.cloudbreak.common.exception.NotFoundException) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudVolumeUsageType(com.sequenceiq.cloudbreak.cloud.model.CloudVolumeUsageType) IN_PROGRESS(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.IN_PROGRESS) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) CollectionUtils(org.springframework.util.CollectionUtils) Group(com.sequenceiq.cloudbreak.cloud.model.Group) Optional(java.util.Optional) AwsMethodExecutor(com.sequenceiq.cloudbreak.cloud.aws.common.util.AwsMethodExecutor) NotNull(org.jetbrains.annotations.NotNull) AwsInstanceView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsInstanceView) HashMap(java.util.HashMap) Image(com.sequenceiq.cloudbreak.cloud.model.Image) ResourceRetriever(com.sequenceiq.cloudbreak.cloud.service.ResourceRetriever) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) Supplier(java.util.function.Supplier) InstanceBlockDeviceMappingSpecification(com.amazonaws.services.ec2.model.InstanceBlockDeviceMappingSpecification) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) CreateVolumeResult(com.amazonaws.services.ec2.model.CreateVolumeResult) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) Builder(com.sequenceiq.cloudbreak.cloud.model.CloudResource.Builder) AwsContext(com.sequenceiq.cloudbreak.cloud.aws.common.context.AwsContext) Qualifier(org.springframework.beans.factory.annotation.Qualifier) DescribeVolumesRequest(com.amazonaws.services.ec2.model.DescribeVolumesRequest) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate) Subnet(com.amazonaws.services.ec2.model.Subnet) ResourceType(com.sequenceiq.common.api.type.ResourceType) Logger(org.slf4j.Logger) ATTACHED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.ATTACHED) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) DELETED(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus.DELETED) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) ModifyInstanceAttributeResult(com.amazonaws.services.ec2.model.ModifyInstanceAttributeResult) Component(org.springframework.stereotype.Component) PreserveResourceException(com.sequenceiq.cloudbreak.cloud.template.compute.PreserveResourceException) ModifyInstanceAttributeRequest(com.amazonaws.services.ec2.model.ModifyInstanceAttributeRequest) DeleteVolumeRequest(com.amazonaws.services.ec2.model.DeleteVolumeRequest) AmazonEC2Exception(com.amazonaws.services.ec2.model.AmazonEC2Exception) CommonAwsClient(com.sequenceiq.cloudbreak.cloud.aws.common.CommonAwsClient) Collections(java.util.Collections) Volume(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes.Volume) AwsTaggingService(com.sequenceiq.cloudbreak.cloud.aws.common.AwsTaggingService) CreateVolumeRequest(com.amazonaws.services.ec2.model.CreateVolumeRequest) CreateVolumeResult(com.amazonaws.services.ec2.model.CreateVolumeResult) ArrayList(java.util.ArrayList) TagSpecification(com.amazonaws.services.ec2.model.TagSpecification) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Volume(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes.Volume) Future(java.util.concurrent.Future) List(java.util.List) ArrayList(java.util.ArrayList) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) DeviceNameGenerator(com.sequenceiq.cloudbreak.util.DeviceNameGenerator)

Example 4 with AmazonEc2Client

use of com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client in project cloudbreak by hortonworks.

the class AwsNetworkService method getVpcCidrs.

public List<String> getVpcCidrs(AuthenticatedContext ac, AwsNetworkView awsNetworkView) {
    if (awsNetworkView.isExistingVPC()) {
        String region = ac.getCloudContext().getLocation().getRegion().value();
        AmazonEc2Client ec2Client = awsClient.createEc2Client(new AwsCredentialView(ac.getCloudCredential()), region);
        DescribeVpcsRequest vpcRequest = new DescribeVpcsRequest().withVpcIds(awsNetworkView.getExistingVpc());
        Vpc vpc = ec2Client.describeVpcs(vpcRequest).getVpcs().get(0);
        List<String> cidrBlockAssociationSet = vpc.getCidrBlockAssociationSet().stream().map(VpcCidrBlockAssociation::getCidrBlock).collect(Collectors.toList());
        LOGGER.info("VPC associated CIDR blocks: [{}]", cidrBlockAssociationSet);
        return cidrBlockAssociationSet;
    } else {
        return Collections.emptyList();
    }
}
Also used : AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) Vpc(com.amazonaws.services.ec2.model.Vpc) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client)

Example 5 with AmazonEc2Client

use of com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client in project cloudbreak by hortonworks.

the class AwsNetworkService method findNonOverLappingCIDR.

public String findNonOverLappingCIDR(AuthenticatedContext ac, CloudStack stack) {
    AwsNetworkView awsNetworkView = new AwsNetworkView(stack.getNetwork());
    String region = ac.getCloudContext().getLocation().getRegion().value();
    AmazonEc2Client ec2Client = awsClient.createEc2Client(new AwsCredentialView(ac.getCloudCredential()), region);
    DescribeVpcsRequest vpcRequest = new DescribeVpcsRequest().withVpcIds(awsNetworkView.getExistingVpc());
    Vpc vpc = ec2Client.describeVpcs(vpcRequest).getVpcs().get(0);
    String vpcCidr = vpc.getCidrBlock();
    LOGGER.debug("Subnet cidr is empty, find a non-overlapping subnet for VPC cidr: {}", vpcCidr);
    DescribeSubnetsRequest request = new DescribeSubnetsRequest().withFilters(new Filter("vpc-id", singletonList(awsNetworkView.getExistingVpc())));
    List<Subnet> awsSubnets = ec2Client.describeSubnets(request).getSubnets();
    List<String> subnetCidrs = awsSubnets.stream().map(Subnet::getCidrBlock).collect(Collectors.toList());
    LOGGER.debug("The selected VPCs: {}, has the following subnets: {}", vpc.getVpcId(), String.join(",", subnetCidrs));
    return calculateSubnet(ac.getCloudContext().getName(), vpc, subnetCidrs);
}
Also used : AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) AwsNetworkView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsNetworkView) DescribeVpcsRequest(com.amazonaws.services.ec2.model.DescribeVpcsRequest) Filter(com.amazonaws.services.ec2.model.Filter) Vpc(com.amazonaws.services.ec2.model.Vpc) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) Subnet(com.amazonaws.services.ec2.model.Subnet) DescribeSubnetsRequest(com.amazonaws.services.ec2.model.DescribeSubnetsRequest)

Aggregations

AmazonEc2Client (com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client)97 AwsCredentialView (com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView)44 AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)41 Test (org.junit.Test)31 ArrayList (java.util.ArrayList)30 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)29 CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)29 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)28 HashMap (java.util.HashMap)28 Group (com.sequenceiq.cloudbreak.cloud.model.Group)24 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)24 DescribeSubnetsResult (com.amazonaws.services.ec2.model.DescribeSubnetsResult)23 DescribeVpcsResult (com.amazonaws.services.ec2.model.DescribeVpcsResult)23 Network (com.sequenceiq.cloudbreak.cloud.model.Network)23 InstanceAuthentication (com.sequenceiq.cloudbreak.cloud.model.InstanceAuthentication)22 AmazonServiceException (com.amazonaws.AmazonServiceException)21 CloudConnectorException (com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException)21 List (java.util.List)21 Vpc (com.amazonaws.services.ec2.model.Vpc)20 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)20