Search in sources :

Example 1 with DPNTEPsInfoCache

use of org.opendaylight.genius.itm.cache.DPNTEPsInfoCache in project genius by opendaylight.

the class ItmExternalTunnelAddTest method setUp.

@Before
public void setUp() {
    setupMocks();
    optionalDpnEndPoints = Optional.of(dpnEndpointsVxlan);
    tunnelMonitorParamsOptional = Optional.of(tunnelMonitorParams);
    tunnelMonitorIntervalOptional = Optional.of(tunnelMonitorInterval);
    doReturn(Futures.immediateCheckedFuture(optionalDpnEndPoints)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, dpnEndpointsIdentifier);
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorParamsOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorParamsInstanceIdentifier);
    doReturn(Futures.immediateCheckedFuture(tunnelMonitorIntervalOptional)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorIntervalIdentifier);
    externalTunnelAddWorker = new ItmExternalTunnelAddWorker(dataBroker, itmConfig, new DPNTEPsInfoCache(dataBroker, new GuavaCacheProvider(new CacheManagersRegistryImpl())));
}
Also used : CacheManagersRegistryImpl(org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl) ItmExternalTunnelAddWorker(org.opendaylight.genius.itm.confighelpers.ItmExternalTunnelAddWorker) GuavaCacheProvider(org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider) DPNTEPsInfoCache(org.opendaylight.genius.itm.cache.DPNTEPsInfoCache) Before(org.junit.Before)

Example 2 with DPNTEPsInfoCache

use of org.opendaylight.genius.itm.cache.DPNTEPsInfoCache 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

Before (org.junit.Before)2 DPNTEPsInfoCache (org.opendaylight.genius.itm.cache.DPNTEPsInfoCache)2 CacheManagersRegistryImpl (org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl)2 GuavaCacheProvider (org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider)2 ItmExternalTunnelAddWorker (org.opendaylight.genius.itm.confighelpers.ItmExternalTunnelAddWorker)1 ItmManagerRpcService (org.opendaylight.genius.itm.rpc.ItmManagerRpcService)1