Search in sources :

Example 1 with BusinessServiceManager

use of org.opennms.netmgt.bsm.service.BusinessServiceManager in project opennms by OpenNMS.

the class BusinessServiceVertexInfoPanelItemProvider method createComponent.

private Component createComponent(AbstractBusinessServiceVertex ref, GraphContainer graphContainer) {
    final FormLayout formLayout = new FormLayout();
    formLayout.setSpacing(false);
    formLayout.setMargin(false);
    ref.accept(new BusinessServiceVertexVisitor<Void>() {

        @Override
        public Void visit(BusinessServiceVertex vertex) {
            final BusinessService businessService = businessServiceManager.getBusinessServiceById(vertex.getServiceId());
            formLayout.addComponent(createLabel("Reduce function", getReduceFunctionDescription(businessService.getReduceFunction())));
            // Apply Reduce Function specific details
            businessService.getReduceFunction().accept(new ReduceFunctionVisitor<Void>() {

                @Override
                public Void visit(HighestSeverity highestSeverity) {
                    return null;
                }

                @Override
                public Void visit(HighestSeverityAbove highestSeverityAbove) {
                    return null;
                }

                @Override
                public // Threshold is not very transparent, we add an Explain Button in these cases
                Void visit(Threshold threshold) {
                    final Button explainButton = createButton("Explain", "Explain the Threshold function", FontAwesome.TABLE, (Button.ClickListener) event -> {
                        ThresholdExplanationWindow explainWindow = new ThresholdExplanationWindow(SimulationAwareStateMachineFactory.createSimulatedStateMachine(businessServiceManager, graphContainer.getCriteria()).explain(businessService, (Threshold) businessService.getReduceFunction()));
                        UI.getCurrent().addWindow(explainWindow);
                    });
                    explainButton.setStyleName(BaseTheme.BUTTON_LINK);
                    formLayout.addComponent(explainButton);
                    return null;
                }

                @Override
                public Void visit(ExponentialPropagation exponentialPropagation) {
                    return null;
                }
            });
            return null;
        }

        @Override
        public Void visit(IpServiceVertex vertex) {
            IpService ipService = businessServiceManager.getIpServiceById(vertex.getIpServiceId());
            formLayout.addComponent(createLabel("Interface", ipService.getIpAddress()));
            formLayout.addComponent(createLabel("Service", ipService.getServiceName()));
            if (!ipService.getServiceName().equals(vertex.getLabel())) {
                formLayout.addComponent(createLabel("Friendly Name", vertex.getLabel()));
            }
            return null;
        }

        @Override
        public Void visit(ReductionKeyVertex vertex) {
            formLayout.addComponent(createLabel("Reduction Key", vertex.getReductionKey()));
            if (!vertex.getReductionKey().equals(vertex.getLabel())) {
                formLayout.addComponent(createLabel("Friendly Name", vertex.getLabel()));
            }
            return null;
        }
    });
    return formLayout;
}
Also used : FormLayout(com.vaadin.ui.FormLayout) GraphContainer(org.opennms.features.topology.api.GraphContainer) AbstractBusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.AbstractBusinessServiceVertex) IpService(org.opennms.netmgt.bsm.service.model.IpService) BaseTheme(com.vaadin.ui.themes.BaseTheme) VerticalLayout(com.vaadin.ui.VerticalLayout) Threshold(org.opennms.netmgt.bsm.service.model.functions.reduce.Threshold) UI(com.vaadin.ui.UI) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) HighestSeverityAbove(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverityAbove) Window(com.vaadin.ui.Window) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) BusinessServiceVertexVisitor(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertexVisitor) Strings(com.google.common.base.Strings) FontAwesome(com.vaadin.server.FontAwesome) GraphVertexToTopologyVertexConverter(org.opennms.features.topology.plugins.topo.bsm.GraphVertexToTopologyVertexConverter) VertexInfoPanelItemProvider(org.opennms.features.topology.api.info.VertexInfoPanelItemProvider) DefaultInfoPanelItem(org.opennms.features.topology.api.info.item.DefaultInfoPanelItem) ReductionFunction(org.opennms.netmgt.bsm.service.model.functions.reduce.ReductionFunction) Status(org.opennms.netmgt.bsm.service.model.Status) Label(com.vaadin.ui.Label) ShortcutAction(com.vaadin.event.ShortcutAction) Comparator.comparing(java.util.Comparator.comparing) UIHelper.createLabel(org.opennms.netmgt.vaadin.core.UIHelper.createLabel) BusinessServicesTopologyProvider(org.opennms.features.topology.plugins.topo.bsm.BusinessServicesTopologyProvider) ThresholdResultExplanation(org.opennms.netmgt.bsm.service.model.functions.reduce.ThresholdResultExplanation) InfoPanelItem(org.opennms.features.topology.api.info.item.InfoPanelItem) ExponentialPropagation(org.opennms.netmgt.bsm.service.model.functions.reduce.ExponentialPropagation) IpServiceVertex(org.opennms.features.topology.plugins.topo.bsm.IpServiceVertex) Collectors(java.util.stream.Collectors) Sizeable(com.vaadin.server.Sizeable) SimulationAwareStateMachineFactory(org.opennms.features.topology.plugins.topo.bsm.simulate.SimulationAwareStateMachineFactory) TransactionAwareBeanProxyFactory(org.opennms.netmgt.vaadin.core.TransactionAwareBeanProxyFactory) BusinessServiceVertexStatusInfoPanelItemProvider.createStatusLabel(org.opennms.features.topology.plugins.topo.bsm.info.BusinessServiceVertexStatusInfoPanelItemProvider.createStatusLabel) List(java.util.List) Button(com.vaadin.ui.Button) Table(com.vaadin.ui.Table) Edge(org.opennms.netmgt.bsm.service.model.edge.Edge) FormLayout(com.vaadin.ui.FormLayout) BusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertex) ReductionKeyVertex(org.opennms.features.topology.plugins.topo.bsm.ReductionKeyVertex) GraphEdge(org.opennms.netmgt.bsm.service.model.graph.GraphEdge) ReduceFunctionVisitor(org.opennms.netmgt.bsm.service.model.functions.reduce.ReduceFunctionVisitor) VertexRef(org.opennms.features.topology.api.topo.VertexRef) HighestSeverity(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverity) UIHelper.createButton(org.opennms.netmgt.vaadin.core.UIHelper.createButton) Component(com.vaadin.ui.Component) HighestSeverity(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverity) ReductionKeyVertex(org.opennms.features.topology.plugins.topo.bsm.ReductionKeyVertex) HighestSeverityAbove(org.opennms.netmgt.bsm.service.model.functions.reduce.HighestSeverityAbove) IpService(org.opennms.netmgt.bsm.service.model.IpService) IpServiceVertex(org.opennms.features.topology.plugins.topo.bsm.IpServiceVertex) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) ReduceFunctionVisitor(org.opennms.netmgt.bsm.service.model.functions.reduce.ReduceFunctionVisitor) Button(com.vaadin.ui.Button) UIHelper.createButton(org.opennms.netmgt.vaadin.core.UIHelper.createButton) ExponentialPropagation(org.opennms.netmgt.bsm.service.model.functions.reduce.ExponentialPropagation) AbstractBusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.AbstractBusinessServiceVertex) BusinessServiceVertex(org.opennms.features.topology.plugins.topo.bsm.BusinessServiceVertex) Threshold(org.opennms.netmgt.bsm.service.model.functions.reduce.Threshold)

