use of com.cloudera.api.swagger.model.ApiClusterTemplateHostTemplate in project cloudbreak by hortonworks.
the class GeneratedCmTemplateService method prepareApiClusterTemplateHostTemplates.
private List<ApiClusterTemplateHostTemplate> prepareApiClusterTemplateHostTemplates(Map<String, Set<String>> hostServiceMap) {
List<ApiClusterTemplateHostTemplate> hostTemplates = new ArrayList<>();
hostServiceMap.forEach((key, roleConfigRefNames) -> {
ApiClusterTemplateHostTemplate apiClusterTemplateHostTemplate = new ApiClusterTemplateHostTemplate();
apiClusterTemplateHostTemplate.setRefName(key);
apiClusterTemplateHostTemplate.setRoleConfigGroupsRefNames(new ArrayList<>());
apiClusterTemplateHostTemplate.getRoleConfigGroupsRefNames().addAll(roleConfigRefNames);
hostTemplates.add(apiClusterTemplateHostTemplate);
});
return hostTemplates;
}
Aggregations