use of org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.types.rev151009.IPV4UNICAST in project bgpcep by opendaylight.
the class MultiPathSupportImplTest method testIsTableTypeSupported.
@Test
public void testIsTableTypeSupported() {
final List<AddressFamilies> supportedTables = Lists.newArrayList();
final BgpTableType ipv4Unicast = new BgpTableTypeImpl(Ipv4AddressFamily.class, UnicastSubsequentAddressFamily.class);
final BgpTableType ipv4L3vpn = new BgpTableTypeImpl(Ipv4AddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class);
final BgpTableType ipv6Unicast = new BgpTableTypeImpl(Ipv6AddressFamily.class, UnicastSubsequentAddressFamily.class);
final BgpTableType ipv6L3vpn = new BgpTableTypeImpl(Ipv6AddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class);
supportedTables.add(createAddPathCapability(ipv4Unicast, SendReceive.Send));
supportedTables.add(createAddPathCapability(ipv4L3vpn, SendReceive.Receive));
supportedTables.add(createAddPathCapability(ipv6Unicast, SendReceive.Both));
final MultiPathSupport multiPathSupport = MultiPathSupportImpl.createParserMultiPathSupport(supportedTables);
Assert.assertTrue(multiPathSupport.isTableTypeSupported(ipv4Unicast));
Assert.assertTrue(multiPathSupport.isTableTypeSupported(ipv6Unicast));
Assert.assertFalse(multiPathSupport.isTableTypeSupported(ipv4L3vpn));
Assert.assertFalse(multiPathSupport.isTableTypeSupported(ipv6L3vpn));
}
Aggregations