Example 2 with BusinessServiceManager

use of org.opennms.netmgt.bsm.service.BusinessServiceManager in project opennms by OpenNMS.

the class SimulationAwareStateMachineFactory method createSimulatedStateMachine.

public static BusinessServiceStateMachine createSimulatedStateMachine(BusinessServiceManager manager, Criteria[] criteria) {
    // Gather the statuses and group them by reduction key
    final Map<String, Status> statusByReductionKey = Arrays.stream(criteria).filter(c -> c instanceof SetStatusToCriteria).map(c -> (SetStatusToCriteria) c).filter(c -> c.getStatus() != null).collect(Collectors.toMap(SetStatusToCriteria::getReductionKey, SetStatusToCriteria::getStatus));
    // Determine whether or not we should inherit the existing state
    final boolean shouldInheritState = Arrays.stream(criteria).anyMatch(c -> c instanceof InheritStateCriteria);
    // Grab a copy of the state machine, and update push alarms
    // that reflect the simulated state of the reduction keys
    final BusinessServiceStateMachine stateMachine = manager.getStateMachine().clone(shouldInheritState);
    for (Entry<String, Status> entry : statusByReductionKey.entrySet()) {
        stateMachine.handleNewOrUpdatedAlarm(new AlarmWrapper() {

            @Override
            public String getReductionKey() {
                return entry.getKey();
            }

            @Override
            public Status getStatus() {
                return entry.getValue();
            }
        });
    }
    return stateMachine;
}
Also used : Status(org.opennms.netmgt.bsm.service.model.Status) Arrays(java.util.Arrays) Status(org.opennms.netmgt.bsm.service.model.Status) Map(java.util.Map) Criteria(org.opennms.features.topology.api.topo.Criteria) Entry(java.util.Map.Entry) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) AlarmWrapper(org.opennms.netmgt.bsm.service.model.AlarmWrapper) Collectors(java.util.stream.Collectors) BusinessServiceStateMachine(org.opennms.netmgt.bsm.service.BusinessServiceStateMachine) BusinessServiceStateMachine(org.opennms.netmgt.bsm.service.BusinessServiceStateMachine) AlarmWrapper(org.opennms.netmgt.bsm.service.model.AlarmWrapper)

