use of com.sequenceiq.cloudbreak.api.endpoint.v4.filesystems.responses.FileSystemParameterV4Responses in project cloudbreak by hortonworks.
the class CloudStorageManifesterTest method mockFileSystemResponseForCloudbreakClient.
private void mockFileSystemResponseForCloudbreakClient() {
FileSystemParameterV4Responses dummyResponses = new FileSystemParameterV4Responses();
List<FileSystemParameterV4Response> responses = new ArrayList<>();
FileSystemParameterV4Response resp = new FileSystemParameterV4Response();
resp.setType(CloudStorageCdpService.RANGER_AUDIT.name());
resp.setDefaultPath("ranger/example-path");
resp.setDescription("Rangerpath");
resp.setPropertyFile("dummyFile");
resp.setPropertyName("dummyPropertyName");
responses.add(resp);
dummyResponses.setResponses(responses);
when(fileSystemV4Endpoint.getFileSystemParametersInternal(anyLong(), anyString(), anyString(), anyString(), anyString(), anyString(), anyBoolean(), anyBoolean(), anyString())).thenReturn(dummyResponses);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.filesystems.responses.FileSystemParameterV4Responses in project cloudbreak by hortonworks.
the class CloudStorageManifester method setStorageLocations.
private void setStorageLocations(FileSystemParameterV4Responses fileSystemRecommendations, CloudStorageRequest cloudStorageRequest) {
List<StorageLocationBase> storageLocations = fileSystemRecommendations.getResponses().stream().map(response -> {
StorageLocationBase storageLocation = new StorageLocationBase();
storageLocation.setValue(response.getDefaultPath());
storageLocation.setType(CloudStorageCdpService.valueOf(response.getType()));
return storageLocation;
}).collect(Collectors.toList());
cloudStorageRequest.setLocations(storageLocations);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.filesystems.responses.FileSystemParameterV4Responses in project cloudbreak by hortonworks.
the class CloudStorageManifester method initSdxCloudStorageRequest.
public CloudStorageRequest initSdxCloudStorageRequest(String cloudPlatform, String blueprint, String clusterName, SdxCloudStorageRequest cloudStorage) {
CloudStorageRequest cloudStorageRequest = new CloudStorageRequest();
normalizeCloudStorageRequest(cloudStorage);
storageValidationService.validateCloudStorage(cloudPlatform, cloudStorage);
FileSystemParameterV4Responses fileSystemRecommendations = getFileSystemRecommendations(blueprint, clusterName, cloudStorage);
LOGGER.info("File recommendations {}", fileSystemRecommendations);
setStorageLocations(fileSystemRecommendations, cloudStorageRequest);
addIdBrokerIdentity(cloudStorage, cloudStorageRequest);
return cloudStorageRequest;
}
Aggregations