Search in sources :

Example 1 with DestinationLinkstate

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstate in project bgpcep by opendaylight.

the class LinkstateNlriParserTest method setUp.

private void setUp(final byte[] data) throws BGPParsingException {
    final LinkstateNlriParser parser = new LinkstateNlriParser();
    final MpReachNlriBuilder builder = new MpReachNlriBuilder();
    this.registry = SimpleNlriTypeRegistry.getInstance();
    final BGPActivator act = new BGPActivator(new SimpleRSVPExtensionProviderContext());
    final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
    act.start(context);
    parser.parseNlri(Unpooled.copiedBuffer(data), builder, null);
    final DestinationLinkstate ls = ((DestinationLinkstateCase) builder.getAdvertizedRoutes().getDestinationType()).getDestinationLinkstate();
    assertEquals(1, ls.getCLinkstateDestination().size());
    this.dest = ls.getCLinkstateDestination().get(0);
}
Also used : MpReachNlriBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.attributes.reach.MpReachNlriBuilder) SimpleBGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext) SimpleBGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext) BGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext) DestinationLinkstate(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstate) BGPActivator(org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator) LinkstateNlriParser(org.opendaylight.protocol.bgp.linkstate.impl.nlri.LinkstateNlriParser) SimpleRSVPExtensionProviderContext(org.opendaylight.protocol.rsvp.parser.spi.pojo.SimpleRSVPExtensionProviderContext) DestinationLinkstateCase(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationLinkstateCase)

Aggregations

BGPActivator (org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator)1 LinkstateNlriParser (org.opendaylight.protocol.bgp.linkstate.impl.nlri.LinkstateNlriParser)1 BGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext)1 SimpleBGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext)1 SimpleRSVPExtensionProviderContext (org.opendaylight.protocol.rsvp.parser.spi.pojo.SimpleRSVPExtensionProviderContext)1 DestinationLinkstateCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationLinkstateCase)1 DestinationLinkstate (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.update.attributes.mp.reach.nlri.advertized.routes.destination.type.destination.linkstate._case.DestinationLinkstate)1 MpReachNlriBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.attributes.reach.MpReachNlriBuilder)1