Search in sources :

Example 1 with WasbIdentity

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

the class CloudStorageConverter method identityRequestToCloudIdentity.

private CloudIdentity identityRequestToCloudIdentity(StorageIdentityBase storageIdentityRequest) {
    CloudIdentity cloudIdentity = new CloudIdentity();
    cloudIdentity.setIdentityType(storageIdentityRequest.getType());
    if (storageIdentityRequest.getS3() != null) {
        S3Identity s3Identity = identityRequestToS3(storageIdentityRequest);
        cloudIdentity.setS3Identity(s3Identity);
    }
    if (storageIdentityRequest.getEfs() != null) {
        EfsIdentity efsIdentity = identityRequestToEfs(storageIdentityRequest);
        cloudIdentity.setEfsIdentity(efsIdentity);
    }
    if (storageIdentityRequest.getWasb() != null) {
        WasbIdentity wasbIdentity = identityRequestToWasb(storageIdentityRequest);
        cloudIdentity.setWasbIdentity(wasbIdentity);
    }
    if (storageIdentityRequest.getAdlsGen2() != null) {
        AdlsGen2Identity identity = identityRequestToAdlsGen2(storageIdentityRequest);
        cloudIdentity.setAdlsGen2Identity(identity);
    }
    if (storageIdentityRequest.getGcs() != null) {
        GcsIdentity identity = identityRequestToGcs(storageIdentityRequest);
        cloudIdentity.setGcsIdentity(identity);
    }
    if (storageIdentityRequest.getAdls() != null) {
        throw new BadRequestException("ADLS cloud storage is not (yet) supported.");
    }
    return cloudIdentity;
}
Also used : AdlsGen2Identity(com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity) GcsIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.GcsIdentity) CloudIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.CloudIdentity) EfsIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.EfsIdentity) BadRequestException(com.sequenceiq.cloudbreak.common.exception.BadRequestException) S3Identity(com.sequenceiq.cloudbreak.domain.cloudstorage.S3Identity) WasbIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.WasbIdentity)

Example 2 with WasbIdentity

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

the class CloudStorageConverter method wasbParametersToIdentity.

private WasbIdentity wasbParametersToIdentity(WasbCloudStorageV1Parameters wasbCloudStorageV1Parameters) {
    WasbIdentity wasbIdentity = new WasbIdentity();
    wasbIdentity.setAccountKey(wasbCloudStorageV1Parameters.getAccountKey());
    wasbIdentity.setAccountName(wasbCloudStorageV1Parameters.getAccountName());
    wasbIdentity.setSecure(wasbCloudStorageV1Parameters.isSecure());
    return wasbIdentity;
}
Also used : WasbIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.WasbIdentity)

Example 3 with WasbIdentity

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

the class CloudStorageConverter method identityRequestToWasb.

private WasbIdentity identityRequestToWasb(StorageIdentityBase storageIdentityRequest) {
    WasbIdentity wasbIdentity = new WasbIdentity();
    wasbIdentity.setAccountKey(storageIdentityRequest.getWasb().getAccountKey());
    wasbIdentity.setAccountName(storageIdentityRequest.getWasb().getAccountName());
    wasbIdentity.setSecure(storageIdentityRequest.getWasb().isSecure());
    return wasbIdentity;
}
Also used : WasbIdentity(com.sequenceiq.cloudbreak.domain.cloudstorage.WasbIdentity)

Aggregations

WasbIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.WasbIdentity)3 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)1 AdlsGen2Identity (com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity)1 CloudIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.CloudIdentity)1 EfsIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.EfsIdentity)1 GcsIdentity (com.sequenceiq.cloudbreak.domain.cloudstorage.GcsIdentity)1 S3Identity (com.sequenceiq.cloudbreak.domain.cloudstorage.S3Identity)1