Search in sources :

Example 16 with PathId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.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));
}
Also used : PathId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId) FlowspecRouteKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev171207.flowspec.ipv4.route.FlowspecRouteKey) AbstractRIBSupportTest(org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest) Test(org.junit.Test)

Example 17 with PathId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.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));
}
Also used : PathId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId) Ipv4RouteKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv4.routes.ipv4.routes.Ipv4RouteKey) AbstractRIBSupportTest(org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest) Test(org.junit.Test)

Example 18 with PathId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.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));
}
Also used : PathId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId) Ipv6RouteKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.inet.rev171207.ipv6.routes.ipv6.routes.Ipv6RouteKey) AbstractRIBSupportTest(org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest) Test(org.junit.Test)

Example 19 with PathId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId in project bgpcep by opendaylight.

the class LabeledUnicastIpv4RIBSupportTest method testRouteIdAddPath.

@Test
public void testRouteIdAddPath() {
    final LabeledUnicastRouteKey oldKey = new LabeledUnicastRouteKey(new PathId(100L), ROUTE_KEY.getRouteKey());
    Assert.assertEquals(ROUTE_KEY, RIB_SUPPORT.createNewRouteKey(1L, oldKey));
}
Also used : PathId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId) LabeledUnicastRouteKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRouteKey) AbstractRIBSupportTest(org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest) Test(org.junit.Test)

Example 20 with PathId

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId in project bgpcep by opendaylight.

the class LabeledUnicastIpv6RIBSupportTest method testRouteIdAddPath.

@Test
public void testRouteIdAddPath() {
    final LabeledUnicastRouteKey oldKey = new LabeledUnicastRouteKey(new PathId(100L), ROUTE_KEY.getRouteKey());
    Assert.assertEquals(ROUTE_KEY, RIB_SUPPORT.createNewRouteKey(1L, oldKey));
}
Also used : PathId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId) LabeledUnicastRouteKey(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev171207.labeled.unicast.routes.list.LabeledUnicastRouteKey) AbstractRIBSupportTest(org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)14 PathId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.PathId)14 PathId (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.PathId)9 AbstractRIBSupportTest (org.opendaylight.protocol.bgp.rib.spi.AbstractRIBSupportTest)8 RouteDistinguisher (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.RouteDistinguisher)6 List (java.util.List)4 Flowspec (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.destination.Flowspec)4 MapEntryNode (org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode)4 Ipv4AddressNoZone (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4AddressNoZone)3 Ipv4Prefix (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix)3 UpdateBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.UpdateBuilder)3 Route (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.Route)3 ByteBuf (io.netty.buffer.ByteBuf)2 ArrayList (java.util.ArrayList)2 Before (org.junit.Before)2 OffsetMap (org.opendaylight.protocol.bgp.mode.impl.add.OffsetMap)2 PeerSpecificParserConstraint (org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint)2 AsNumber (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber)2 DestinationFlowspecL3vpnIpv4Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.l3vpn.destination.ipv4.DestinationFlowspecL3vpnIpv4Builder)2 DestinationFlowspecL3vpnIpv6Builder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev200120.flowspec.l3vpn.destination.ipv6.DestinationFlowspecL3vpnIpv6Builder)2