Search in sources :

Example 1 with ResourceType

use of com.sequenceiq.common.api.type.ResourceType in project cloudbreak by hortonworks.

the class AwsEfsResourceBuilder method checkResources.

@Override
protected List<CloudResourceStatus> checkResources(ResourceType type, AwsContext context, AuthenticatedContext auth, Iterable<CloudResource> resources) {
    AmazonEfsClient client = getAmazonEfsClient(auth);
    List<CloudResource> efsResources = StreamSupport.stream(resources.spliterator(), false).filter(r -> r.getType().equals(resourceType())).collect(Collectors.toList());
    List<String> efsIds = new ArrayList<>();
    List<CloudResourceStatus> cloudResourceStatusList = new ArrayList<>();
    for (CloudResource efsResource : efsResources) {
        CloudEfsAttributes efsAttributes = efsResource.getParameter(CloudResource.ATTRIBUTES, CloudEfsAttributes.class);
        String efsId = efsAttributes.getFileSystemId();
        efsIds.add(efsId);
        DescribeFileSystemsRequest request = new DescribeFileSystemsRequest().withFileSystemId(efsId);
        DescribeFileSystemsResult result = client.describeFileSystems(request);
        List<CloudResourceStatus> efsStatusList = getResourceStatus(efsResource, efsId, result);
        cloudResourceStatusList.addAll(efsStatusList);
    }
    LOGGER.debug("got EFS status for [{}]", String.join(",", efsIds));
    return cloudResourceStatusList;
}
Also used : AmazonEfsClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEfsClient) DescribeMountTargetsResult(com.amazonaws.services.elasticfilesystem.model.DescribeMountTargetsResult) AmazonElasticFileSystemException(com.amazonaws.services.elasticfilesystem.model.AmazonElasticFileSystemException) AsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor) LoggerFactory(org.slf4j.LoggerFactory) HashMap(java.util.HashMap) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) AmazonEfsClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEfsClient) Image(com.sequenceiq.cloudbreak.cloud.model.Image) Function(java.util.function.Function) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Future(java.util.concurrent.Future) AwsCredentialView(com.sequenceiq.cloudbreak.cloud.aws.common.view.AwsCredentialView) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) AwsContext(com.sequenceiq.cloudbreak.cloud.aws.common.context.AwsContext) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) StreamSupport(java.util.stream.StreamSupport) DescribeMountTargetsRequest(com.amazonaws.services.elasticfilesystem.model.DescribeMountTargetsRequest) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceType(com.sequenceiq.common.api.type.ResourceType) Logger(org.slf4j.Logger) CreateFileSystemRequest(com.amazonaws.services.elasticfilesystem.model.CreateFileSystemRequest) DescribeFileSystemsResult(com.amazonaws.services.elasticfilesystem.model.DescribeFileSystemsResult) FileSystemDescription(com.amazonaws.services.elasticfilesystem.model.FileSystemDescription) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Collection(java.util.Collection) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) DescribeFileSystemsRequest(com.amazonaws.services.elasticfilesystem.model.DescribeFileSystemsRequest) Tag(com.amazonaws.services.elasticfilesystem.model.Tag) Collectors(java.util.stream.Collectors) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) CreateFileSystemResult(com.amazonaws.services.elasticfilesystem.model.CreateFileSystemResult) List(java.util.List) Component(org.springframework.stereotype.Component) DeleteMountTargetRequest(com.amazonaws.services.elasticfilesystem.model.DeleteMountTargetRequest) LifeCycleState(com.sequenceiq.cloudbreak.cloud.model.filesystem.efs.LifeCycleState) MountTargetDescription(com.amazonaws.services.elasticfilesystem.model.MountTargetDescription) CloudEfsAttributes(com.sequenceiq.cloudbreak.cloud.model.CloudEfsAttributes) Group(com.sequenceiq.cloudbreak.cloud.model.Group) Optional(java.util.Optional) DeleteFileSystemRequest(com.amazonaws.services.elasticfilesystem.model.DeleteFileSystemRequest) CommonAwsClient(com.sequenceiq.cloudbreak.cloud.aws.common.CommonAwsClient) Collections(java.util.Collections) AwsTaggingService(com.sequenceiq.cloudbreak.cloud.aws.common.AwsTaggingService) StringUtils(org.springframework.util.StringUtils) CloudEfsAttributes(com.sequenceiq.cloudbreak.cloud.model.CloudEfsAttributes) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) ArrayList(java.util.ArrayList) DescribeFileSystemsRequest(com.amazonaws.services.elasticfilesystem.model.DescribeFileSystemsRequest) DescribeFileSystemsResult(com.amazonaws.services.elasticfilesystem.model.DescribeFileSystemsResult) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource)

