use of com.sequenceiq.common.api.cloudstorage.CloudStorageRequest in project cloudbreak by hortonworks.
the class AzureAdlsGen2Tests method testCreateStopAndStartClusterWithAdlsGen2AndCloudStorage.
@Test(dataProvider = TEST_CONTEXT, enabled = false)
@Description(given = "there is a running cloudbreak", when = "a valid azure stack create request with attached ADLS Gen2 cloud storage and defined storage location is sent", and = "the stack is started", then = "the stack should be available AND deletable")
public void testCreateStopAndStartClusterWithAdlsGen2AndCloudStorage(TestContext testContext) {
String name = resourcePropertyProvider().getName();
CloudStorageRequest cloudStorageRequest = adlsGen2CloudStorageV4RequestWithStorageLocations(name);
testContext.given("clusterWithAdlsGen2", ClusterTestDto.class).withCloudStorage(cloudStorageRequest).withName(name).given(StackTestDto.class).withCluster("clusterWithAdlsGen2").withName(name).when(stackTestClient.createV4()).await(STACK_AVAILABLE).then(stackTestClient.deleteV4()::action).then(stackContainsStorageLocations()).then(stackContainsAdlsGen2Properties()).validate();
}
use of com.sequenceiq.common.api.cloudstorage.CloudStorageRequest in project cloudbreak by hortonworks.
the class AzureAdlsGen2Tests method adlsGen2CloudStorageV4RequestWithStorageLocations.
private CloudStorageRequest adlsGen2CloudStorageV4RequestWithStorageLocations(String clusterName) {
CloudStorageRequest request = adlsGen2CloudStorageV4RequestWithoutStorageLocations();
String accountName = azureProperties.getCloudStorage().getAccountName();
String storageLocation = azureProperties.getCloudStorage().getBaseLocation();
AzureTestStorageLocation azureStorageLocation = new AzureTestStorageLocation(accountName, clusterName, storageLocation);
request.setLocations(azureStorageLocation.getAdlsGen2(LOCATION_STORAGE_COMPONENTS));
return request;
}
use of com.sequenceiq.common.api.cloudstorage.CloudStorageRequest 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;
}
Aggregations