Search in sources :

Example 6 with CacheManagersRegistryImpl

use of org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl in project genius by opendaylight.

the class ItmInternalTunnelDeleteTest method setUp.

@Before
public void setUp() {
    setupMocks();
    tunnelMonitorParamsOptional = Optional.of(tunnelMonitorParams);
    tunnelMonitorIntervalOptional = Optional.of(tunnelMonitorInterval);
    internalTunnelOptional = Optional.of(internalTunnel);
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorParamsOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorParamsInstanceIdentifier);
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorIntervalOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorIntervalIdentifier);
    doReturn(Futures.immediateCheckedFuture(internalTunnelOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, internalTunnelIdentifier);
    itmInternalTunnelDeleteWorker = new ItmInternalTunnelDeleteWorker(dataBroker, jobCoordinator, new TunnelMonitoringConfig(dataBroker, new GuavaCacheProvider(new CacheManagersRegistryImpl())));
}
Also used : ItmInternalTunnelDeleteWorker(org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelDeleteWorker) CacheManagersRegistryImpl(org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl) GuavaCacheProvider(org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider) Before(org.junit.Before)

Example 7 with CacheManagersRegistryImpl

use of org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl in project genius by opendaylight.

the class ItmManagerRpcServiceTest method setUp.

@Before
public void setUp() {
    setupMocks();
    externalTunnelOptional = Optional.of(externalTunnel);
    internalTunnelOptional = Optional.of(internalTunnel);
    dpnEndpointsOptional = Optional.of(dpnEndpoints);
    transportZonesOptional = Optional.of(transportZones);
    doReturn(Futures.immediateCheckedFuture(externalTunnelOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, externalTunnelIdentifier);
    doReturn(Futures.immediateCheckedFuture(externalTunnelOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, externalTunnelIdentifier1);
    doReturn(Futures.immediateCheckedFuture(internalTunnelOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, internalTunnelIdentifier);
    doReturn(Futures.immediateCheckedFuture(internalTunnelOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, internalTunnelIdentifierNew);
    doReturn(Futures.immediateCheckedFuture(dpnEndpointsOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, dpnEndpointsIdentifier);
    doReturn(Futures.immediateCheckedFuture(transportZonesOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, transportZonesIdentifier);
    itmManagerRpcService = new ItmManagerRpcService(dataBroker, mdsalApiManager, itmConfig, new DPNTEPsInfoCache(dataBroker, new GuavaCacheProvider(new CacheManagersRegistryImpl())));
}
Also used : CacheManagersRegistryImpl(org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl) ItmManagerRpcService(org.opendaylight.genius.itm.rpc.ItmManagerRpcService) GuavaCacheProvider(org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider) DPNTEPsInfoCache(org.opendaylight.genius.itm.cache.DPNTEPsInfoCache) Before(org.junit.Before)

Aggregations

CacheManagersRegistryImpl (org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl)7 Before (org.junit.Before)6 GuavaCacheProvider (org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider)6 DPNTEPsInfoCache (org.opendaylight.genius.itm.cache.DPNTEPsInfoCache)2 DataTreeIdentifier (org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier)1 LogicalDatastoreType (org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType)1 ItmExternalTunnelAddWorker (org.opendaylight.genius.itm.confighelpers.ItmExternalTunnelAddWorker)1 ItmInternalTunnelAddWorker (org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelAddWorker)1 ItmInternalTunnelDeleteWorker (org.opendaylight.genius.itm.confighelpers.ItmInternalTunnelDeleteWorker)1 ItmManagerRpcService (org.opendaylight.genius.itm.rpc.ItmManagerRpcService)1 CacheManagers (org.opendaylight.infrautils.caches.CacheManagers)1 CacheProvider (org.opendaylight.infrautils.caches.CacheProvider)1 CacheManagersRegistry (org.opendaylight.infrautils.caches.baseimpl.CacheManagersRegistry)1 StandardCacheProvider (org.opendaylight.infrautils.caches.standard.StandardCacheProvider)1 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)1 ElanInstance (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance)1 ElanInstanceKey (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceKey)1 Config (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsalutil.rev170830.Config)1 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)1 OsgiService (org.ops4j.pax.cdi.api.OsgiService)1