Search in sources :

Example 1 with FlowspecActivator

use of org.opendaylight.protocol.bgp.flowspec.FlowspecActivator in project bgpcep by opendaylight.

the class FSExtendedCommunitiesTest method setUp.

@Before
public void setUp() throws Exception {
    final SimpleFlowspecExtensionProviderContext fsContext = new SimpleFlowspecExtensionProviderContext();
    final FlowspecActivator activator = new FlowspecActivator(fsContext);
    this.act = new BGPActivator(activator);
    final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
    this.act.start(context);
    this.registry = context.getExtendedCommunityRegistry();
}
Also used : FlowspecActivator(org.opendaylight.protocol.bgp.flowspec.FlowspecActivator) 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) BGPActivator(org.opendaylight.protocol.bgp.flowspec.BGPActivator) SimpleFlowspecExtensionProviderContext(org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext) Before(org.junit.Before)

Example 2 with FlowspecActivator

use of org.opendaylight.protocol.bgp.flowspec.FlowspecActivator in project bgpcep by opendaylight.

the class BGPTestTool method initializeActivator.

private static BGPDispatcher initializeActivator() {
    final BGPActivator activator = new BGPActivator();
    final BGPExtensionProviderContext ctx = ServiceLoaderBGPExtensionProviderContext.getSingletonInstance();
    activator.start(ctx);
    final org.opendaylight.protocol.bgp.inet.BGPActivator inetActivator = new org.opendaylight.protocol.bgp.inet.BGPActivator();
    inetActivator.start(ctx);
    final org.opendaylight.protocol.bgp.evpn.impl.BGPActivator evpnActivator = new org.opendaylight.protocol.bgp.evpn.impl.BGPActivator();
    evpnActivator.start(ctx);
    final SimpleFlowspecExtensionProviderContext fsContext = new SimpleFlowspecExtensionProviderContext();
    final FlowspecActivator flowspecActivator = new FlowspecActivator(fsContext);
    final org.opendaylight.protocol.bgp.flowspec.BGPActivator flowspecBGPActivator = new org.opendaylight.protocol.bgp.flowspec.BGPActivator(flowspecActivator);
    flowspecBGPActivator.start(ctx);
    final org.opendaylight.protocol.bgp.labeled.unicast.BGPActivator labeledActivator = new org.opendaylight.protocol.bgp.labeled.unicast.BGPActivator();
    labeledActivator.start(ctx);
    final org.opendaylight.protocol.bgp.l3vpn.ipv4.BgpIpv4Activator bgpIpv4Activator = new org.opendaylight.protocol.bgp.l3vpn.ipv4.BgpIpv4Activator();
    bgpIpv4Activator.start(ctx);
    final org.opendaylight.protocol.bgp.l3vpn.ipv6.BgpIpv6Activator bgpIpv6Activator = new org.opendaylight.protocol.bgp.l3vpn.ipv6.BgpIpv6Activator();
    bgpIpv6Activator.start(ctx);
    return new BGPDispatcherImpl(ctx.getMessageRegistry(), new NioEventLoopGroup(), new NioEventLoopGroup(), new StrictBGPPeerRegistry());
}
Also used : FlowspecActivator(org.opendaylight.protocol.bgp.flowspec.FlowspecActivator) BGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext) ServiceLoaderBGPExtensionProviderContext(org.opendaylight.protocol.bgp.parser.spi.pojo.ServiceLoaderBGPExtensionProviderContext) StrictBGPPeerRegistry(org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry) SimpleFlowspecExtensionProviderContext(org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext) NioEventLoopGroup(io.netty.channel.nio.NioEventLoopGroup) BGPActivator(org.opendaylight.protocol.bgp.parser.impl.BGPActivator) BGPDispatcherImpl(org.opendaylight.protocol.bgp.rib.impl.BGPDispatcherImpl)

Aggregations

FlowspecActivator (org.opendaylight.protocol.bgp.flowspec.FlowspecActivator)2 SimpleFlowspecExtensionProviderContext (org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext)2 BGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext)2 NioEventLoopGroup (io.netty.channel.nio.NioEventLoopGroup)1 Before (org.junit.Before)1 BGPActivator (org.opendaylight.protocol.bgp.flowspec.BGPActivator)1 BGPActivator (org.opendaylight.protocol.bgp.parser.impl.BGPActivator)1 ServiceLoaderBGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.pojo.ServiceLoaderBGPExtensionProviderContext)1 SimpleBGPExtensionProviderContext (org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleBGPExtensionProviderContext)1 BGPDispatcherImpl (org.opendaylight.protocol.bgp.rib.impl.BGPDispatcherImpl)1 StrictBGPPeerRegistry (org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry)1