Example 3 with BusinessServiceManager

use of org.opennms.netmgt.bsm.service.BusinessServiceManager in project opennms by OpenNMS.

the class BusinessServiceVertexProviderTest method testVertexRefId.

@Test
public void testVertexRefId() {
    // Mock the manager to return a node label
    BusinessServiceManager managerMock = EasyMock.createNiceMock(BusinessServiceManager.class);
    EasyMock.expect(managerMock.getNodeById(EasyMock.anyInt())).andReturn(new Node() {

        @Override
        public String getLabel() {
            return "localhost";
        }

        @Override
        public Integer getId() {
            return 1;
        }
    }).anyTimes();
    EasyMock.replay(managerMock);
    // create 3 business service vertices, where the first 2 should be equal
    BusinessServiceEntityBuilder builder = new BusinessServiceEntityBuilder().id(10L).name("Name");
    BusinessService bs1 = new BusinessServiceImpl(managerMock, builder.toEntity());
    BusinessService bs2 = new BusinessServiceImpl(managerMock, builder.toEntity());
    // is different
    BusinessService bs3 = new BusinessServiceImpl(managerMock, builder.id(11L).toEntity());
    BusinessServiceVertex bsVertex1 = new BusinessServiceVertex(bs1, 0);
    BusinessServiceVertex bsVertex2 = new BusinessServiceVertex(bs2, 0);
    BusinessServiceVertex bsVertex3 = new BusinessServiceVertex(bs3, 0);
    // create 2 ip Service vertices where all of them should be equal
    IpService ipService1 = new IpServiceImpl(managerMock, BsmTestUtils.createMonitoredService(1, 1, "127.0.0.1", "SSH"));
    IpService ipService2 = new IpServiceImpl(managerMock, BsmTestUtils.createMonitoredService(1, 1, "127.0.0.1", "SSH"));
    IpServiceVertex ipServiceVertex1 = new IpServiceVertex(ipService1, 0);
    IpServiceVertex ipServiceVertex2 = new IpServiceVertex(ipService2, 0);
    // create 3 reduction key vertices where 2 of them should be equal
    ReductionKeyVertex rkVertex1 = new ReductionKeyVertex("key1", 0);
    ReductionKeyVertex rkVertex2 = new ReductionKeyVertex("key1", 0);
    ReductionKeyVertex rkVertex3 = new ReductionKeyVertex("key2", 0);
    // Add all the above vertices. Some of them even twice to ensure that the getRefId() methods work correctly
    BusinessServiceVertexProvider vertexProvider = new BusinessServiceVertexProvider(BusinessServicesTopologyProvider.TOPOLOGY_NAMESPACE);
    // adding twice on purpose
    vertexProvider.add(bsVertex1, bsVertex1, bsVertex2, bsVertex2, bsVertex3, bsVertex3);
    // adding twice on purpose
    vertexProvider.add(ipServiceVertex1, ipServiceVertex1, ipServiceVertex2, ipServiceVertex2);
    // adding twice on purpose
    vertexProvider.add(rkVertex1, rkVertex1);
    // adding twice on purpose
    vertexProvider.add(rkVertex2, rkVertex2);
    // adding twice on purpose
    vertexProvider.add(rkVertex3, rkVertex3);
    // In total there should be 5 vertices
    Assert.assertEquals(5, vertexProvider.getVertices().size());
    Assert.assertSame(ipServiceVertex2, vertexProvider.getVertex(ipServiceVertex1));
    Assert.assertSame(ipServiceVertex2, vertexProvider.getVertex(ipServiceVertex2));
    Assert.assertSame(bsVertex2, vertexProvider.getVertex(bsVertex1));
    Assert.assertSame(bsVertex2, vertexProvider.getVertex(bsVertex2));
    Assert.assertSame(bsVertex3, vertexProvider.getVertex(bsVertex3));
    Assert.assertNotSame(bsVertex1, vertexProvider.getVertex(bsVertex3));
    Assert.assertNotSame(bsVertex2, vertexProvider.getVertex(bsVertex3));
    Assert.assertSame(rkVertex2, vertexProvider.getVertex(rkVertex1));
    Assert.assertSame(rkVertex2, vertexProvider.getVertex(rkVertex2));
    Assert.assertNotSame(rkVertex1, vertexProvider.getVertex(rkVertex3));
    Assert.assertSame(rkVertex3, vertexProvider.getVertex(rkVertex3));
    EasyMock.verify(managerMock);
}
Also used : BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) BusinessServiceImpl(org.opennms.netmgt.bsm.service.internal.BusinessServiceImpl) Node(org.opennms.netmgt.bsm.service.model.Node) IpServiceImpl(org.opennms.netmgt.bsm.service.internal.IpServiceImpl) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) IpService(org.opennms.netmgt.bsm.service.model.IpService) BusinessServiceEntityBuilder(org.opennms.netmgt.bsm.test.BusinessServiceEntityBuilder) Test(org.junit.Test)

