Search in sources :

Example 21 with StorageIdentityBase

use of com.sequenceiq.common.api.cloudstorage.StorageIdentityBase in project cloudbreak by hortonworks.

the class StackToDescribeFreeIpaResponseConverter method decorateWithCloudStorageAndTelemetry.

private void decorateWithCloudStorageAndTelemetry(Stack stack, DescribeFreeIpaResponse response) {
    TelemetryResponse telemetryResponse = telemetryConverter.convert(stack.getTelemetry());
    if (telemetryResponse != null) {
        response.setTelemetry(telemetryResponse);
        if (telemetryResponse.getLogging() != null) {
            CloudStorageResponse cloudStorageResponse = new CloudStorageResponse();
            List<StorageIdentityBase> identities = new ArrayList<>();
            StorageIdentityBase logIdentity = new StorageIdentityBase();
            logIdentity.setType(CloudIdentityType.LOG);
            identities.add(logIdentity);
            cloudStorageResponse.setIdentities(identities);
            response.setCloudStorage(cloudStorageResponse);
        }
    }
}
Also used : TelemetryResponse(com.sequenceiq.common.api.telemetry.response.TelemetryResponse) ArrayList(java.util.ArrayList) CloudStorageResponse(com.sequenceiq.common.api.cloudstorage.CloudStorageResponse) StorageIdentityBase(com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)

Example 22 with StorageIdentityBase

use of com.sequenceiq.common.api.cloudstorage.StorageIdentityBase in project cloudbreak by hortonworks.

the class AzureAdlsGen2Tests method adlsGen2CloudStorageV4RequestWithoutStorageLocations.

private CloudStorageRequest adlsGen2CloudStorageV4RequestWithoutStorageLocations() {
    CloudStorageRequest request = new CloudStorageRequest();
    AdlsGen2CloudStorageV1Parameters adlsGen2 = new AdlsGen2CloudStorageV1Parameters();
    String accountName = azureProperties.getCloudStorage().getAccountName();
    String accountKey = azureProperties.getCloudStorage().getAccountKey();
    adlsGen2.setAccountKey(accountKey);
    adlsGen2.setAccountName(accountName);
    StorageLocationBase storageLocationBase = new StorageLocationBase();
    storageLocationBase.setType(CloudStorageCdpService.RANGER_AUDIT);
    storageLocationBase.setValue("somePath");
    request.setLocations(List.of(storageLocationBase));
    StorageIdentityBase storageIdentityBase = new StorageIdentityBase();
    storageIdentityBase.setAdlsGen2(adlsGen2);
    request.setIdentities(List.of(storageIdentityBase));
    return request;
}
Also used : CloudStorageRequest(com.sequenceiq.common.api.cloudstorage.CloudStorageRequest) AdlsGen2CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters) StorageLocationBase(com.sequenceiq.common.api.cloudstorage.StorageLocationBase) StorageIdentityBase(com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)

Aggregations

StorageIdentityBase (com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)22 CloudStorageRequest (com.sequenceiq.common.api.cloudstorage.CloudStorageRequest)10 S3CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)9 StorageLocationBase (com.sequenceiq.common.api.cloudstorage.StorageLocationBase)8 AdlsGen2CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters)6 GcsCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters)5 Test (org.junit.Test)5 Test (org.junit.jupiter.api.Test)5 WasbCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters)4 ArrayList (java.util.ArrayList)4 FileSystemType (com.sequenceiq.common.model.FileSystemType)3 ConstraintViolation (javax.validation.ConstraintViolation)3 SpiFileSystem (com.sequenceiq.cloudbreak.cloud.model.SpiFileSystem)2 CloudFileSystemView (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudFileSystemView)2 CloudStorage (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage)2 AwsStorageParameters (com.sequenceiq.common.api.cloudstorage.AwsStorageParameters)2 CloudStorageResponse (com.sequenceiq.common.api.cloudstorage.CloudStorageResponse)2 S3Guard (com.sequenceiq.common.api.cloudstorage.S3Guard)2 LoggingRequest (com.sequenceiq.common.api.telemetry.request.LoggingRequest)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1