use of com.sequenceiq.cloudbreak.template.model.ServiceComponent in project cloudbreak by hortonworks.
the class ClusterDiagnosticsService method getClusterComponents.
public List<String> getClusterComponents(String stackCrn) {
List<String> components = new ArrayList<>();
Stack stack = stackService.getByCrn(stackCrn);
if (stack != null) {
Cluster cluster = stack.getCluster();
if (cluster != null && cluster.getBlueprint() != null) {
CmTemplateProcessor cmTemplateProcessor = cmTemplateProcessorFactory.get(cluster.getBlueprint().getBlueprintText());
components = cmTemplateProcessor.getAllComponents().stream().map(ServiceComponent::getComponent).collect(Collectors.toCollection(ArrayList::new));
}
}
return components;
}
Aggregations