Example 4 with BusinessServiceManager

use of org.opennms.netmgt.bsm.service.BusinessServiceManager in project opennms by OpenNMS.

the class BusinessServiceStatusService method getStatus.

public List<StatusEntity<BusinessService>> getStatus(Query query) {
    final BusinessServiceSearchCriteriaBuilder criteria = buildFrom(query);
    final List<BusinessService> services = criteria.apply(businessServiceManager, businessServiceManager.getAllBusinessServices());
    final List<StatusEntity<BusinessService>> mappedServices = services.stream().map(eachService -> new StatusEntityWrapper<>(eachService, OnmsSeverity.get(eachService.getOperationalStatus().getLabel()))).collect(Collectors.toList());
    return mappedServices;
}
Also used : QueryParameters(org.opennms.web.utils.QueryParameters) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) Autowired(org.springframework.beans.factory.annotation.Autowired) Query(org.opennms.features.status.api.Query) StatusEntityWrapper(org.opennms.features.status.api.StatusEntityWrapper) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) Collectors(java.util.stream.Collectors) StatusEntity(org.opennms.features.status.api.StatusEntity) BusinessServiceSearchCriteriaBuilder(org.opennms.netmgt.bsm.service.BusinessServiceSearchCriteriaBuilder) List(java.util.List) StatusSummary(org.opennms.features.status.api.StatusSummary) Status(org.opennms.netmgt.bsm.service.model.Status) Service(org.springframework.stereotype.Service) OnmsSeverity(org.opennms.netmgt.model.OnmsSeverity) StatusEntityWrapper(org.opennms.features.status.api.StatusEntityWrapper) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) BusinessServiceSearchCriteriaBuilder(org.opennms.netmgt.bsm.service.BusinessServiceSearchCriteriaBuilder) StatusEntity(org.opennms.features.status.api.StatusEntity)

Example 5 with BusinessServiceManager

use of org.opennms.netmgt.bsm.service.BusinessServiceManager in project opennms by OpenNMS.

the class DefaultBusinessServiceStateMachineIT method ensureReductionKeyLookupIsFastEnough.

/**
 * Builds 200 business services.
 * Each business Services has one parent and two children.
 * Each children has 12 reduction key edges.
 * In sum there are:
 *  - 600 business services
 *  - 4800 reduction key edges
 *  - 400 child edges
 *  - 5200 edges
 *
 *  See NMS-8978 for more details.
 */
