Search in sources :

Example 1 with ServiceWithComponents

use of com.hortonworks.streamline.streams.cluster.model.ServiceWithComponents in project streamline by hortonworks.

the class ServiceCatalogResource method buildManualServiceRegisterResult.

private ServiceWithComponents buildManualServiceRegisterResult(Service service) {
    Collection<ServiceConfiguration> configurations = environmentService.listServiceConfigurations(service.getId());
    Collection<Component> components = environmentService.listComponents(service.getId());
    ServiceWithComponents s = new ServiceWithComponents(service);
    s.setComponents(components);
    s.setConfigurations(configurations);
    return s;
}
Also used : ServiceConfiguration(com.hortonworks.streamline.streams.cluster.catalog.ServiceConfiguration) Component(com.hortonworks.streamline.streams.cluster.catalog.Component) ServiceWithComponents(com.hortonworks.streamline.streams.cluster.model.ServiceWithComponents)

Example 2 with ServiceWithComponents

use of com.hortonworks.streamline.streams.cluster.model.ServiceWithComponents in project streamline by hortonworks.

the class ClusterResourceUtil method enrichCluster.

public static ClusterServicesImportResult enrichCluster(Cluster cluster, EnvironmentService environmentService) {
    ClusterServicesImportResult result = new ClusterServicesImportResult(cluster);
    for (Service service : environmentService.listServices(cluster.getId())) {
        Collection<ServiceConfiguration> configurations = environmentService.listServiceConfigurations(service.getId());
        Collection<Component> components = environmentService.listComponents(service.getId());
        ServiceWithComponents s = new ServiceWithComponents(service);
        s.setComponents(components);
        s.setConfigurations(configurations);
        result.addService(s);
    }
    return result;
}
Also used : ServiceConfiguration(com.hortonworks.streamline.streams.cluster.catalog.ServiceConfiguration) EnvironmentService(com.hortonworks.streamline.streams.cluster.service.EnvironmentService) Service(com.hortonworks.streamline.streams.cluster.catalog.Service) Component(com.hortonworks.streamline.streams.cluster.catalog.Component) ServiceWithComponents(com.hortonworks.streamline.streams.cluster.model.ServiceWithComponents)

Aggregations

Component (com.hortonworks.streamline.streams.cluster.catalog.Component)2 ServiceConfiguration (com.hortonworks.streamline.streams.cluster.catalog.ServiceConfiguration)2 ServiceWithComponents (com.hortonworks.streamline.streams.cluster.model.ServiceWithComponents)2 Service (com.hortonworks.streamline.streams.cluster.catalog.Service)1 EnvironmentService (com.hortonworks.streamline.streams.cluster.service.EnvironmentService)1