BasePathSelectionModeFactory.createBestPathSelectionStrategy());
this.ribImpl = new RIBImpl(this.clusterSingletonServiceProvider, new RibId("test-rib"),
- AS_NUMBER, new BgpId(RIB_ID), null, this.ribExtension, this.dispatcher,
+ AS_NUMBER, new BgpId(RIB_ID), null, this.ribExtension, this.serverDispatcher,
this.mappingService.getCodecFactory(), getDomBroker(), TABLES_TYPE, pathTables,
this.ribExtension.getClassLoadingStrategy(), null);
this.ribImpl.instantiateServiceInstance();
this.ribImpl.onGlobalContextUpdated(this.schemaContext);
- final ChannelFuture channelFuture = this.dispatcher.createServer(StrictBGPPeerRegistry.GLOBAL,
- new InetSocketAddress(RIB_ID, PORT));
+ final ChannelFuture channelFuture = this.serverDispatcher.createServer(new InetSocketAddress(RIB_ID, PORT));
waitFutureSuccess(channelFuture);
this.serverChannel = channelFuture.channel();
}
public void testUseCase1() throws Exception {
final BgpParameters nonAddPathParams = createParameter(false);
- configurePeer(PEER1, this.ribImpl, nonAddPathParams, PeerRole.Ibgp);
+ configurePeer(PEER1, this.ribImpl, nonAddPathParams, PeerRole.Ibgp, this.serverRegistry);
final BGPSessionImpl session1 = createPeerSession(PEER1, nonAddPathParams, new SimpleSessionListener());
- configurePeer(PEER2, this.ribImpl, nonAddPathParams, PeerRole.Ibgp);
+ configurePeer(PEER2, this.ribImpl, nonAddPathParams, PeerRole.Ibgp, this.serverRegistry);
final BGPSessionImpl session2 = createPeerSession(PEER2, nonAddPathParams, new SimpleSessionListener());
- configurePeer(PEER3, this.ribImpl, nonAddPathParams, PeerRole.Ibgp);
+ configurePeer(PEER3, this.ribImpl, nonAddPathParams, PeerRole.Ibgp, this.serverRegistry);
final BGPSessionImpl session3 = createPeerSession(PEER3,nonAddPathParams, new SimpleSessionListener());
final SimpleSessionListener listener4 = new SimpleSessionListener();
- configurePeer(PEER4, this.ribImpl, nonAddPathParams, PeerRole.RrClient);
+ configurePeer(PEER4, this.ribImpl, nonAddPathParams, PeerRole.RrClient, this.serverRegistry);
final BGPSessionImpl session4 = createPeerSession(PEER4, nonAddPathParams, listener4);
final SimpleSessionListener listener5 = new SimpleSessionListener();
- configurePeer(PEER5, this.ribImpl, nonAddPathParams, PeerRole.Ebgp);
+ configurePeer(PEER5, this.ribImpl, nonAddPathParams, PeerRole.Ebgp, this.serverRegistry);
final BGPSessionImpl session5 = createPeerSession(PEER5, nonAddPathParams, listener5);
checkPeersPresentOnDataStore(5);
assertEquals(UPD_NA_200_EBGP, listener5.getListMsg().get(1));
final SimpleSessionListener listener6 = new SimpleSessionListener();
- configurePeer(PEER6, this.ribImpl, nonAddPathParams, PeerRole.RrClient);
+ configurePeer(PEER6, this.ribImpl, nonAddPathParams, PeerRole.RrClient, this.serverRegistry);
final BGPSessionImpl session6 = createPeerSession(PEER6, nonAddPathParams, listener6);
checkPeersPresentOnDataStore(6);