use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId in project bgpcep by opendaylight.
the class FlowspecL3vpnIpv6RIBSupportTest method testRouteIdAddPath.
@Test
public void testRouteIdAddPath() {
final FlowspecL3vpnRouteKey oldRouteKey = new FlowspecL3vpnRouteKey(new PathId(10L), ROUTE_KEY.getRouteKey());
Assert.assertEquals(ROUTE_KEY, RIB_SUPPORT.createNewRouteKey(1L, oldRouteKey));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId in project bgpcep by opendaylight.
the class FlowspecIpv4RIBSupportTest method testRouteIdAddPath.
@Test
public void testRouteIdAddPath() {
final FlowspecRouteKey oldKey = new FlowspecRouteKey(new PathId(100L), ROUTE_KEY.getRouteKey());
Assert.assertEquals(ROUTE_KEY, RIB_SUPPORT.createNewRouteKey(1L, oldKey));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId in project bgpcep by opendaylight.
the class IPv4RIBSupportTest method testRouteIdAddPath.
@Test
public void testRouteIdAddPath() {
final Ipv4RouteKey expected = new Ipv4RouteKey(new PathId(1L), PREFIX);
final Ipv4RouteKey oldKey = new Ipv4RouteKey(new PathId(100L), PREFIX);
assertEquals(expected, RIB_SUPPORT.createNewRouteKey(expected.getPathId().getValue(), oldKey));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId in project bgpcep by opendaylight.
the class IPv6RIBSupportTest method testRouteIdAddPath.
@Test
public void testRouteIdAddPath() {
final Ipv6RouteKey expected = new Ipv6RouteKey(new PathId(1L), PREFIX);
final Ipv6RouteKey oldKey = new Ipv6RouteKey(new PathId(100L), PREFIX);
assertEquals(expected, RIB_SUPPORT.createNewRouteKey(expected.getPathId().getValue(), oldKey));
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId in project bgpcep by opendaylight.
the class AbstractFlowspecL3vpnRIBSupport method buildDestination.
@Nonnull
@Override
protected DestinationType buildDestination(@Nonnull final Collection<MapEntryNode> routes) {
final MapEntryNode routesCont = Iterables.getOnlyElement(routes);
final PathId pathId = PathIdUtil.buildPathId(routesCont, routePathIdNid());
final RouteDistinguisher rd = extractRouteDistinguisher(routesCont, this.routeDistinguisherNID);
return this.nlriParser.createAdvertizedRoutesDestinationType(new Object[] { rd, this.nlriParser.extractFlowspec(routesCont) }, pathId);
}
Aggregations