@Test
public void ensureReductionKeyLookupIsFastEnough() {
    for (int i = 0; i < 200; i++) {
        BusinessServiceEntity parentEntity = new BusinessServiceEntityBuilder().name("Parent " + i).reduceFunction(new HighestSeverityEntity()).toEntity();
        for (int c = 0; c < 2; c++) {
            BusinessServiceEntityBuilder childBuilder = new BusinessServiceEntityBuilder().name("Child " + i + " " + c).reduceFunction(new HighestSeverityEntity());
            for (int a = 0; a < 12; a++) {
                childBuilder.addReductionKey("custom." + i + "." + c + "." + a, new IdentityEntity());
            }
            BusinessServiceEntity childEntity = childBuilder.toEntity();
            parentEntity.addChildServiceEdge(childEntity, new IdentityEntity());
            businessServiceDao.save(childEntity);
        }
        businessServiceDao.save(parentEntity);
    }
    final Set<String> uniqueReductionKeys = businessServiceDao.findMatching(new CriteriaBuilder(BusinessServiceEntity.class).like("name", "Child%").toCriteria()).stream().flatMap(service -> service.getReductionKeyEdges().stream()).flatMap(edge -> edge.getReductionKeys().stream()).collect(Collectors.toSet());
    for (String eachKey : uniqueReductionKeys) {
        final OnmsAlarm alarm = new OnmsAlarm();
        alarm.setUei("custom");
        alarm.setAlarmType(OnmsAlarm.PROBLEM_TYPE);
        alarm.setDescription("dummy");
        alarm.setLogMsg("dummy");
        alarm.setSeverity(OnmsSeverity.WARNING);
        alarm.setReductionKey(eachKey);
        alarm.setDistPoller(distPollerDao.whoami());
        alarm.setCounter(1);
        populator.getAlarmDao().save(alarm);
    }
    populator.getAlarmDao().flush();
    businessServiceDao.flush();
    // Simulate lookup of reduction keys
    final long start = System.currentTimeMillis();
    final DefaultBusinessServiceStateMachine stateMachine = new DefaultBusinessServiceStateMachine();
    stateMachine.setAlarmProvider(alarmProvider);
    stateMachine.setBusinessServices(businessServiceDao.findAll().stream().map(e -> new BusinessServiceImpl(businessServiceManager, e)).collect(Collectors.toList()));
    long diff = System.currentTimeMillis() - start;
    LoggerFactory.getLogger(getClass()).info("Took {} ms to initialize state machine", diff);
    Assert.assertTrue("Reduction Key lookup took much longer than expected. Expected was 1000 ms, but took " + diff + " ms", 1000 >= diff);
}
Also used : CriteriaBuilder(org.opennms.core.criteria.CriteriaBuilder) BusinessServicesShareIpServiceHierarchy(org.opennms.netmgt.bsm.test.hierarchies.BusinessServicesShareIpServiceHierarchy) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) AlarmWrapper(org.opennms.netmgt.bsm.service.model.AlarmWrapper) BusinessService(org.opennms.netmgt.bsm.service.model.BusinessService) LoggingStateChangeHandler(org.opennms.netmgt.bsm.test.LoggingStateChangeHandler) IpServiceEdgeImpl(org.opennms.netmgt.bsm.service.internal.edge.IpServiceEdgeImpl) HighestSeverityEntity(org.opennms.netmgt.bsm.persistence.api.functions.reduce.HighestSeverityEntity) After(org.junit.After) IdentityEntity(org.opennms.netmgt.bsm.persistence.api.functions.map.IdentityEntity) Set(java.util.Set) Collectors(java.util.stream.Collectors) BeanUtils(org.opennms.core.spring.BeanUtils) BusinessServiceEntity(org.opennms.netmgt.bsm.persistence.api.BusinessServiceEntity) List(java.util.List) OpenNMSJUnit4ClassRunner(org.opennms.core.test.OpenNMSJUnit4ClassRunner) HTTP_8085_BAMBOO_REDUCTION_KEY(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy.HTTP_8085_BAMBOO_REDUCTION_KEY) Edge(org.opennms.netmgt.bsm.service.model.edge.Edge) JUnitTemporaryDatabase(org.opennms.core.test.db.annotations.JUnitTemporaryDatabase) IPServiceEdgeEntity(org.opennms.netmgt.bsm.persistence.api.IPServiceEdgeEntity) Identity(org.opennms.netmgt.bsm.service.model.functions.map.Identity) BambooTestHierarchy(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy) CriteriaBuilder(org.opennms.core.criteria.CriteriaBuilder) IpServiceEdge(org.opennms.netmgt.bsm.service.model.edge.IpServiceEdge) RunWith(org.junit.runner.RunWith) BusinessServiceDao(org.opennms.netmgt.bsm.persistence.api.BusinessServiceDao) BusinessServiceManager(org.opennms.netmgt.bsm.service.BusinessServiceManager) DISK_USAGE_THRESHOLD_BAMBO_REDUCTION_KEY(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy.DISK_USAGE_THRESHOLD_BAMBO_REDUCTION_KEY) EventConstants(org.opennms.netmgt.events.api.EventConstants) OnmsAlarm(org.opennms.netmgt.model.OnmsAlarm) BsmDatabasePopulator(org.opennms.netmgt.bsm.test.BsmDatabasePopulator) Lists(com.google.common.collect.Lists) DistPollerDao(org.opennms.netmgt.dao.api.DistPollerDao) Status(org.opennms.netmgt.bsm.service.model.Status) Qualifier(org.springframework.beans.factory.annotation.Qualifier) AlarmProvider(org.opennms.netmgt.bsm.service.AlarmProvider) SimpleTestHierarchy(org.opennms.netmgt.bsm.test.hierarchies.SimpleTestHierarchy) BAMBOO_AGENT_CAROLINA_REDUCTION_KEY(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy.BAMBOO_AGENT_CAROLINA_REDUCTION_KEY) Before(org.junit.Before) BsmTestUtils.createAlarmWrapper(org.opennms.netmgt.bsm.test.BsmTestUtils.createAlarmWrapper) JUnitConfigurationEnvironment(org.opennms.test.JUnitConfigurationEnvironment) Test(org.junit.Test) BAMBOO_AGENT_DUKE_REDUCTION_KEY(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy.BAMBOO_AGENT_DUKE_REDUCTION_KEY) BusinessServiceEntityBuilder(org.opennms.netmgt.bsm.test.BusinessServiceEntityBuilder) ReductionKeyHelper(org.opennms.netmgt.dao.util.ReductionKeyHelper) ContextConfiguration(org.springframework.test.context.ContextConfiguration) BAMBOO_AGENT_NCSTATE_REDUCTION_KEY(org.opennms.netmgt.bsm.test.hierarchies.BambooTestHierarchy.BAMBOO_AGENT_NCSTATE_REDUCTION_KEY) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) OnmsSeverity(org.opennms.netmgt.model.OnmsSeverity) Transactional(org.springframework.transaction.annotation.Transactional) OnmsAlarm(org.opennms.netmgt.model.OnmsAlarm) HighestSeverityEntity(org.opennms.netmgt.bsm.persistence.api.functions.reduce.HighestSeverityEntity) BusinessServiceEntity(org.opennms.netmgt.bsm.persistence.api.BusinessServiceEntity) BusinessServiceEntityBuilder(org.opennms.netmgt.bsm.test.BusinessServiceEntityBuilder) IdentityEntity(org.opennms.netmgt.bsm.persistence.api.functions.map.IdentityEntity) Test(org.junit.Test)

