Search in sources :

Example 1 with ItmManagerRpcService

use of org.opendaylight.genius.itm.rpc.ItmManagerRpcService 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)1 DPNTEPsInfoCache (org.opendaylight.genius.itm.cache.DPNTEPsInfoCache)1 ItmManagerRpcService (org.opendaylight.genius.itm.rpc.ItmManagerRpcService)1 CacheManagersRegistryImpl (org.opendaylight.infrautils.caches.baseimpl.internal.CacheManagersRegistryImpl)1 GuavaCacheProvider (org.opendaylight.infrautils.caches.guava.internal.GuavaCacheProvider)1