Search in sources :

Example 56 with S3CloudStorageV1Parameters

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

the class AwsCloudProvider method s3CloudStorageParameters.

public S3CloudStorageV1Parameters s3CloudStorageParameters() {
    S3CloudStorageV1Parameters s3CloudStorageV1Parameters = new S3CloudStorageV1Parameters();
    s3CloudStorageV1Parameters.setInstanceProfile(awsProperties.getCloudStorage().getS3().getInstanceProfile());
    return s3CloudStorageV1Parameters;
}
Also used : S3CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)

Example 57 with S3CloudStorageV1Parameters

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

the class DistroXClusterCreationTest method getS3Params.

private S3CloudStorageV1Parameters getS3Params() {
    S3CloudStorageV1Parameters params = new S3CloudStorageV1Parameters();
    params.setInstanceProfile("someInstanceProfileStuff");
    return params;
}
Also used : S3CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)

Example 58 with S3CloudStorageV1Parameters

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

the class BackupConverter method decorateBackupFromBackupRequest.

private void decorateBackupFromBackupRequest(Backup backup, BackupRequest backupRequest) {
    if (backup != null && backupRequest != null) {
        backup.setStorageLocation(backupRequest.getStorageLocation());
        if (backupRequest.getS3() != null) {
            S3CloudStorageV1Parameters s3Params = new S3CloudStorageV1Parameters();
            s3Params.setInstanceProfile(backupRequest.getS3().getInstanceProfile());
            backup.setS3(s3Params);
        } else if (backupRequest.getAdlsGen2() != null) {
            AdlsGen2CloudStorageV1Parameters adlsGen2Params = new AdlsGen2CloudStorageV1Parameters();
            AdlsGen2CloudStorageV1Parameters adlsGen2FromRequest = backupRequest.getAdlsGen2();
            adlsGen2Params.setAccountKey(adlsGen2FromRequest.getAccountKey());
            adlsGen2Params.setAccountName(adlsGen2FromRequest.getAccountName());
            adlsGen2Params.setSecure(adlsGen2FromRequest.isSecure());
            adlsGen2Params.setManagedIdentity(adlsGen2FromRequest.getManagedIdentity());
            backup.setAdlsGen2(adlsGen2Params);
        } else if (backupRequest.getGcs() != null) {
            GcsCloudStorageV1Parameters gcsParams = new GcsCloudStorageV1Parameters();
            GcsCloudStorageV1Parameters gcsFromRequest = backupRequest.getGcs();
            gcsParams.setServiceAccountEmail(gcsFromRequest.getServiceAccountEmail());
            backup.setGcs(gcsParams);
        }
    }
}
Also used : S3CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters) AdlsGen2CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters) GcsCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters)

Example 59 with S3CloudStorageV1Parameters

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

the class BackupConverter method decorateBackupFromLoggingRequest.

private void decorateBackupFromLoggingRequest(Backup backup, LoggingRequest loggingRequest) {
    if (backup != null && loggingRequest != null) {
        backup.setStorageLocation(loggingRequest.getStorageLocation());
        if (loggingRequest.getS3() != null) {
            S3CloudStorageV1Parameters s3Params = new S3CloudStorageV1Parameters();
            s3Params.setInstanceProfile(loggingRequest.getS3().getInstanceProfile());
            backup.setS3(s3Params);
        } else if (loggingRequest.getAdlsGen2() != null) {
            AdlsGen2CloudStorageV1Parameters adlsGen2Params = new AdlsGen2CloudStorageV1Parameters();
            AdlsGen2CloudStorageV1Parameters adlsGen2FromRequest = loggingRequest.getAdlsGen2();
            adlsGen2Params.setAccountKey(adlsGen2FromRequest.getAccountKey());
            adlsGen2Params.setAccountName(adlsGen2FromRequest.getAccountName());
            adlsGen2Params.setSecure(adlsGen2FromRequest.isSecure());
            adlsGen2Params.setManagedIdentity(adlsGen2FromRequest.getManagedIdentity());
            backup.setAdlsGen2(adlsGen2Params);
        } else if (loggingRequest.getGcs() != null) {
            GcsCloudStorageV1Parameters gcsParams = new GcsCloudStorageV1Parameters();
            GcsCloudStorageV1Parameters gcsFromRequest = loggingRequest.getGcs();
            gcsParams.setServiceAccountEmail(gcsFromRequest.getServiceAccountEmail());
            backup.setGcs(gcsParams);
        }
    }
}
Also used : S3CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters) AdlsGen2CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters) GcsCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters)

Aggregations

S3CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)59 Test (org.junit.jupiter.api.Test)27 Telemetry (com.sequenceiq.common.api.telemetry.model.Telemetry)16 Logging (com.sequenceiq.common.api.telemetry.model.Logging)15 LoggingRequest (com.sequenceiq.common.api.telemetry.request.LoggingRequest)12 Test (org.junit.Test)12 GcsCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters)10 SdxCloudStorageRequest (com.sequenceiq.sdx.api.model.SdxCloudStorageRequest)10 StorageIdentityBase (com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)8 TelemetryResponse (com.sequenceiq.common.api.telemetry.response.TelemetryResponse)8 AdlsGen2CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters)7 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)7 LoggingResponse (com.sequenceiq.common.api.telemetry.response.LoggingResponse)7 Backup (com.sequenceiq.freeipa.api.model.Backup)7 CloudStorageRequest (com.sequenceiq.common.api.cloudstorage.CloudStorageRequest)5 StorageLocationBase (com.sequenceiq.common.api.cloudstorage.StorageLocationBase)5 DetailedEnvironmentResponse (com.sequenceiq.environment.api.v1.environment.model.response.DetailedEnvironmentResponse)5 ClusterV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request)4 Features (com.sequenceiq.common.api.telemetry.model.Features)4 SdxClusterRequest (com.sequenceiq.sdx.api.model.SdxClusterRequest)4