use of org.opendaylight.mdsal.eos.binding.dom.adapter.BindingDOMEntityOwnershipServiceAdapter in project genius by opendaylight.
the class InterfaceManagerTestModule method configureBindings.
@Override
protected void configureBindings() throws UnknownHostException {
// Bindings for services from this project
// Bindings for external services to "real" implementations
// Bindings to test infra (fakes & mocks)
DataBrokerTestModule dataBrokerTestModule = new DataBrokerTestModule(false);
DataBroker dataBroker = dataBrokerTestModule.getDataBroker();
bind(DataBroker.class).toInstance(dataBroker);
bind(DataBroker.class).annotatedWith(OsgiService.class).toInstance(dataBroker);
bind(DataImportBootReady.class).annotatedWith(OsgiService.class).toInstance(new DataImportBootReady() {
});
bind(LockManagerService.class).to(LockManagerServiceImpl.class);
bind(LockListener.class);
bind(IdManagerService.class).to(IdManager.class);
bind(IInterfaceManager.class).to(InterfacemgrProvider.class);
TestIMdsalApiManager mdsalManager = TestIMdsalApiManager.newInstance();
bind(IMdsalApiManager.class).toInstance(mdsalManager);
bind(TestIMdsalApiManager.class).toInstance(mdsalManager);
bind(AbstractTestableListener.class).to(TestableDataTreeChangeListener.class);
bind(JobCoordinatorCountedEventsWaiter.class).to(TestableJobCoordinatorCountedEventsWaiter.class);
bind(InterfaceManagerService.class).to(InterfaceManagerServiceImpl.class);
bind(ServiceRecoveryRegistry.class).toInstance(mock(ServiceRecoveryRegistry.class));
EntityOwnershipService entityOwnershipService = new BindingDOMEntityOwnershipServiceAdapter(new SimpleDOMEntityOwnershipService(), dataBrokerTestModule.getBindingToNormalizedNodeCodec());
bind(EntityOwnershipService.class).toInstance(entityOwnershipService);
bind(EntityOwnershipUtils.class);
bind(AlivenessMonitorService.class).toInstance(mock(AlivenessMonitorService.class));
bind(OdlInterfaceRpcService.class).to(InterfaceManagerRpcService.class);
bind(CacheBridgeEntryConfigListener.class);
bind(CacheBridgeRefEntryListener.class);
bind(FlowBasedServicesConfigListener.class);
bind(FlowBasedServicesInterfaceStateListener.class);
bind(HwVTEPConfigListener.class);
bind(HwVTEPTunnelsStateListener.class);
bind(InterfaceConfigListener.class);
bind(InterfaceInventoryStateListener.class);
bind(InterfaceTopologyStateListener.class);
bind(TerminationPointStateListener.class);
bind(VlanMemberConfigListener.class);
bind(InterfaceStateListener.class);
bind(HwvtepNodeHACache.class).toInstance(mock(HwvtepNodeHACache.class));
bind(IfmConfig.class).toInstance(mock(IfmConfig.class));
}
Aggregations