Search in sources :

Example 6 with CloudS3View

use of com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View in project cloudbreak by hortonworks.

the class CloudFormationTemplateBuilderTest method initCloudStackWithInstanceProfile.

private CloudStack initCloudStackWithInstanceProfile() {
    CloudS3View logView = new CloudS3View(CloudIdentityType.LOG);
    logView.setInstanceProfile(INSTANCE_PROFILE);
    List<Group> groups = List.of(createDefaultGroupGatewayGroup(Optional.of(logView)), createDefaultGroupMasterGroup(Optional.of(logView)));
    return createDefaultCloudStack(groups, getDefaultCloudStackParameters(), getDefaultCloudStackTags());
}
Also used : Group(com.sequenceiq.cloudbreak.cloud.model.Group) CloudS3View(com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)

Example 7 with CloudS3View

use of com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View in project cloudbreak by hortonworks.

the class FileSystemConverter method cloudIdentityToS3View.

private CloudS3View cloudIdentityToS3View(CloudIdentity cloudIdentity) {
    CloudS3View cloudS3View = new CloudS3View(cloudIdentity.getIdentityType());
    S3Identity s3Identity = cloudIdentity.getS3Identity();
    if (Objects.isNull(s3Identity)) {
        LOGGER.warn("S3 identity is null. Identity type is {}", cloudIdentity.getIdentityType());
        return null;
    }
    cloudS3View.setInstanceProfile(s3Identity.getInstanceProfile());
    return cloudS3View;
}
Also used : S3Identity(com.sequenceiq.cloudbreak.domain.cloudstorage.S3Identity) CloudS3View(com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)

Example 8 with CloudS3View

use of com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View in project cloudbreak by hortonworks.

the class FileSystemConverter method convertS3Legacy.

private CloudS3View convertS3Legacy(S3FileSystem source) {
    CloudS3View cloudS3View = new CloudS3View(CloudIdentityType.LOG);
    cloudS3View.setInstanceProfile(source.getInstanceProfile());
    return cloudS3View;
}
Also used : CloudS3View(com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)

Example 9 with CloudS3View

use of com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View in project cloudbreak by hortonworks.

the class CloudStorageParametersConverter method s3ToCloudView.

public CloudS3View s3ToCloudView(StorageIdentityBase source) {
    CloudS3View cloudS3View = new CloudS3View(source.getType());
    cloudS3View.setInstanceProfile(source.getS3().getInstanceProfile());
    return cloudS3View;
}
Also used : CloudS3View(com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)

Example 10 with CloudS3View

use of com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View in project cloudbreak by hortonworks.

the class CloudStorageParametersConverter method s3ToCloudView.

public CloudS3View s3ToCloudView(S3CloudStorageV1Parameters source) {
    CloudS3View cloudS3View = new CloudS3View(CloudIdentityType.LOG);
    cloudS3View.setInstanceProfile(source.getInstanceProfile());
    return cloudS3View;
}
Also used : CloudS3View(com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)

Aggregations

CloudS3View (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudS3View)15 Test (org.junit.jupiter.api.Test)7 StorageLocationBase (com.sequenceiq.common.api.cloudstorage.StorageLocationBase)6 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)3 Policy (com.amazonaws.auth.policy.Policy)2 Group (com.sequenceiq.cloudbreak.cloud.model.Group)2 CloudAdlsGen2View (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudAdlsGen2View)2 CloudGcsView (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudGcsView)2 AdlsGen2CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters)2 Map (java.util.Map)2 InstanceProfile (com.amazonaws.services.identitymanagement.model.InstanceProfile)1 ModelContext (com.sequenceiq.cloudbreak.cloud.aws.common.resource.ModelContext)1 Security (com.sequenceiq.cloudbreak.cloud.model.Security)1 CloudFileSystemView (com.sequenceiq.cloudbreak.cloud.model.filesystem.CloudFileSystemView)1 S3Identity (com.sequenceiq.cloudbreak.domain.cloudstorage.S3Identity)1 CloudIdentityType (com.sequenceiq.common.model.CloudIdentityType)1 Matchers.containsString (org.hamcrest.Matchers.containsString)1