Search in sources :

Example 11 with CloudStorage

use of com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage in project cloudbreak by hortonworks.

the class CloudFileSystemViewProviderTest method getCloudStorage.

private CloudStorage getCloudStorage(List<CloudIdentity> cloudIdentities) {
    List<StorageLocation> storageLocations = new ArrayList<>();
    StorageLocation storageLocation1 = new StorageLocation();
    storageLocation1.setType(SERVICE_1);
    storageLocation1.setValue(PATH_1);
    storageLocations.add(storageLocation1);
    StorageLocation storageLocation2 = new StorageLocation();
    storageLocation2.setType(SERVICE_2);
    storageLocation2.setValue(PATH_2);
    storageLocations.add(storageLocation2);
    StorageLocation storageLocation3 = new StorageLocation();
    storageLocation3.setType(SERVICE_3);
    storageLocation3.setValue(PATH_3);
    storageLocations.add(storageLocation3);
    StorageLocation storageLocation4 = new StorageLocation();
    storageLocation4.setType(SERVICE_4);
    storageLocation4.setValue(PATH_4);
    storageLocations.add(storageLocation4);
    CloudStorage cloudStorage = new CloudStorage();
    cloudStorage.setCloudIdentities(cloudIdentities);
    cloudStorage.setLocations(storageLocations);
    return cloudStorage;
}
Also used : CloudStorage(com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage) ArrayList(java.util.ArrayList) StorageLocation(com.sequenceiq.cloudbreak.domain.cloudstorage.StorageLocation)

Example 12 with CloudStorage

use of com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage in project cloudbreak by hortonworks.

the class RemoteDataContextWorkaroundServiceTest method mockStack.

private Stack mockStack(StorageLocation... storageLocations) {
    Stack stack = new Stack();
    Cluster cluster = new Cluster();
    cluster.setRdsConfigs(new HashSet<>());
    FileSystem fileSystem = new FileSystem();
    fileSystem.setType(FileSystemType.S3);
    CloudStorage cloudStorage = new CloudStorage();
    cloudStorage.setLocations(Arrays.asList(storageLocations));
    fileSystem.setCloudStorage(cloudStorage);
    cluster.setFileSystem(fileSystem);
    stack.setCluster(cluster);
    return stack;
}
Also used : CloudStorage(com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage) FileSystem(com.sequenceiq.cloudbreak.domain.FileSystem) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Example 13 with CloudStorage

use of com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage in project cloudbreak by hortonworks.

the class RemoteDataContextWorkaroundServiceTest method mockRequestedCluster.

private Cluster mockRequestedCluster(StorageLocation... storageLocations) {
    Cluster cluster = new Cluster();
    FileSystem fileSystem = new FileSystem();
    fileSystem.setType(FileSystemType.S3);
    CloudStorage cloudStorage = new CloudStorage();
    cloudStorage.setLocations(Arrays.asList(storageLocations));
    fileSystem.setCloudStorage(cloudStorage);
    cluster.setFileSystem(fileSystem);
    cluster.setFileSystem(fileSystem);
    return cluster;
}
Also used : CloudStorage(com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage) FileSystem(com.sequenceiq.cloudbreak.domain.FileSystem) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)

Aggregations

CloudStorage (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudStorage)13 FileSystem (com.sequenceiq.cloudbreak.domain.FileSystem)11 CloudIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudIdentity)6 StorageLocation (com.sequenceiq.cloudbreak.domain.cloudstorage.StorageLocation)6 CloudFileSystemView (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudFileSystemView)4 AccountMapping (com.sequenceiq.cloudbreak.domain.cloudstorage.AccountMapping)4 HashMap (java.util.HashMap)4 SpiFileSystem (com.sequenceiq.cloudbreak.cloud.model.SpiFileSystem)3 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)3 AwsStorageParameters (com.sequenceiq.common.api.cloudstorage.AwsStorageParameters)3 CloudStorageRequest (com.sequenceiq.common.api.cloudstorage.CloudStorageRequest)3 S3Guard (com.sequenceiq.common.api.cloudstorage.S3Guard)3 StorageIdentityBase (com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)3 StorageLocationBase (com.sequenceiq.common.api.cloudstorage.StorageLocationBase)3 ArrayList (java.util.ArrayList)3 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)2 CloudS3View (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)2 CloudEfsConfiguration (com.sequenceiq.cloudbreak.cloud.model.filesystem.efs.CloudEfsConfiguration)2 MissingResourceNameGenerator (com.sequenceiq.cloudbreak.common.converter.MissingResourceNameGenerator)2 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)2