Search in sources :

Example 1 with UnprocessedTunnelsStateCache

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

the class TepCommandHelperTest method setUp.

@Before
public void setUp() {
    setupMocks();
    Optional<TransportZone> optionalTransportZone = Optional.of(transportZone);
    optionalTransportZones = Optional.of(transportZones);
    Optional<TunnelMonitorInterval> optionalTunnelMonitorInterval = Optional.of(tunnelMonitorInterval);
    Optional<TunnelMonitorParams> optionalTunnelMonitorParams = Optional.of(tunnelMonitorParams);
    Optional<Vteps> optionalVteps = Optional.of(vteps);
    Optional<Interface> ifStateOptional = Optional.of(interfaceTest);
    Optional<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> ifStateOptionalNew = Optional.of(interfaceTestNew);
    doReturn(FluentFutures.immediateFluentFuture(optionalTransportZone)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, transportZoneIdentifier);
    doReturn(FluentFutures.immediateFluentFuture(optionalTransportZones)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, transportZonesIdentifier);
    doReturn(FluentFutures.immediateFluentFuture(optionalTunnelMonitorInterval)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorIntervalIdentifier);
    doReturn(FluentFutures.immediateFluentFuture(optionalTunnelMonitorParams)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, tunnelMonitorParamsIdentifier);
    doReturn(FluentFutures.immediateFluentFuture(optionalVteps)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, vtepsIdentifier);
    lenient().doReturn(FluentFutures.immediateFluentFuture(ifStateOptional)).when(mockReadTx).read(LogicalDatastoreType.OPERATIONAL, interfaceIdentifier);
    lenient().doReturn(FluentFutures.immediateFluentFuture(ifStateOptionalNew)).when(mockReadTx).read(LogicalDatastoreType.CONFIGURATION, interfaceIdentifierNew);
    unprocessedTunnelsStateCache = new UnprocessedTunnelsStateCache();
    tepCommandHelper = new TepCommandHelper(dataBroker, itmConfig, unprocessedTunnelsStateCache);
}
Also used : Collections(java.util.Collections) TunnelMonitorParams(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.TunnelMonitorParams) TunnelMonitorInterval(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.TunnelMonitorInterval) TransportZone(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZone) Mockito.doReturn(org.mockito.Mockito.doReturn) Vteps(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Vteps) DeviceVteps(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.DeviceVteps) Interface(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface) UnprocessedTunnelsStateCache(org.opendaylight.genius.itm.cache.UnprocessedTunnelsStateCache) Before(org.junit.Before)

Aggregations

Collections (java.util.Collections)1 Before (org.junit.Before)1 Mockito.doReturn (org.mockito.Mockito.doReturn)1 UnprocessedTunnelsStateCache (org.opendaylight.genius.itm.cache.UnprocessedTunnelsStateCache)1 Interface (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface)1 TunnelMonitorInterval (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.TunnelMonitorInterval)1 TunnelMonitorParams (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.TunnelMonitorParams)1 TransportZone (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.TransportZone)1 DeviceVteps (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.DeviceVteps)1 Vteps (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rev160406.transport.zones.transport.zone.Vteps)1