Example 2 with ResourceType

use of com.sequenceiq.common.api.type.ResourceType 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 ResourceType

use of com.sequenceiq.common.api.type.ResourceType in project cloudbreak by hortonworks.

the class AzureResourceConnector method check.

@Override
public List<CloudResourceStatus> check(AuthenticatedContext authenticatedContext, List<CloudResource> resources) {
    List<CloudResourceStatus> result = new ArrayList<>();
    AzureClient client = authenticatedContext.getParameter(AzureClient.class);
    String stackName = azureUtils.getStackName(authenticatedContext.getCloudContext());
    for (CloudResource resource : resources) {
        ResourceType resourceType = resource.getType();
        if (resourceType == ResourceType.ARM_TEMPLATE) {
            LOGGER.debug("Checking Azure stack status of: {}", stackName);
            checkTemplateDeployment(result, client, stackName, resource);
        } else {
            if (!resourceType.name().startsWith("AZURE")) {
                throw new CloudConnectorException(String.format("Invalid resource type: %s", resourceType));
            }
        }
    }
    return result;
}
Also used : AzureClient(com.sequenceiq.cloudbreak.cloud.azure.client.AzureClient) CloudConnectorException(com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) ArrayList(java.util.ArrayList) ResourceType(com.sequenceiq.common.api.type.ResourceType) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource)

Example 4 with ResourceType

use of com.sequenceiq.common.api.type.ResourceType in project cloudbreak by hortonworks.

the class GcpAttachedDiskResourceBuilder method build.

