import org.opendaylight.protocol.bgp.rib.impl.protocol.BGPReconnectPromise;
import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher;
import org.opendaylight.protocol.bgp.rib.impl.spi.CodecsRegistry;
+import org.opendaylight.protocol.bgp.rib.impl.state.BGPStateCollector;
import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext;
+import org.opendaylight.protocol.bgp.rib.spi.state.BGPStateProviderRegistry;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.Bgp;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Global;
import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Neighbors;
@Mock
private ClusterSingletonServiceProvider singletonServiceProvider;
+ private final BGPStateProviderRegistry stateProviderRegistry = new BGPStateCollector();
private DefaultBgpDeployer deployer;
private BGPClusterSingletonService spiedBgpSingletonService;
private CountDownLatch bgpSingletonObtainedLatch;
final Future future = mock(BGPReconnectPromise.class);
doReturn(true).when(future).cancel(true);
doReturn(future).when(this.dispatcher).createReconnectingClient(any(), any(), anyInt(), any());
-
this.deployer = spy(new DefaultBgpDeployer(NETWORK_INSTANCE_NAME, this.singletonServiceProvider,
this.rpcRegistry, this.extensionContext, this.dispatcher,
new DefaultBGPRibRoutingPolicyFactory(getDataBroker(), new StatementRegistry()),
- this.codecsRegistry, getDomBroker(), getDataBroker(), this.tableTypeRegistry));
+ this.codecsRegistry, getDomBroker(), getDataBroker(), this.tableTypeRegistry, stateProviderRegistry));
this.bgpSingletonObtainedLatch = new CountDownLatch(1);
doAnswer(invocationOnMock -> {
final BGPClusterSingletonService real =