Search in sources :

Example 1 with ServiceDependencies

use of com.sequenceiq.cloudbreak.cmtemplate.generator.configuration.domain.dependencies.ServiceDependencies in project cloudbreak by hortonworks.

the class CmTemplateGeneratorConfigurationResolver method readServiceDefinitions.

private Set<ServiceConfig> readServiceDefinitions() {
    Set<ServiceConfig> serviceConfigs = new HashSet<>();
    String content = readFileFromClasspathQuietly(serviceDefinitionConfigurationPath);
    try {
        ServiceDependencies serviceDependencies = MAPPER.readValue(content, ServiceDependencies.class);
        serviceConfigs = serviceDependencies.getServices();
    } catch (IOException ex) {
        String message = String.format("Could not read service definitions from: %s", serviceDefinitionConfigurationPath);
        LOGGER.error(message, ex);
    }
    return serviceConfigs;
}
Also used : ServiceConfig(com.sequenceiq.cloudbreak.cmtemplate.generator.configuration.domain.dependencies.ServiceConfig) ServiceDependencies(com.sequenceiq.cloudbreak.cmtemplate.generator.configuration.domain.dependencies.ServiceDependencies) IOException(java.io.IOException) HashSet(java.util.HashSet)

Aggregations

ServiceConfig (com.sequenceiq.cloudbreak.cmtemplate.generator.configuration.domain.dependencies.ServiceConfig)1 ServiceDependencies (com.sequenceiq.cloudbreak.cmtemplate.generator.configuration.domain.dependencies.ServiceDependencies)1 IOException (java.io.IOException)1 HashSet (java.util.HashSet)1