Search in sources :

Example 1 with EntityOwnershipService

use of org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService 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));
}
Also used : InterfaceManagerService(org.opendaylight.genius.interfacemanager.interfaces.InterfaceManagerService) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) TestIMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.testutils.TestIMdsalApiManager) IMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager) AbstractTestableListener(org.opendaylight.genius.datastoreutils.testutils.AbstractTestableListener) AlivenessMonitorService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.alivenessmonitor.rev160411.AlivenessMonitorService) LockManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.LockManagerService) TestIMdsalApiManager(org.opendaylight.genius.mdsalutil.interfaces.testutils.TestIMdsalApiManager) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) HwvtepNodeHACache(org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache) OdlInterfaceRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService) DataBrokerTestModule(org.opendaylight.controller.md.sal.binding.test.DataBrokerTestModule) IfmConfig(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.config.rev160406.IfmConfig) JobCoordinatorCountedEventsWaiter(org.opendaylight.genius.datastoreutils.testutils.JobCoordinatorCountedEventsWaiter) TestableJobCoordinatorCountedEventsWaiter(org.opendaylight.genius.datastoreutils.testutils.TestableJobCoordinatorCountedEventsWaiter) EntityOwnershipService(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService) SimpleDOMEntityOwnershipService(org.opendaylight.mdsal.eos.dom.simple.SimpleDOMEntityOwnershipService) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) SimpleDOMEntityOwnershipService(org.opendaylight.mdsal.eos.dom.simple.SimpleDOMEntityOwnershipService) ServiceRecoveryRegistry(org.opendaylight.genius.srm.ServiceRecoveryRegistry) BindingDOMEntityOwnershipServiceAdapter(org.opendaylight.mdsal.eos.binding.dom.adapter.BindingDOMEntityOwnershipServiceAdapter) DataImportBootReady(org.opendaylight.daexim.DataImportBootReady) OsgiService(org.ops4j.pax.cdi.api.OsgiService)

Aggregations

DataBroker (org.opendaylight.controller.md.sal.binding.api.DataBroker)1 DataBrokerTestModule (org.opendaylight.controller.md.sal.binding.test.DataBrokerTestModule)1 DataImportBootReady (org.opendaylight.daexim.DataImportBootReady)1 AbstractTestableListener (org.opendaylight.genius.datastoreutils.testutils.AbstractTestableListener)1 JobCoordinatorCountedEventsWaiter (org.opendaylight.genius.datastoreutils.testutils.JobCoordinatorCountedEventsWaiter)1 TestableJobCoordinatorCountedEventsWaiter (org.opendaylight.genius.datastoreutils.testutils.TestableJobCoordinatorCountedEventsWaiter)1 IInterfaceManager (org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager)1 InterfaceManagerService (org.opendaylight.genius.interfacemanager.interfaces.InterfaceManagerService)1 IMdsalApiManager (org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager)1 TestIMdsalApiManager (org.opendaylight.genius.mdsalutil.interfaces.testutils.TestIMdsalApiManager)1 ServiceRecoveryRegistry (org.opendaylight.genius.srm.ServiceRecoveryRegistry)1 HwvtepNodeHACache (org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache)1 EntityOwnershipService (org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService)1 BindingDOMEntityOwnershipServiceAdapter (org.opendaylight.mdsal.eos.binding.dom.adapter.BindingDOMEntityOwnershipServiceAdapter)1 SimpleDOMEntityOwnershipService (org.opendaylight.mdsal.eos.dom.simple.SimpleDOMEntityOwnershipService)1 AlivenessMonitorService (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.alivenessmonitor.rev160411.AlivenessMonitorService)1 IdManagerService (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService)1 IfmConfig (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.config.rev160406.IfmConfig)1 OdlInterfaceRpcService (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService)1 LockManagerService (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.LockManagerService)1