BUG-6955: Fix BGP TestTool 08/47108/1
authorClaudio D. Gasparini <cgaspari@cisco.com>
Mon, 17 Oct 2016 11:30:19 +0000 (13:30 +0200)
committerClaudio D. Gasparini <cgaspari@cisco.com>
Wed, 19 Oct 2016 07:04:41 +0000 (07:04 +0000)
Register BGP Extensions

Change-Id: I1fd1874d580ad922afa776d45c195118b694286f
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
(cherry picked from commit ad06ba88b71504bdb80c1e66193c4871d6f56c5e)

bgp/testtool/pom.xml
bgp/testtool/src/main/java/org/opendaylight/protocol/bgp/testtool/BGPTestTool.java

index 0a19ef32d9b00ee85e93bbc76aa72f4e77c90e71..c71ad5f45dd3f340e103ead780dacff58f3c6d63 100644 (file)
             <groupId>org.opendaylight.mdsal.model</groupId>
             <artifactId>ietf-inet-types-2013-07-15</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>bgp-inet</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>bgp-evpn</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>bgp-flowspec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>bgp-labeled-unicast</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>bgp-l3vpn</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-common</artifactId>
index 118e6cbc87f3428459f11e8e41f4ddaa00e5e567..117500dd8e6e8bcabdfc59f5c189c39eac0928f8 100644 (file)
@@ -19,6 +19,8 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import org.opendaylight.protocol.bgp.flowspec.FlowspecActivator;
+import org.opendaylight.protocol.bgp.flowspec.SimpleFlowspecExtensionProviderContext;
 import org.opendaylight.protocol.bgp.parser.impl.BGPActivator;
 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
 import org.opendaylight.protocol.bgp.parser.spi.pojo.ServiceLoaderBGPExtensionProviderContext;
@@ -76,6 +78,27 @@ final class BGPTestTool {
         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 fs_context = new SimpleFlowspecExtensionProviderContext();
+        final FlowspecActivator flowspecActivator = new FlowspecActivator(fs_context);
+        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());
     }