use of com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class GcsFileSystemToGcsCloudStorageParametersConverterTest method testConvertCheckEveryParamPassedProperly.
@Test
public void testConvertCheckEveryParamPassedProperly() {
GcsCloudStorageV1Parameters expected = new GcsCloudStorageV1Parameters();
expected.setServiceAccountEmail(TEST_SERVICE_ACCOUNT_EMAIL);
GcsCloudStorageV1Parameters result = underTest.convert(createGcsFileSystem());
assertEquals(result, expected);
}
use of com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageConverter method cloudIdentityToStorageIdentityBase.
private StorageIdentityBase cloudIdentityToStorageIdentityBase(CloudIdentity cloudIdentity) {
StorageIdentityBase storageIdentityBase = new StorageIdentityBase();
storageIdentityBase.setType(cloudIdentity.getIdentityType());
if (cloudIdentity.getWasbIdentity() != null) {
WasbCloudStorageV1Parameters parameters = wasbIdentityToParameters(cloudIdentity.getWasbIdentity());
storageIdentityBase.setWasb(parameters);
} else if (cloudIdentity.getS3Identity() != null) {
S3CloudStorageV1Parameters parameters = s3IdentityToParameters(cloudIdentity.getS3Identity());
storageIdentityBase.setS3(parameters);
} else if (cloudIdentity.getAdlsGen2Identity() != null) {
AdlsGen2CloudStorageV1Parameters adlsGen2CloudStorageV1Parameters = adlsGen2IdentityToParameters(cloudIdentity.getAdlsGen2Identity());
storageIdentityBase.setAdlsGen2(adlsGen2CloudStorageV1Parameters);
} else if (cloudIdentity.getGcsIdentity() != null) {
GcsCloudStorageV1Parameters gcsCloudStorageV1Parameters = gcsIdentityToParameters(cloudIdentity.getGcsIdentity());
storageIdentityBase.setGcs(gcsCloudStorageV1Parameters);
}
return storageIdentityBase;
}
use of com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageConverter method gcsIdentityToParameters.
private GcsCloudStorageV1Parameters gcsIdentityToParameters(GcsIdentity gcsIdentity) {
GcsCloudStorageV1Parameters gcsCloudStorageV1Parameters = new GcsCloudStorageV1Parameters();
gcsCloudStorageV1Parameters.setServiceAccountEmail(gcsIdentity.getServiceAccountEmail());
return gcsCloudStorageV1Parameters;
}
use of com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageConverter method cloudIdentityToRequest.
private StorageIdentityBase cloudIdentityToRequest(CloudIdentity cloudIdentity) {
StorageIdentityBase storageIdentityRequest = new StorageIdentityBase();
storageIdentityRequest.setType(cloudIdentity.getIdentityType());
if (cloudIdentity.getS3Identity() != null) {
S3CloudStorageV1Parameters s3Parameters = s3IdentityToParameters(cloudIdentity.getS3Identity());
storageIdentityRequest.setS3(s3Parameters);
} else if (cloudIdentity.getWasbIdentity() != null) {
WasbCloudStorageV1Parameters wasbParameters = wasbIdentityToParameters(cloudIdentity.getWasbIdentity());
storageIdentityRequest.setWasb(wasbParameters);
} else if (cloudIdentity.getAdlsGen2Identity() != null) {
AdlsGen2CloudStorageV1Parameters adlsGen2CloudStorageV1Parameters = adlsGen2IdentityToParameters(cloudIdentity.getAdlsGen2Identity());
storageIdentityRequest.setAdlsGen2(adlsGen2CloudStorageV1Parameters);
} else if (cloudIdentity.getGcsIdentity() != null) {
GcsCloudStorageV1Parameters gcsCloudStorageV1Parameters = gcsIdentityToParameters(cloudIdentity.getGcsIdentity());
storageIdentityRequest.setGcs(gcsCloudStorageV1Parameters);
}
return storageIdentityRequest;
}
use of com.sequenceiq.common.api.cloudstorage.old.GcsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class GcsFileSystemToGcsCloudStorageParametersV4Converter method convert.
public GcsCloudStorageV1Parameters convert(GcsFileSystem source) {
GcsCloudStorageV1Parameters fileSystemConfigurations = new GcsCloudStorageV1Parameters();
fileSystemConfigurations.setServiceAccountEmail(source.getServiceAccountEmail());
return fileSystemConfigurations;
}
Aggregations