Search in sources :

Example 11 with PathSelectionMode

use of org.opendaylight.protocol.bgp.mode.api.PathSelectionMode in project bgpcep by opendaylight.

the class PathSelectionModeFactoryTest method testCreateBestPathSelectionStrategy.

@Test
public void testCreateBestPathSelectionStrategy() throws Exception {
    final PathSelectionMode psm = new AllPathSelection(this.peerTracker);
    Assert.assertTrue(psm.createRouteEntry(true) instanceof ComplexRouteEntry);
    Assert.assertTrue(psm.createRouteEntry(false) instanceof SimpleRouteEntry);
}
Also used : PathSelectionMode(org.opendaylight.protocol.bgp.mode.api.PathSelectionMode) Test(org.junit.Test)

Example 12 with PathSelectionMode

use of org.opendaylight.protocol.bgp.mode.api.PathSelectionMode in project bgpcep by opendaylight.

the class PathSelectionModeFactoryTest method testCreateBestPathSelectionStrategy.

@Test
public void testCreateBestPathSelectionStrategy() throws Exception {
    final PathSelectionMode psm = new AddPathBestNPathSelection(2L, this.peerTracker);
    Assert.assertTrue(psm.createRouteEntry(true) instanceof ComplexRouteEntry);
    Assert.assertTrue(psm.createRouteEntry(false) instanceof SimpleRouteEntry);
}
Also used : PathSelectionMode(org.opendaylight.protocol.bgp.mode.api.PathSelectionMode) Test(org.junit.Test)

Aggregations

PathSelectionMode (org.opendaylight.protocol.bgp.mode.api.PathSelectionMode)12 Test (org.junit.Test)6 RibId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.RibId)6 TablesKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey)6 BgpId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.BgpId)5 ChannelFuture (io.netty.channel.ChannelFuture)3 InetSocketAddress (java.net.InetSocketAddress)3 Before (org.junit.Before)3 AfiSafi (org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.multiprotocol.rev151009.bgp.common.afi.safi.list.AfiSafi)3 Ipv4Address (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address)3 BgpTableType (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev171207.BgpTableType)3 YangInstanceIdentifier (org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)3 HashMap (java.util.HashMap)2 BindingTransactionChain (org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain)2 AllPathSelection (org.opendaylight.protocol.bgp.mode.impl.add.all.paths.AllPathSelection)2 AddPathBestNPathSelection (org.opendaylight.protocol.bgp.mode.impl.add.n.paths.AddPathBestNPathSelection)2 Preconditions (com.google.common.base.Preconditions)1 Futures (com.google.common.util.concurrent.Futures)1 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)1 ArrayList (java.util.ArrayList)1