use of com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class WasbFileSystemToWasbCloudStorageParametersConverterTest method testConvertCheckEveryParameterHasPassedProperly.
@Test
public void testConvertCheckEveryParameterHasPassedProperly() {
WasbCloudStorageV1Parameters expected = new WasbCloudStorageV1Parameters();
expected.setAccountKey(TEST_ACCOUNT_KEY);
expected.setAccountName(TEST_ACCOUNT_NAME);
WasbCloudStorageV1Parameters result = underTest.convert(createWasbFileSystem());
assertEquals(expected, result);
}
use of com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class AzureCloudProvider method getFileSystemType.
@Override
public FileSystemType getFileSystemType() {
AdlsCloudStorageV1Parameters adlsCloudStorageV1Parameters = new AdlsCloudStorageV1Parameters();
AdlsGen2CloudStorageV1Parameters adlsGen2CloudStorageV1Parameters = new AdlsGen2CloudStorageV1Parameters();
WasbCloudStorageV1Parameters wasbCloudStorageV1Parameters = new WasbCloudStorageV1Parameters();
FileSystemType fileSystemType;
switch(azureProperties.getCloudStorage().getFileSystemType()) {
case "WASB_INTEGRATED":
case "WASB":
fileSystemType = wasbCloudStorageV1Parameters.getType();
break;
case "ADLS":
fileSystemType = adlsCloudStorageV1Parameters.getType();
break;
case "ADLS_GEN_2":
fileSystemType = adlsGen2CloudStorageV1Parameters.getType();
break;
default:
LOGGER.warn("The given {} File System Type is not in the list of Azure file system types. So we use the default one; {}", azureProperties.getCloudStorage().getFileSystemType(), "ADLS_GEN_2");
fileSystemType = adlsGen2CloudStorageV1Parameters.getType();
break;
}
return fileSystemType;
}
use of com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageValidationUtilTest method testIsCloudStorageConfiguredWhenWasbNotNull.
@Test
public void testIsCloudStorageConfiguredWhenWasbNotNull() {
CloudStorageRequest cloudStorageRequest = new CloudStorageRequest();
StorageIdentityBase storageIdentityBase = new StorageIdentityBase();
storageIdentityBase.setWasb(new WasbCloudStorageV1Parameters());
cloudStorageRequest.setIdentities(List.of(storageIdentityBase));
cloudStorageRequest.setLocations(List.of(new StorageLocationBase()));
boolean actual = underTest.isCloudStorageConfigured(cloudStorageRequest);
Assert.assertTrue(actual);
}
use of com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters 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.WasbCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageConverter method wasbIdentityToParameters.
private WasbCloudStorageV1Parameters wasbIdentityToParameters(WasbIdentity wasbIdentity) {
WasbCloudStorageV1Parameters wasbParameters = new WasbCloudStorageV1Parameters();
wasbParameters.setAccountKey(wasbIdentity.getAccountKey());
wasbParameters.setAccountName(wasbIdentity.getAccountName());
wasbParameters.setSecure(wasbIdentity.isSecure());
return wasbParameters;
}
Aggregations