Aggregations

BusinessServiceManager (org.opennms.netmgt.bsm.service.BusinessServiceManager)5 Collectors (java.util.stream.Collectors)4 BusinessService (org.opennms.netmgt.bsm.service.model.BusinessService)4 Status (org.opennms.netmgt.bsm.service.model.Status)4 List (java.util.List)3 Test (org.junit.Test)2 AlarmWrapper (org.opennms.netmgt.bsm.service.model.AlarmWrapper)2 IpService (org.opennms.netmgt.bsm.service.model.IpService)2 BusinessServiceEntityBuilder (org.opennms.netmgt.bsm.test.BusinessServiceEntityBuilder)2 OnmsSeverity (org.opennms.netmgt.model.OnmsSeverity)2 Autowired (org.springframework.beans.factory.annotation.Autowired)2 Strings (com.google.common.base.Strings)1 Lists (com.google.common.collect.Lists)1 ShortcutAction (com.vaadin.event.ShortcutAction)1 FontAwesome (com.vaadin.server.FontAwesome)1 Sizeable (com.vaadin.server.Sizeable)1 Button (com.vaadin.ui.Button)1 Component (com.vaadin.ui.Component)1 FormLayout (com.vaadin.ui.FormLayout)1 Label (com.vaadin.ui.Label)1