use of com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity in project cloudbreak by hortonworks.
the class FileSystemConverter method cloudIdentityToAdlsGen2View.
private CloudFileSystemView cloudIdentityToAdlsGen2View(CloudIdentity cloudIdentity) {
CloudAdlsGen2View cloudAdlsGen2View = new CloudAdlsGen2View(cloudIdentity.getIdentityType());
AdlsGen2Identity adlsGen2Identity = cloudIdentity.getAdlsGen2Identity();
if (Objects.isNull(adlsGen2Identity)) {
LOGGER.warn("ADLS Gen2 managed identity with type {} is null.", cloudIdentity.getIdentityType());
return null;
}
cloudAdlsGen2View.setManagedIdentity(adlsGen2Identity.getManagedIdentity());
return cloudAdlsGen2View;
}
use of com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity in project cloudbreak by hortonworks.
the class CloudStorageConverter method identityRequestToAdlsGen2.
private AdlsGen2Identity identityRequestToAdlsGen2(StorageIdentityBase storageIdentityRequest) {
AdlsGen2Identity adlsGen2Identity = new AdlsGen2Identity();
adlsGen2Identity.setManagedIdentity(storageIdentityRequest.getAdlsGen2().getManagedIdentity());
return adlsGen2Identity;
}
use of com.sequenceiq.cloudbreak.domain.cloudstorage.AdlsGen2Identity 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;
}
Aggregations