use of org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator in project bgpcep by opendaylight.
the class SrAttributeParserTest method setUp.
@Before
public void setUp() throws Exception {
final BGPActivator act = new BGPActivator(true, ServiceLoaderRSVPExtensionProviderContext.getSingletonInstance().getRsvpRegistry());
final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
act.start(context);
}
use of org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator in project bgpcep by opendaylight.
the class ActivatorTest method testActivator.
@Test
public void testActivator() throws Exception {
final BGPActivator act = new BGPActivator(true, ServiceLoaderRSVPExtensionProviderContext.getSingletonInstance().getRsvpRegistry());
final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
assertNull(context.getAddressFamilyRegistry().classForFamily(16388));
assertNull(context.getSubsequentAddressFamilyRegistry().classForFamily(71));
act.start(context);
assertEquals(LinkstateAddressFamily.class, context.getAddressFamilyRegistry().classForFamily(16388));
assertEquals(LinkstateSubsequentAddressFamily.class, context.getSubsequentAddressFamilyRegistry().classForFamily(71));
act.close();
}
use of org.opendaylight.protocol.bgp.linkstate.impl.BGPActivator 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(true, ServiceLoaderRSVPExtensionProviderContext.getSingletonInstance().getRsvpRegistry());
final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
act.start(context);
parser.parseNlri(Unpooled.copiedBuffer(data), builder);
final DestinationLinkstate ls = ((DestinationLinkstateCase) builder.getAdvertizedRoutes().getDestinationType()).getDestinationLinkstate();
assertEquals(1, ls.getCLinkstateDestination().size());
this.dest = ls.getCLinkstateDestination().get(0);
}
Aggregations