use of com.sequenceiq.cloudbreak.domain.view.BlueprintView in project cloudbreak by hortonworks.
the class BlueprintService method getAllAvailableViewInWorkspaceAndFilterBySdxReady.
public Set<BlueprintView> getAllAvailableViewInWorkspaceAndFilterBySdxReady(Long workspaceId, Boolean withSdx) {
User user = getLoggedInUser();
Workspace workspace = getWorkspaceService().get(workspaceId, user);
updateDefaultBlueprintCollection(workspace);
Set<BlueprintView> allByNotDeletedInWorkspace = blueprintViewRepository.findAllByNotDeletedInWorkspace(workspaceId);
allByNotDeletedInWorkspace = allByNotDeletedInWorkspace.stream().filter(b -> blueprintListFilters.isDistroXDisplayed(b)).collect(Collectors.toSet());
if (withSdx) {
return allByNotDeletedInWorkspace;
}
return allByNotDeletedInWorkspace.stream().filter(it -> !blueprintListFilters.isDatalakeBlueprint(it)).collect(Collectors.toSet());
}
use of com.sequenceiq.cloudbreak.domain.view.BlueprintView in project cloudbreak by hortonworks.
the class BlueprintListFiltersTest method createBlueprintView.
private BlueprintView createBlueprintView(ResourceStatus status, String version, Boolean sdxReady) {
BlueprintView blueprint = new BlueprintView();
blueprint.setStatus(status);
blueprint.setStackVersion(version);
if (sdxReady != null) {
blueprint.setTags(Json.silent(Map.of("shared_services_ready", sdxReady)));
}
return blueprint;
}
use of com.sequenceiq.cloudbreak.domain.view.BlueprintView in project cloudbreak by hortonworks.
the class BlueprintServiceTest method getBlueprintView.
private BlueprintView getBlueprintView(String name, ResourceStatus status, Boolean sdxReady) {
BlueprintView blueprint = new BlueprintView();
blueprint.setName(name);
blueprint.setWorkspace(getWorkspace());
blueprint.setStatus(status);
blueprint.setResourceCrn("someCrn");
if (sdxReady != null) {
blueprint.setTags(Json.silent(Map.of("shared_services_ready", sdxReady)));
}
return blueprint;
}
use of com.sequenceiq.cloudbreak.domain.view.BlueprintView in project cloudbreak by hortonworks.
the class BlueprintServiceTest method getBlueprintView.
private BlueprintView getBlueprintView(String name, Json attribute) {
BlueprintView blueprint = new BlueprintView();
blueprint.setName(name);
blueprint.setWorkspace(getWorkspace());
blueprint.setStatus(DEFAULT);
blueprint.setResourceCrn("someCrn");
blueprint.setTags(attribute);
return blueprint;
}
use of com.sequenceiq.cloudbreak.domain.view.BlueprintView in project cloudbreak by hortonworks.
the class StackListItemToStackApiViewConverter method getBlueprintView.
private BlueprintView getBlueprintView(StackListItem item) {
BlueprintView blueprintResponse = new BlueprintView();
blueprintResponse.setId(item.getBlueprintId());
blueprintResponse.setResourceCrn(item.getBlueprintCrn());
blueprintResponse.setCreated(item.getBlueprintCreated());
blueprintResponse.setName(item.getBlueprintName());
blueprintResponse.setStackType(item.getStackType());
blueprintResponse.setStackVersion(item.getStackVersion());
blueprintResponse.setHostGroupCount(item.getHostGroupCount());
blueprintResponse.setStatus(item.getBlueprintStatus());
blueprintResponse.setTags(item.getBlueprintTags());
blueprintResponse.setBlueprintUpgradeOption(item.getBlueprintUpgradeOption());
return blueprintResponse;
}
Aggregations