Search in sources :

Example 11 with QueryResponse

use of org.opennms.netmgt.measurements.model.QueryResponse in project opennms by OpenNMS.

the class GraphMLVertexStatusProviderIT method before.

@Before
public void before() {
    BeanUtils.assertAutowiring(this);
    this.databasePopulator.populateDatabase();
    this.serviceAccessor = new GraphMLServiceAccessor();
    this.serviceAccessor.setTransactionOperations(this.transactionOperations);
    this.serviceAccessor.setNodeDao(this.nodeDao);
    this.serviceAccessor.setSnmpInterfaceDao(this.snmpInterfaceDao);
    this.serviceAccessor.setMeasurementsService(request -> new QueryResponse());
    this.alarmSummaryWrapper = nodeIds -> Lists.newArrayList(createSummary(1, "North", OnmsSeverity.WARNING, 1), createSummary(2, "West", OnmsSeverity.MINOR, 2), createSummary(3, "South", OnmsSeverity.MAJOR, 3), createSummary(4, "West 2", OnmsSeverity.MAJOR, 4), createSummary(5, "East 1", OnmsSeverity.CRITICAL, 5), createSummary(6, "East 2", OnmsSeverity.WARNING, 6));
}
Also used : QueryResponse(org.opennms.netmgt.measurements.model.QueryResponse) GraphMLServiceAccessor(org.opennms.features.topology.plugins.topo.graphml.internal.GraphMLServiceAccessor) Before(org.junit.Before)

Aggregations

QueryResponse (org.opennms.netmgt.measurements.model.QueryResponse)11 Test (org.junit.Test)7 QueryRequest (org.opennms.netmgt.measurements.model.QueryRequest)7 Source (org.opennms.netmgt.measurements.model.Source)7 ResourceNotFoundException (org.opennms.netmgt.measurements.api.exceptions.ResourceNotFoundException)3 GraphMLServiceAccessor (org.opennms.features.topology.plugins.topo.graphml.internal.GraphMLServiceAccessor)2 FetchException (org.opennms.netmgt.measurements.api.exceptions.FetchException)2 ValidationException (org.opennms.netmgt.measurements.api.exceptions.ValidationException)2 ScriptEngineManager (javax.script.ScriptEngineManager)1 Consumes (javax.ws.rs.Consumes)1 POST (javax.ws.rs.POST)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 JRException (net.sf.jasperreports.engine.JRException)1 Before (org.junit.Before)1 GraphMLGraph (org.opennms.features.graphml.model.GraphMLGraph)1 EdgeRef (org.opennms.features.topology.api.topo.EdgeRef)1 VertexRef (org.opennms.features.topology.api.topo.VertexRef)1 GraphMLEdgeStatus (org.opennms.features.topology.plugins.topo.graphml.status.GraphMLEdgeStatus)1