@Override
public List<CloudResource> build(GcpContext context, CloudInstance instance, long privateId, AuthenticatedContext auth, Group group, List<CloudResource> resources, CloudStack cloudStack) throws Exception {
    InstanceTemplate template = group.getReferenceInstanceTemplate();
    List<String> operations = new ArrayList<>();
    List<String> syncedOperations = Collections.synchronizedList(operations);
    String projectId = context.getProjectId();
    Compute compute = context.getCompute();
    Collection<Future<Void>> futures = new ArrayList<>();
    List<CloudResource> buildableResource = resources.stream().filter(cloudResource -> CommonStatus.REQUESTED.equals(cloudResource.getStatus())).collect(Collectors.toList());
    List<CloudResource> result = new ArrayList<>();
    for (CloudResource volumeSetResource : buildableResource) {
        VolumeSetAttributes volumeSetAttributes = volumeSetResource.getParameter(CloudResource.ATTRIBUTES, VolumeSetAttributes.class);
        for (VolumeSetAttributes.Volume volume : volumeSetAttributes.getVolumes()) {
            Map<String, String> labels = gcpLabelUtil.createLabelsFromTags(cloudStack);
            Disk disk = createDisk(projectId, volume, labels, volumeSetAttributes);
            customGcpDiskEncryptionService.addEncryptionKeyToDisk(template, disk);
            Future<Void> submit = intermediateBuilderExecutor.submit(() -> {
                Insert insDisk = compute.disks().insert(projectId, volumeSetAttributes.getAvailabilityZone(), disk);
                try {
                    Operation operation = insDisk.execute();
                    syncedOperations.add(operation.getName());
                    if (operation.getHttpErrorStatusCode() != null) {
                        throw new GcpResourceException(operation.getHttpErrorMessage(), resourceType(), disk.getName());
                    }
                } catch (TokenResponseException e) {
                    throw gcpStackUtil.getMissingServiceAccountKeyError(e, projectId);
                } catch (GoogleJsonResponseException e) {
                    throw new GcpResourceException(checkException(e), resourceType(), disk.getName());
                }
                return null;
            });
            futures.add(submit);
        }
        volumeSetResource.putParameter(OPERATION_ID, operations);
        result.add(new Builder().cloudResource(volumeSetResource).status(CommonStatus.CREATED).params(volumeSetResource.getParameters()).build());
    }
    for (Future<Void> future : futures) {
        future.get();
    }
    result.addAll(resources.stream().filter(cloudResource -> CommonStatus.CREATED.equals(cloudResource.getStatus())).collect(Collectors.toList()));
    return result;
}
Also used : CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) AsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor) LoggerFactory(org.slf4j.LoggerFactory) GcpResourceNameService(com.sequenceiq.cloudbreak.cloud.gcp.service.GcpResourceNameService) HashMap(java.util.HashMap) GcpLabelUtil(com.sequenceiq.cloudbreak.cloud.gcp.util.GcpLabelUtil) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Disk(com.google.api.services.compute.model.Disk) Image(com.sequenceiq.cloudbreak.cloud.model.Image) DeviceNameGenerator(com.sequenceiq.cloudbreak.util.DeviceNameGenerator) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Future(java.util.concurrent.Future) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) Builder(com.sequenceiq.cloudbreak.cloud.model.CloudResource.Builder) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) CustomGcpDiskEncryptionService(com.sequenceiq.cloudbreak.cloud.gcp.service.CustomGcpDiskEncryptionService) Insert(com.google.api.services.compute.Compute.Disks.Insert) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate) GcpContext(com.sequenceiq.cloudbreak.cloud.gcp.context.GcpContext) GcpStackUtil(com.sequenceiq.cloudbreak.cloud.gcp.util.GcpStackUtil) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) ResourceType(com.sequenceiq.common.api.type.ResourceType) Logger(org.slf4j.Logger) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Collection(java.util.Collection) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) IOException(java.io.IOException) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) Operation(com.google.api.services.compute.model.Operation) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Collectors(java.util.stream.Collectors) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) Component(org.springframework.stereotype.Component) TokenResponseException(com.google.api.client.auth.oauth2.TokenResponseException) Group(com.sequenceiq.cloudbreak.cloud.model.Group) Optional(java.util.Optional) Volume(com.sequenceiq.cloudbreak.cloud.model.Volume) Collections(java.util.Collections) Compute(com.google.api.services.compute.Compute) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) GcpDiskType(com.sequenceiq.cloudbreak.cloud.gcp.GcpPlatformParameters.GcpDiskType) Builder(com.sequenceiq.cloudbreak.cloud.model.CloudResource.Builder) ArrayList(java.util.ArrayList) Operation(com.google.api.services.compute.model.Operation) Insert(com.google.api.services.compute.Compute.Disks.Insert) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) Compute(com.google.api.services.compute.Compute) Future(java.util.concurrent.Future) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Disk(com.google.api.services.compute.model.Disk) TokenResponseException(com.google.api.client.auth.oauth2.TokenResponseException) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate)

Example 5 with ResourceType

use of com.sequenceiq.common.api.type.ResourceType in project cloudbreak by hortonworks.

the class GcpAttachedDiskResourceBuilder method checkResources.

