use of com.sequenceiq.cloudbreak.cmtemplate.configproviders.core.CoreRoles.CORE_SETTINGS in project cloudbreak by hortonworks.
the class CoreConfigProvider method getAdditionalServices.
@Override
public Map<String, ApiClusterTemplateService> getAdditionalServices(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) {
if (isConfigurationNeeded(cmTemplateProcessor, source) && cmTemplateProcessor.getServiceByType(CORE_SETTINGS).isEmpty()) {
ApiClusterTemplateService coreSettings = createBaseCoreSettingsService();
Set<HostgroupView> hostgroupViews = source.getHostgroupViews();
return hostgroupViews.stream().filter(hg -> InstanceGroupType.GATEWAY.equals(hg.getInstanceGroupType())).collect(Collectors.toMap(HostgroupView::getName, v -> coreSettings));
}
return Map.of();
}
Aggregations