use of org.opennms.features.topology.plugins.ncs.support.NCSPathRouteUtil in project opennms by OpenNMS.
the class NCSPathProviderTest method setUp.
@Before
public void setUp() throws Exception {
NCSPathRouteUtil pathUtil = new NCSPathRouteUtil(new MockNCSComponentRepository(), new MockNodeDao());
SimpleRegistry registry = new SimpleRegistry();
registry.put("pathProviderUtil", pathUtil);
CamelContext camel = new DefaultCamelContext(registry);
camel.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:start").setHeader(Exchange.HTTP_URI, simple("http://localhost:10346/ncs-provider/api/space/nsas/service-management/services/884779")).to("http://dummyhost").beanRef("pathProviderUtil", "getServiceName").setHeader(Exchange.HTTP_URI, simple("http://localhost:10346/ncs-provider/api/space/nsas/eline-ptp/service-management/services/884779/servicepath?deviceA=${header.deviceA}&deviceZ=${header.deviceZ}")).to("http://dummyhost").beanRef("pathProviderUtil", "createPath");
}
});
camel.start();
m_ncsPathService = new NCSPathProviderService(camel);
}
Aggregations