@Override
public List<CloudResourceStatus> checkResources(GcpContext context, AuthenticatedContext auth, List<CloudResource> resources) {
    List<CloudResourceStatus> result = new ArrayList<>();
    for (CloudResource resource : resources) {
        LOGGER.debug("Check {} resource: {}", resourceType(), resource);
        List<String> operationIds = Optional.ofNullable(resource.getParameter(OPERATION_ID, List.class)).orElse(List.of());
        boolean finished = operationIds.isEmpty() || operationIds.stream().allMatch(operationId -> {
            try {
                Operation operation = getResourceChecker().check(context, operationId, resources);
                return operation == null || gcpStackUtil.isOperationFinished(operation);
            } catch (Exception e) {
                CloudContext cloudContext = auth.getCloudContext();
                throw new GcpResourceException("Error during status check", resourceType(), cloudContext.getName(), cloudContext.getId(), resource.getName(), e);
            }
        });
        ResourceStatus successStatus = context.isBuild() ? ResourceStatus.CREATED : ResourceStatus.DELETED;
        result.add(new CloudResourceStatus(resource, finished ? successStatus : ResourceStatus.IN_PROGRESS));
        if (finished) {
            if (successStatus == ResourceStatus.CREATED) {
                LOGGER.debug("Creation of {} was successful", resource);
            } else {
                LOGGER.debug("Deletion of {} was successful", resource);
            }
        }
    }
    return result;
}
Also used : CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) AsyncTaskExecutor(org.springframework.core.task.AsyncTaskExecutor) LoggerFactory(org.slf4j.LoggerFactory) GcpResourceNameService(com.sequenceiq.cloudbreak.cloud.gcp.service.GcpResourceNameService) HashMap(java.util.HashMap) GcpLabelUtil(com.sequenceiq.cloudbreak.cloud.gcp.util.GcpLabelUtil) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Disk(com.google.api.services.compute.model.Disk) Image(com.sequenceiq.cloudbreak.cloud.model.Image) DeviceNameGenerator(com.sequenceiq.cloudbreak.util.DeviceNameGenerator) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Future(java.util.concurrent.Future) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) Builder(com.sequenceiq.cloudbreak.cloud.model.CloudResource.Builder) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) CustomGcpDiskEncryptionService(com.sequenceiq.cloudbreak.cloud.gcp.service.CustomGcpDiskEncryptionService) Insert(com.google.api.services.compute.Compute.Disks.Insert) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate) GcpContext(com.sequenceiq.cloudbreak.cloud.gcp.context.GcpContext) GcpStackUtil(com.sequenceiq.cloudbreak.cloud.gcp.util.GcpStackUtil) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) ResourceType(com.sequenceiq.common.api.type.ResourceType) Logger(org.slf4j.Logger) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Collection(java.util.Collection) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) IOException(java.io.IOException) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) Operation(com.google.api.services.compute.model.Operation) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Collectors(java.util.stream.Collectors) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) Component(org.springframework.stereotype.Component) TokenResponseException(com.google.api.client.auth.oauth2.TokenResponseException) Group(com.sequenceiq.cloudbreak.cloud.model.Group) Optional(java.util.Optional) Volume(com.sequenceiq.cloudbreak.cloud.model.Volume) Collections(java.util.Collections) Compute(com.google.api.services.compute.Compute) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) GcpDiskType(com.sequenceiq.cloudbreak.cloud.gcp.GcpPlatformParameters.GcpDiskType) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) ArrayList(java.util.ArrayList) Operation(com.google.api.services.compute.model.Operation) GoogleJsonResponseException(com.google.api.client.googleapis.json.GoogleJsonResponseException) IOException(java.io.IOException) TokenResponseException(com.google.api.client.auth.oauth2.TokenResponseException) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) GcpResourceException(com.sequenceiq.cloudbreak.cloud.gcp.GcpResourceException) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource)

Aggregations

ResourceType (com.sequenceiq.common.api.type.ResourceType)12 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)9 CloudResourceStatus (com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus)9 CommonStatus (com.sequenceiq.common.api.type.CommonStatus)7 ArrayList (java.util.ArrayList)7 Collections (java.util.Collections)7 List (java.util.List)7 Map (java.util.Map)7 Optional (java.util.Optional)7 AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)6 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)6 Group (com.sequenceiq.cloudbreak.cloud.model.Group)6 Collectors (java.util.stream.Collectors)6 CloudContext (com.sequenceiq.cloudbreak.cloud.context.CloudContext)5 CloudConnectorException (com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException)5 CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)5 Image (com.sequenceiq.cloudbreak.cloud.model.Image)5 InstanceTemplate (com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate)5 ResourceStatus (com.sequenceiq.cloudbreak.cloud.model.ResourceStatus)5 VolumeSetAttributes (com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes)5