Migrate to use tcpmd5 code in its new place 87/9187/5
authorRobert Varga <rovarga@cisco.com>
Sun, 20 Jul 2014 22:22:22 +0000 (00:22 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 22 Jul 2014 11:54:52 +0000 (13:54 +0200)
The TCP-MD5 has been bigrate into its own project and thus lives in new
artifacts, new packages and under a different version. This patch
removes the code from BGPCEP repository and points all callsites to the
new place.

Change-Id: Ic061ba419dd350f32eb7e212fdb6a8cbff243673
Signed-off-by: Robert Varga <rovarga@cisco.com>
87 files changed:
bgp/pom.xml
bgp/rib-impl/pom.xml
bgp/rib-impl/src/main/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPPeerModule.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPDispatcherImpl.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPDispatcher.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/BGPServerDispatcher.java
bgp/rib-impl/src/test/java/org/opendaylight/controller/config/yang/bgp/rib/impl/BGPPeerModuleTest.java
commons/parent/pom.xml
integration-tests/src/test/java/org/opendaylight/protocol/integration/AbstractBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/BgpRibImplBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/BgpRibMockBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/PcepApiBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/PcepImplBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/PcepSpiBundleTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/bgp/ParserToSalTest.java
integration-tests/src/test/java/org/opendaylight/protocol/integration/pcep/AbstractPcepOsgiTest.java
pcep/api/pom.xml
pcep/api/src/main/java/org/opendaylight/protocol/pcep/PCEPDispatcher.java
pcep/ietf-stateful02/pom.xml
pcep/ietf-stateful07/pom.xml
pcep/impl/pom.xml
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/PCEPDispatcherImpl.java
pcep/pom.xml
pcep/topology-provider/pom.xml
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/PCEPTopologyProvider.java
pcep/topology-provider/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModule.java
pcep/topology-provider/src/test/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModuleTest.java
pcep/tunnel-provider/pom.xml
pom.xml
tcp-md5/.project [deleted file]
tcp-md5/api/.project [deleted file]
tcp-md5/api/pom.xml [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactory.java [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccess.java [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccessFactory.java [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyMapping.java [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptions.java [deleted file]
tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/package-info.java [deleted file]
tcp-md5/api/src/main/yang/odl-tcpmd5-cfg.yang [deleted file]
tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactoryTest.java [deleted file]
tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptionsTest.java [deleted file]
tcp-md5/controller-config/.project [deleted file]
tcp-md5/controller-config/pom.xml [deleted file]
tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml [deleted file]
tcp-md5/jni/.project [deleted file]
tcp-md5/jni/pom.xml [deleted file]
tcp-md5/jni/src/main/c/tcpmd5_jni.c [deleted file]
tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccess.java [deleted file]
tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccessFactory.java [deleted file]
tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeSupportUnavailableException.java [deleted file]
tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModule.java [deleted file]
tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModuleFactory.java [deleted file]
tcp-md5/jni/src/main/yang/odl-tcpmd5-jni-cfg.yang [deleted file]
tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/BasicNativeKeyAccessTest.java [deleted file]
tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/ConnectivityNativeKeyAccessTest.java [deleted file]
tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeTestSupport.java [deleted file]
tcp-md5/netty/.project [deleted file]
tcp-md5/netty/pom.xml [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5ServerSocketChannelConfig.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5SocketChannelConfig.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelFactory.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelOption.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannel.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannelFactory.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannel.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannelFactory.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerChannelFactory.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerSocketChannelConfig.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5SocketChannelConfig.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/NettyKeyAccess.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModule.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModuleFactory.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModule.java [deleted file]
tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModuleFactory.java [deleted file]
tcp-md5/netty/src/main/yang/odl-tcpmd5-netty-cfg.yang [deleted file]
tcp-md5/nio/.project [deleted file]
tcp-md5/nio/pom.xml [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/DefaultKeyAccessFactoryFactory.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptions.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SelectorProvider.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ServerSocketChannel.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannel.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/ProxyChannel.java [deleted file]
tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/SelectorFacade.java [deleted file]
tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptionsTest.java [deleted file]
tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannelTest.java [deleted file]
tcp-md5/pom.xml [deleted file]

index b08359898d5c208e2facb545bb502614eab8eb6a..2c2a64691d4e95116255b2770831a9f0ffd8cf24 100644 (file)
                 <artifactId>topology-api-config</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-netty</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-netty-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 
index b2d494c505bfb36980f5706edc32e5a59058729a..d6e95ee11e03e05d87153232a0468b2da6928b44 100644 (file)
             <artifactId>bgp-rib-spi</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-netty</artifactId>
         </dependency>
         <dependency>
             <groupId>${project.groupId}</groupId>
             <artifactId>bgp-parser-impl</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-netty</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>config-api</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-jni</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-jni</artifactId>
             <type>test-jar</type>
             <scope>test</scope>
index 240c3862be67535af3418f3c3a77fcfaf2b95eb6..7fd2ae27a49225e455eaee896b09d05fb317db83 100644 (file)
@@ -22,13 +22,13 @@ import com.google.common.net.InetAddresses;
 import io.netty.util.concurrent.Future;
 import java.net.InetSocketAddress;
 import java.util.List;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
 import org.opendaylight.protocol.bgp.rib.impl.BGPPeer;
 import org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionPreferences;
 import org.opendaylight.protocol.bgp.rib.impl.spi.RIB;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.open.BgpParameters;
index a966ab53c8a3cb1c526a5cb807c7643da0f2dc94..1c8c7894d659b2199aafaf362861018d783097cd 100644 (file)
@@ -17,10 +17,6 @@ import io.netty.util.concurrent.Promise;
 
 import java.net.InetSocketAddress;
 
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ChannelFactory;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ChannelOption;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ServerChannelFactory;
 import org.opendaylight.protocol.bgp.parser.BGPSessionListener;
 import org.opendaylight.protocol.bgp.parser.spi.MessageRegistry;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher;
@@ -30,6 +26,10 @@ import org.opendaylight.protocol.bgp.rib.impl.spi.BGPSessionValidator;
 import org.opendaylight.protocol.framework.AbstractDispatcher;
 import org.opendaylight.protocol.framework.ReconnectStrategy;
 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
+import org.opendaylight.tcpmd5.api.KeyMapping;
+import org.opendaylight.tcpmd5.netty.MD5ChannelFactory;
+import org.opendaylight.tcpmd5.netty.MD5ChannelOption;
+import org.opendaylight.tcpmd5.netty.MD5ServerChannelFactory;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 
 /**
index 6d4d436779f2a2b94f39ccbb02fa95369e75ac86..11e4c0754d03cf679835667a08e76c0d37965a33 100644 (file)
@@ -9,10 +9,10 @@ package org.opendaylight.protocol.bgp.rib.impl.spi;
 
 import io.netty.util.concurrent.Future;
 import java.net.InetSocketAddress;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.protocol.bgp.parser.BGPSession;
 import org.opendaylight.protocol.framework.ReconnectStrategy;
 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 
 /**
index 4d252fa0b38a3a99f672b7c8df2fdccd459fc29f..9c05bf13f3dfb6f66e3041a5320910e1ab19b4ef 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.protocol.bgp.rib.impl.spi;
 
 import io.netty.channel.ChannelFuture;
 import java.net.InetSocketAddress;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 
 /**
  * Dispatcher class for creating BGP server.
index cad3dea135042b9cd04ce7e52cc072f99b0ddc89..56a1985096a697f2208ea3b3f9cfbf8af0baf868 100644 (file)
@@ -18,7 +18,6 @@ import java.util.List;
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.ObjectName;
 import org.junit.Test;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeTestSupport;
 import org.opendaylight.controller.config.api.IdentityAttributeRef;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.api.jmx.CommitStatus;
@@ -27,6 +26,7 @@ import org.opendaylight.controller.config.util.ConfigTransactionJMXClient;
 import org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.NativeKeyAccessFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ClientChannelFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ClientChannelFactoryModuleMXBean;
+import org.opendaylight.tcpmd5.jni.NativeTestSupport;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv4AddressFamily;
index 74873a7bff6e450bc692e93032c50443c1702322..7a4f96ee0042001f86f5229e4adf55da110c1cd5 100644 (file)
@@ -67,6 +67,9 @@
         <controller.config.version>0.2.5-SNAPSHOT</controller.config.version>
         <controller.framework.version>0.5.0-SNAPSHOT</controller.framework.version>
         <controller.mdsal.version>1.1-SNAPSHOT</controller.mdsal.version>
+
+        <!-- TCP-MD5 artifacts -->
+        <tcpmd5.version>1.0.0-SNAPSHOT</tcpmd5.version>
     </properties>
 
     <dependencyManagement>
                 <version>${project.version}</version>
                 <scope>test</scope>
                 <type>test-jar</type>
-           </dependency>
+            </dependency>
             <dependency>
-                <groupId>${project.groupId}</groupId>
+                <groupId>org.opendaylight.tcpmd5</groupId>
+                <artifactId>tcpmd5-api</artifactId>
+                <version>${tcpmd5.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.tcpmd5</groupId>
+                <artifactId>tcpmd5-netty</artifactId>
+                <version>${tcpmd5.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.tcpmd5</groupId>
                 <artifactId>tcpmd5-jni</artifactId>
-                <version>${project.version}</version>
+                <version>${tcpmd5.version}</version>
                 <scope>test</scope>
             </dependency>
             <dependency>
-                <groupId>${project.groupId}</groupId>
+                <groupId>org.opendaylight.tcpmd5</groupId>
                 <artifactId>tcpmd5-jni</artifactId>
-                <version>${project.version}</version>
+                <version>${tcpmd5.version}</version>
                 <type>test-jar</type>
                 <scope>test</scope>
             </dependency>
index 37d6e0421e9c5d0c4a3bf56aab3dda469a7cdb4b..2e3f38b4163bf4ae1eeb066da856a6c0206f8e79 100644 (file)
@@ -78,6 +78,9 @@ public abstract class AbstractBundleTest {
         ret.add(mavenBundle("org.opendaylight.yangtools.model", "ietf-topology").versionAsInProject());
         ret.add(mavenBundle("org.opendaylight.yangtools.model", "yang-ext").versionAsInProject());
 
+        ret.add(mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-api").versionAsInProject());
+        ret.add(mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-netty").versionAsInProject());
+
         ret.add(mavenBundle("org.javassist", "javassist").versionAsInProject());
         ret.add(mavenBundle("org.opendaylight.controller", "config-api").versionAsInProject());
         ret.add(mavenBundle("org.opendaylight.controller", "netty-config-api").versionAsInProject());
index 485523500e7218536b336281e7d16446fbdc0257..50997c97b1880e89a89b4f4dca40419ad4da1eda 100644 (file)
@@ -15,7 +15,7 @@ public final class BgpRibImplBundleTest extends AbstractBundleTest {
     @Override
     protected Collection<String> prerequisiteBundles() {
         return Lists.newArrayList("concepts", "bgp-concepts", "bgp-linkstate", "bgp-parser-api", "bgp-parser-impl", "bgp-parser-spi",
-                "bgp-rib-api", "bgp-rib-spi", "bgp-util", "rsvp-api", "tcpmd5-api", "tcpmd5-netty", "util");
+                "bgp-rib-api", "bgp-rib-spi", "bgp-util", "rsvp-api", "util");
     }
 
     @Override
index e45a8d4547fb38b77d5cbeabc7be4d1944a3ff67..bd3316a2efc493136210be5c2ef258a03d587dff 100644 (file)
@@ -15,7 +15,7 @@ public final class BgpRibMockBundleTest extends AbstractBundleTest {
     @Override
     protected Collection<String> prerequisiteBundles() {
         return Lists.newArrayList("concepts", "bgp-concepts", "bgp-linkstate", "bgp-parser-api", "bgp-parser-impl", "bgp-parser-spi",
-                "bgp-rib-api", "bgp-rib-impl", "bgp-rib-spi", "bgp-util", "rsvp-api", "tcpmd5-api", "tcpmd5-netty", "util");
+                "bgp-rib-api", "bgp-rib-impl", "bgp-rib-spi", "bgp-util", "rsvp-api", "util");
     }
 
     @Override
index 30255d08bc1497932be0257cda1f7eab26eae19f..bc70a870260ef102dc2dcf27ad956b5a5dd39533 100644 (file)
@@ -14,7 +14,7 @@ import java.util.Collection;
 public final class PcepApiBundleTest extends AbstractBundleTest {
     @Override
     protected Collection<String> prerequisiteBundles() {
-        return Lists.newArrayList("concepts", "rsvp-api", "tcpmd5-api", "util");
+        return Lists.newArrayList("concepts", "rsvp-api", "util");
     }
 
     @Override
index f4972c05d32bedff7cf3f6ea9162fdeeaee4698e..66089bff5da2756b93362855a3a8b99b54ccc4ee 100644 (file)
@@ -15,7 +15,7 @@ public final class PcepImplBundleTest extends AbstractBundleTest {
     protected Collection<String> prerequisiteBundles() {
         return Lists.newArrayList("concepts", "pcep-api", "pcep-spi", "pcep-ietf-stateful02", "pcep-ietf-stateful07",
                 "pcep-topology-api", "pcep-tunnel-api", "rsvp-api", "programming-api", "programming-topology-api", "topology-api",
-                "topology-tunnel-api", "programming-tunnel-api", "tcpmd5-api", "tcpmd5-netty", "util");
+                "topology-tunnel-api", "programming-tunnel-api", "util");
     }
 
     @Override
index 7e72dff277a7a2c86c35091f1a4bc7f7a4e31f96..de70dcbca6f00767fee036b2c81806bd8d8bd682 100644 (file)
@@ -14,7 +14,7 @@ import java.util.Collection;
 public final class PcepSpiBundleTest extends AbstractBundleTest {
     @Override
     protected Collection<String> prerequisiteBundles() {
-        return Lists.newArrayList("concepts", "pcep-api", "rsvp-api", "tcpmd5-api", "util");
+        return Lists.newArrayList("concepts", "pcep-api", "rsvp-api", "util");
     }
 
     @Override
index 8847dd8cc3ff90094d74c3552e9313102151ecbd..935e7dccf5dd4b3bccaa4a9e3b0634582a02be93 100644 (file)
@@ -31,7 +31,6 @@ import org.mockito.Mockito;
 import org.mockito.MockitoAnnotations;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
@@ -48,6 +47,7 @@ import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionProviderContext;
 import org.opendaylight.protocol.bgp.rib.spi.SimpleRIBExtensionProviderContext;
 import org.opendaylight.protocol.bgp.util.HexDumpBGPFileParser;
 import org.opendaylight.protocol.framework.ReconnectStrategyFactory;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.AsNumber;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.LinkstateAddressFamily;
index e9448e5dc94de0bc50315ebd78f2af16b52bd3ba..ddc9657162c78a82b90a524f18c2ac1b3008fee7 100644 (file)
@@ -81,8 +81,8 @@ public class AbstractPcepOsgiTest {
                 mavenBundle("org.opendaylight.bgpcep", "pcep-spi").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "pcep-ietf-stateful02").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "pcep-ietf-stateful07").versionAsInProject(), //
-                mavenBundle("org.opendaylight.bgpcep", "tcpmd5-api").versionAsInProject(), //
-                mavenBundle("org.opendaylight.bgpcep", "tcpmd5-netty").versionAsInProject(), //
+                mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-api").versionAsInProject(), //
+                mavenBundle("org.opendaylight.tcpmd5", "tcpmd5-netty").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "topology-api").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "topology-tunnel-api").versionAsInProject(), //
                 mavenBundle("org.opendaylight.bgpcep", "programming-topology-api").versionAsInProject(), //
index e2b39af291090cc5a38c3150dac7901d507897eb..f464929b4a92379c5259d488e7c1ebdfde132e6a 100644 (file)
@@ -41,7 +41,7 @@
             <artifactId>rsvp-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-api</artifactId>
         </dependency>
         <dependency>
index 326fac80335001cf03cd65a388113befbd66059b..5c64d32aacd70d0c2ab6239b21e53e484e14c968 100644 (file)
@@ -11,8 +11,8 @@ import io.netty.channel.ChannelFuture;
 
 import java.net.InetSocketAddress;
 
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.protocol.framework.SessionListenerFactory;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 
 /**
  * Dispatcher class for creating servers and clients.
index b50bd2ec0259e1a65b3b946df158cb9385efc079..80fbfd13b8fcac3b7919c47fe0814580723c6ead 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-impl</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-netty</artifactId>
-        </dependency>
 
         <!--
             FIXME: this is in support of the generated code. This should not
index 6d88d00e08374197cc17f80e1ef543a5646809cf..9d7dc5bcbd7b7f5bb09c20672f5862e7b02c7bdb 100644 (file)
             <groupId>${project.groupId}</groupId>
             <artifactId>pcep-impl</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-netty</artifactId>
-        </dependency>
 
         <!--
             FIXME: this is in support of the generated code. This should not
index 9662fec011a6127a1cc96d96899a1f399d37cc51..b00c01da89d619e8406e0273d82cc4c7d2528f8c 100644 (file)
@@ -50,7 +50,7 @@
             <artifactId>util</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-netty</artifactId>
         </dependency>
 
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>netty-config-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-netty</artifactId>
-        </dependency>
 
         <!-- Test dependencies -->
         <dependency>
index a232851c04ddd4d2d2e40692a239682085eef3ac..4092549e0018fed2db2721678498007d84c5cb5f 100644 (file)
@@ -18,16 +18,16 @@ import io.netty.util.concurrent.Promise;
 
 import java.net.InetSocketAddress;
 
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ChannelFactory;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ChannelOption;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5ServerChannelFactory;
 import org.opendaylight.protocol.framework.AbstractDispatcher;
 import org.opendaylight.protocol.framework.SessionListenerFactory;
 import org.opendaylight.protocol.framework.SessionNegotiatorFactory;
 import org.opendaylight.protocol.pcep.PCEPDispatcher;
 import org.opendaylight.protocol.pcep.PCEPSessionListener;
 import org.opendaylight.protocol.pcep.spi.MessageRegistry;
+import org.opendaylight.tcpmd5.api.KeyMapping;
+import org.opendaylight.tcpmd5.netty.MD5ChannelFactory;
+import org.opendaylight.tcpmd5.netty.MD5ChannelOption;
+import org.opendaylight.tcpmd5.netty.MD5ServerChannelFactory;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index f0d9844d67f022c653997049839dc1a9c113f46c..d4be672ffae946f059c639cde7a691257fa7e43c 100644 (file)
                 <artifactId>topology-tunnel-api</artifactId>
                 <version>${project.version}</version>
             </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-netty</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-netty-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
         </dependencies>
     </dependencyManagement>
 </project>
index 3aa9e18696dec092300d281025912329cf08e168..a9f63b02e734f9abf28377789e2785153039c832 100644 (file)
@@ -91,7 +91,7 @@
             <artifactId>topology-api</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-api</artifactId>
         </dependency>
         <dependency>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-jni</artifactId>
             <scope>test</scope>
         </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-jni</artifactId>
-                <type>test-jar</type>
-                <scope>test</scope>
-            </dependency>
+        <dependency>
+            <groupId>org.opendaylight.tcpmd5</groupId>
+            <artifactId>tcpmd5-jni</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
index 3bdbbb3252019715f973c5ea34c0c25fed64bc14..f5ed648509aec73a86d040a8eb53ed3d623b2ae2 100644 (file)
@@ -17,12 +17,12 @@ import java.net.InetSocketAddress;
 import java.util.concurrent.ExecutionException;
 
 import org.opendaylight.bgpcep.programming.spi.InstructionScheduler;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.bgpcep.topology.DefaultTopologyReference;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.protocol.pcep.PCEPDispatcher;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.topology.rev140113.NetworkTopologyContext;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.programming.rev131106.NetworkTopologyPcepProgrammingService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev131024.NetworkTopologyPcepService;
index 1a3aa5fa6aecf10fb7cf965f216bc0bd21e4c870..f34e78465bc17e0019091b8f51ac08f19e08026e 100644 (file)
@@ -22,9 +22,9 @@ import java.net.InetAddress;
 import java.net.InetSocketAddress;
 import java.util.concurrent.ExecutionException;
 import org.opendaylight.bgpcep.pcep.topology.provider.PCEPTopologyProvider;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
 import org.opendaylight.controller.config.yang.pcep.impl.PCEPDispatcherImplModuleMXBean;
+import org.opendaylight.tcpmd5.api.KeyMapping;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
index c5f714cfac1c7c8f94523a5ed40eccbc4a8308c3..b2e096452d4b2bf983f1ed91537e8b3638899fdf 100644 (file)
@@ -17,7 +17,6 @@ import java.util.Random;
 import javax.management.InstanceAlreadyExistsException;
 import javax.management.ObjectName;
 import org.junit.Test;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeTestSupport;
 import org.opendaylight.controller.config.api.ValidationException;
 import org.opendaylight.controller.config.api.jmx.CommitStatus;
 import org.opendaylight.controller.config.spi.ModuleFactory;
@@ -32,6 +31,7 @@ import org.opendaylight.controller.config.yang.programming.impl.AbstractInstruct
 import org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.NativeKeyAccessFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ServerChannelFactoryModuleFactory;
 import org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ServerChannelFactoryModuleMXBean;
+import org.opendaylight.tcpmd5.jni.NativeTestSupport;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.PortNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.tcpmd5.cfg.rev140427.Rfc2385Key;
index 539a47438dbd3d134848901b30900e073ff97a0f..be46b053099573a16710646ea83f11d498fb5d8a 100644 (file)
@@ -87,7 +87,7 @@
             <artifactId>sal-binding-config</artifactId>
         </dependency>
         <dependency>
-            <groupId>${project.groupId}</groupId>
+            <groupId>org.opendaylight.tcpmd5</groupId>
             <artifactId>tcpmd5-netty</artifactId>
         </dependency>
 
diff --git a/pom.xml b/pom.xml
index 4099e8b8bd875446f543a4b3d90ec00543004521..aa952acadaebeebbe7ea62e2b45f09048f2efd3e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,6 @@
         <module>programming</module>
         <module>rsvp</module>
         <module>topology</module>
-        <module>tcp-md5</module>
 
         <!-- Integration tests -->
         <module>integration-tests</module>
diff --git a/tcp-md5/.project b/tcp-md5/.project
deleted file mode 100644 (file)
index 8e91711..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<projectDescription>
-       <name>tcpmd5-parent</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/api/.project b/tcp-md5/api/.project
deleted file mode 100644 (file)
index ad146e3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2014 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<projectDescription>
-       <name>tcpmd5-api</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/api/pom.xml b/tcp-md5/api/pom.xml
deleted file mode 100644 (file)
index 03cf3c5..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>tcpmd5-parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tcpmd5-api</artifactId>
-    <description>RFC2385-enable sockets API</description>
-    <packaging>bundle</packaging>
-    <name>${project.artifactId}</name>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>jsr305</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactory.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactory.java
deleted file mode 100644 (file)
index 724eb57..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import com.google.common.base.Preconditions;
-
-import java.nio.channels.Channel;
-
-/**
- * Dummy KeyAccessFactory. This factory does not support any channels and it does not give out any KeyAccess objects.
- */
-public final class DummyKeyAccessFactory implements KeyAccessFactory {
-    private static final DummyKeyAccessFactory INSTANCE = new DummyKeyAccessFactory();
-
-    private DummyKeyAccessFactory() {
-
-    }
-
-    /**
-     * Get a DummyKeyAccessFactory instance.
-     *
-     * @return A singleton instance.
-     */
-    public static DummyKeyAccessFactory getInstance() {
-        return INSTANCE;
-    }
-
-    @Override
-    public KeyAccess getKeyAccess(final Channel channel) {
-        Preconditions.checkNotNull(channel);
-        return null;
-    }
-
-    @Override
-    public boolean canHandleChannelClass(final Class<? extends Channel> clazz) {
-        Preconditions.checkNotNull(clazz);
-        return false;
-    }
-}
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccess.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccess.java
deleted file mode 100644 (file)
index 7971670..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import java.io.IOException;
-
-import javax.annotation.Nonnull;
-
-/**
- * Interface for accessing key information attached to an object.
- */
-public interface KeyAccess {
-    /**
-     * Retrieve the key mapping.
-     *
-     * @return The key mapping currently attached.
-     * @throws IOException when the retrieve operation fails.
-     */
-    @Nonnull
-    KeyMapping getKeys() throws IOException;
-
-    /**
-     * Attach key mappings.
-     *
-     * @param keys Mappings which should
-     * @throws IOException when the set operation fails.
-     * @throws IllegalArgumentException if a key length is zero or it exceeds platform-supported length (usually 80
-     *         bytes).
-     */
-    void setKeys(@Nonnull KeyMapping keys) throws IOException;
-}
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccessFactory.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyAccessFactory.java
deleted file mode 100644 (file)
index 1651b73..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import java.nio.channels.Channel;
-
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-
-/**
- * Interface exposed by classes which can create KeyAccess instances for individual channels.
- */
-public interface KeyAccessFactory {
-    /**
-     * Obtain a KeyAccess instance for a channel.
-     *
-     * @param channel Channel instance, may not be null
-     * @return a KeyAccess instance, or null if the channel is not supported by this factory.
-     * @throws NullPointerException if channel is null
-     */
-    @Nullable
-    KeyAccess getKeyAccess(@Nonnull Channel channel);
-
-    /**
-     * Check whether a particular channel class is supported by this factory.
-     *
-     * @param clazz Channel class, may not be null
-     * @return true if the class is supported, i.e. getKeyAccess() can be expected to succeed.
-     * @throws NullPointerException if clazz is null
-     */
-    boolean canHandleChannelClass(@Nonnull Class<? extends Channel> clazz);
-}
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyMapping.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/KeyMapping.java
deleted file mode 100644 (file)
index ce558da..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class KeyMapping extends HashMap<InetAddress, byte[]> {
-    private static final long serialVersionUID = 1L;
-
-    public KeyMapping() {
-        super();
-    }
-
-    public KeyMapping(final int initialCapacity, final float loadFactor) {
-        super(initialCapacity, loadFactor);
-    }
-
-    public KeyMapping(final int initialCapacity) {
-        super(initialCapacity);
-    }
-
-    public KeyMapping(final Map<? extends InetAddress, ? extends byte[]> m) {
-        super(m);
-    }
-}
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptions.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptions.java
deleted file mode 100644 (file)
index 967d616..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import java.net.SocketOption;
-
-/**
- * Utility class holding the singleton socket options used by the TCP-MD5 support library.
- */
-public final class MD5SocketOptions {
-    /**
-     * TCP MD5 Signature option, as defined in RFC 2385.
-     */
-    public static final SocketOption<KeyMapping> TCP_MD5SIG = new SocketOption<KeyMapping>() {
-        @Override
-        public String name() {
-            return "TCP_MD5SIG";
-        }
-
-        @Override
-        public Class<KeyMapping> type() {
-            return KeyMapping.class;
-        }
-    };
-
-    private MD5SocketOptions() {
-        throw new UnsupportedOperationException("Utility class cannot be instatiated");
-    }
-}
diff --git a/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/package-info.java b/tcp-md5/api/src/main/java/org/opendaylight/bgpcep/tcpmd5/package-info.java
deleted file mode 100644 (file)
index 59f0a79..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-/**
- * Common TCP MD5 key access and manipulation API.
- */
-package org.opendaylight.bgpcep.tcpmd5;
\ No newline at end of file
diff --git a/tcp-md5/api/src/main/yang/odl-tcpmd5-cfg.yang b/tcp-md5/api/src/main/yang/odl-tcpmd5-cfg.yang
deleted file mode 100644 (file)
index d4aa49d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// vi: set smarttab et sw=4 tabstop=4:
-module odl-tcpmd5-cfg {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg";
-    prefix "tcpmd5";
-
-    import config { prefix config; revision-date 2013-04-05; }
-
-    organization "Cisco Systems, Inc.";
-
-    contact "Robert Varga <rovarga@cisco.com>";
-
-    description
-        "This module contains the base YANG definitions for
-         TCP MD5 Signature option.
-
-        Copyright (c)2014 Cisco Systems, Inc. All rights reserved.;
-
-        This program and the accompanying materials are made available
-        under the terms of the Eclipse Public License v1.0 which
-        accompanies this distribution, and is available at
-        http://www.eclipse.org/legal/epl-v10.html";
-
-    revision "2014-04-27" {
-        description
-            "Initial revision";
-    }
-
-    identity key-access-factory {
-        description
-            "Service representing a way for accessing key informtion.";
-
-        base "config:service-type";
-        config:java-class "org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory";
-    }
-
-    typedef rfc2385-key {
-        type string {
-            length 1..80;
-        }
-    }
-}
-
diff --git a/tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactoryTest.java b/tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/DummyKeyAccessFactoryTest.java
deleted file mode 100644 (file)
index 14fa3d0..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-
-import java.io.IOException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class DummyKeyAccessFactoryTest {
-    private ServerSocketChannel ssc;
-    private KeyAccessFactory kaf;
-    private SocketChannel sc;
-
-    @Before
-    public void setup() throws IOException {
-        kaf = DummyKeyAccessFactory.getInstance();
-        sc = SocketChannel.open();
-        ssc = ServerSocketChannel.open();
-    }
-
-    @After
-    public void tearDown() throws IOException {
-        sc.close();
-        ssc.close();
-    }
-
-    @Test
-    public void testCanHandleChannelClass() {
-        assertFalse(kaf.canHandleChannelClass(sc.getClass()));
-        assertFalse(kaf.canHandleChannelClass(ssc.getClass()));
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testNullCanHandleChannelClass() {
-        assertFalse(kaf.canHandleChannelClass(null));
-    }
-
-    @Test
-    public void testGetKeyAccess() {
-        assertNull(kaf.getKeyAccess(sc));
-        assertNull(kaf.getKeyAccess(ssc));
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testNullGetKeyAccess() {
-        assertNull(kaf.getKeyAccess(null));
-    }
-}
diff --git a/tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptionsTest.java b/tcp-md5/api/src/test/java/org/opendaylight/bgpcep/tcpmd5/MD5SocketOptionsTest.java
deleted file mode 100644 (file)
index 5e55560..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-public class MD5SocketOptionsTest {
-
-    @Test
-    public void testMd5SigName() {
-        assertEquals("TCP_MD5SIG", MD5SocketOptions.TCP_MD5SIG.name());
-    }
-
-    @Test
-    public void testMd5SigType() {
-        assertEquals(KeyMapping.class, MD5SocketOptions.TCP_MD5SIG.type());
-    }
-
-}
diff --git a/tcp-md5/controller-config/.project b/tcp-md5/controller-config/.project
deleted file mode 100644 (file)
index 0d8e6a4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>tcpmd5-controller-config</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/controller-config/pom.xml b/tcp-md5/controller-config/pom.xml
deleted file mode 100644 (file)
index b1697f2..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <scm>
-        <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
-        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
-        <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
-        <tag>HEAD</tag>
-    </scm>
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>tcpmd5-parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>tcpmd5-controller-config</artifactId>
-    <description>Controller Configuration files for BGP protocol</description>
-    <packaging>jar</packaging>
-    <name>${project.artifactId}</name>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-</project>
diff --git a/tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml b/tcp-md5/controller-config/src/main/resources/initial/20-tcpmd5.xml
deleted file mode 100644 (file)
index ccae2b1..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<snapshot>
-    <required-capabilities>
-        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg?module=odl-tcpmd5-cfg&amp;revision=2014-04-27</capability>
-        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg?module=odl-tcpmd5-jni-cfg&amp;revision=2014-04-27</capability>
-        <capability>urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg?module=odl-tcpmd5-netty-cfg&amp;revision=2014-04-27</capability>
-    </required-capabilities>
-
-    <configuration>
-        <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-            <!--
-                Uncomment this block to enable TCP MD5 Signature support
-
-            <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg">prefix:native-key-access-factory</type>
-                    <name>global-key-access-factory</name>
-                </module>
-
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-client-channel-factory</type>
-                    <name>md5-client-channel-factory</name>
-
-                    <key-access-factory>
-                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
-                        <name>global-key-access-factory</name>
-                    </key-access-factory>
-                </module>
-
-                <module>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory-impl</type>
-                    <name>md5-server-channel-factory</name>
-
-                    <server-key-access-factory>
-                        <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
-                        <name>global-key-access-factory</name>
-                    </server-key-access-factory>
-                </module>
-            </modules>
-
-            <services xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-                <service>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:cfg">prefix:key-access-factory</type>
-                    <instance>
-                        <name>global-key-access-factory</name>
-                        <provider>/modules/module[type='native-key-access-factory'][name='global-key-access-factory']</provider>
-                    </instance>
-                </service>
-
-                <service>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-channel-factory</type>
-                    <instance>
-                        <name>md5-client-channel-factory</name>
-                        <provider>/modules/module[type='md5-client-channel-factory'][name='md5-client-channel-factory']</provider>
-                    </instance>
-                </service>
-
-                <service>
-                    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg">prefix:md5-server-channel-factory</type>
-                    <instance>
-                        <name>md5-server-channel-factory</name>
-                        <provider>/modules/module[type='md5-server-channel-factory-impl'][name='md5-server-channel-factory']</provider>
-                    </instance>
-                </service>
-            </services>
-            -->
-        </data>
-    </configuration>
-</snapshot>
diff --git a/tcp-md5/jni/.project b/tcp-md5/jni/.project
deleted file mode 100644 (file)
index 8e7a248..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<projectDescription>
-       <name>tcpmd5-jni</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/jni/pom.xml b/tcp-md5/jni/pom.xml
deleted file mode 100644 (file)
index 7e5c78b..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>tcpmd5-parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tcpmd5-jni</artifactId>
-    <description>Native support for RFC2385-enabled TCP sockets</description>
-    <packaging>bundle</packaging>
-    <name>${project.artifactId}</name>
-
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <properties>
-        <nar.groupId>com.github.maven-nar</nar.groupId>
-        <nar.version>3.1.0</nar.version>
-        <copy.version>0.2.5</copy.version>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-
-        <!-- Testing dependencies -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                        <Include-Resource>
-                            libtcpmd5-jni.so=target/nar/tcpmd5-jni-${project.version}-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/libtcpmd5-jni-${project.version}.so,
-                            META-INF/yang=target/classes/META-INF/yang,
-                            META-INF/services=target/classes/META-INF/services
-                        </Include-Resource>
-                    </instructions>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-            </plugin>
-
-            <plugin>
-                <groupId>com.github.goldin</groupId>
-                <artifactId>copy-maven-plugin</artifactId>
-                <version>0.2.5</version>
-                <executions>
-                    <execution>
-                        <id>copy-native</id>
-                        <phase>process-classes</phase>
-                        <goals>
-                            <goal>copy</goal>
-                        </goals>
-                        <configuration>
-                            <resources>
-                                <resource>
-                                    <targetPath>${project.build.outputDirectory}</targetPath>
-                                    <file>${project.build.directory}/nar/tcpmd5-jni-${project.version}-amd64-Linux-gpp-jni/lib/amd64-Linux-gpp/jni/libtcpmd5-jni-${project.version}.so</file>
-                                    <destFileName>libtcpmd5-jni.so</destFileName>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <!-- Let eclipse know about the generated sources -->
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>generate-sources</phase>
-                        <goals>
-                            <goal>add-source</goal>
-                        </goals>
-                        <configuration>
-                            <sources>
-                                <source>target/nar/nar-generated</source>
-                            </sources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>${nar.groupId}</groupId>
-                <artifactId>nar-maven-plugin</artifactId>
-                <version>${nar.version}</version>
-                <extensions>true</extensions>
-                <configuration>
-                    <c/>
-                    <libraries>
-                        <library>
-                            <type>jni</type>
-                            <narSystemPackage>org.opendaylight.bgpcep.tcpmd5.jni</narSystemPackage>
-                            <linkCPP>false</linkCPP>
-                        </library>
-                    </libraries>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>nar-validate</goal>
-                            <goal>nar-download</goal>
-                            <goal>nar-unpack</goal>
-                            <goal>nar-assembly</goal>
-                            <goal>nar-system-generate</goal>
-                            <goal>nar-resources</goal>
-                            <goal>nar-javah</goal>
-                            <goal>nar-compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.eclipse.m2e</groupId>
-                    <artifactId>lifecycle-mapping</artifactId>
-                    <version>1.0.0</version>
-                    <configuration>
-                        <lifecycleMappingMetadata>
-                            <pluginExecutions>
-                                <pluginExecution>
-                                    <pluginExecutionFilter>
-                                        <groupId>${nar.groupId}</groupId>
-                                        <artifactId>nar-maven-plugin</artifactId>
-                                        <versionRange>${nar.version}</versionRange>
-                                        <goals>
-                                            <goal>nar-assembly</goal>
-                                            <goal>nar-compile</goal>
-                                            <goal>nar-download</goal>
-                                            <goal>nar-gnu-configure</goal>
-                                            <goal>nar-gnu-make</goal>
-                                            <goal>nar-gnu-process</goal>
-                                            <goal>nar-gnu-resources</goal>
-                                            <goal>nar-javah</goal>
-                                            <goal>nar-process-libraries</goal>
-                                            <goal>nar-resources</goal>
-                                            <goal>nar-system-generate</goal>
-                                            <goal>nar-testCompile</goal>
-                                            <goal>nar-testDownload</goal>
-                                            <goal>nar-testUnpack</goal>
-                                            <goal>nar-unpack</goal>
-                                            <goal>nar-validate</goal>
-                                            <goal>nar-vcproj</goal>
-                                        </goals>
-                                    </pluginExecutionFilter>
-                                    <action>
-                                        <execute/>
-                                    </action>
-                                </pluginExecution>
-                                <pluginExecution>
-                                    <pluginExecutionFilter>
-                                        <groupId>com.github.goldin</groupId>
-                                        <artifactId>copy-maven-plugin</artifactId>
-                                        <versionRange>${copy.version}</versionRange>
-                                        <goals>
-                                            <goal>copy</goal>
-                                        </goals>
-                                    </pluginExecutionFilter>
-                                    <action>
-                                        <execute/>
-                                    </action>
-                                </pluginExecution>
-                            </pluginExecutions>
-                        </lifecycleMappingMetadata>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-</project>
diff --git a/tcp-md5/jni/src/main/c/tcpmd5_jni.c b/tcp-md5/jni/src/main/c/tcpmd5_jni.c
deleted file mode 100644 (file)
index 63f4296..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-#include <org_opendaylight_bgpcep_tcpmd5_jni_NarSystem.h>
-#include <org_opendaylight_bgpcep_tcpmd5_jni_NativeKeyAccess.h>
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <linux/tcp.h>
-
-struct handler {
-       jclass   clazz;
-       jfieldID field;
-};
-
-static struct handler *handlers = NULL;
-static unsigned handler_count = 0;
-static jclass illegal_argument = NULL;
-static jclass illegal_state = NULL;
-static jclass io = NULL;
-
-static void __attribute__ ((format (printf, 3, 4))) jni_exception(JNIEnv *env, jclass clazz, const char *fmt, ...)
-{
-       char buf[1024] = "";
-       va_list ap;
-
-       va_start(ap, fmt);
-       vsnprintf(buf, sizeof(buf), fmt, ap);
-       va_end(ap);
-
-       (*env)->ThrowNew(env, clazz, buf);
-}
-
-#define ILLEGAL_ARGUMENT(...) jni_exception(env, illegal_argument, __VA_ARGS__)
-#define ILLEGAL_STATE(...) jni_exception(env, illegal_state, __VA_ARGS__)
-#define IO(...) jni_exception(env, io, __VA_ARGS__)
-
-static void __attribute__ ((format (printf, 3, 4))) log_message(JNIEnv *env, jobject logger, const char *fmt, ...)
-{
-       va_list ap;
-       va_start(ap, fmt);
-       vfprintf(stderr, fmt, ap);
-       va_end(ap);
-}
-
-#define ERROR(...) log_message(env, logger, __VA_ARGS__)
-#define WARN(...) log_message(env, logger, __VA_ARGS__)
-
-static const struct handler *add_handler(JNIEnv *env, jobject logger, const char *name, const char *field, const char *sig)
-{
-       // Find the class
-       const jclass clazz = (*env)->FindClass(env, name);
-       if (clazz == NULL) {
-               goto out;
-       }
-
-       // Find the field
-       const jfieldID fid = (*env)->GetFieldID(env, clazz, field, sig);
-       if (fid == NULL) {
-               goto out_clazz;
-       }
-
-       // Reallocate the array
-       struct handler *r = realloc(handlers, (handler_count + 1) * sizeof(struct handler));
-       if (r == NULL) {
-               ERROR("Failed to allocate handler: %s", strerror(errno));
-               goto out_clazz;
-       }
-       handlers = r;
-
-       // Fill the array
-       struct handler *ret = handlers + handler_count;
-       ret->clazz = (*env)->NewGlobalRef(env, clazz);
-       ret->field = fid;
-
-       if (ret->clazz == NULL) {
-               goto out_clazz;
-       }
-
-       handler_count += 1;
-       (*env)->DeleteLocalRef(env, clazz);
-       return ret;
-
-out_clazz:
-       (*env)->DeleteLocalRef(env, clazz);
-out:
-       (*env)->ExceptionDescribe(env);
-       (*env)->ExceptionClear(env);
-       return NULL;
-}
-
-static const struct handler *find_handler(JNIEnv *env, jclass clazz)
-{
-       if (clazz != NULL) {
-               unsigned i;
-
-               for (i = 0; i < handler_count; ++i) {
-                       const struct handler *h = handlers + i;
-                       if ((*env)->IsAssignableFrom(env, clazz, h->clazz) == JNI_TRUE) {
-                               return h;
-                       }
-               }
-       }
-
-       return NULL;
-}
-
-static jclass resolve_class(JNIEnv *env, const char *what, jclass *where)
-{
-       if (*where == NULL) {
-               jclass clazz = (*env)->FindClass(env, what);
-               if (clazz == NULL) {
-                       return NULL;
-               }
-
-               jclass ref = (*env)->NewGlobalRef(env, clazz);
-               (*env)->DeleteLocalRef(env, clazz);
-               if (ref == NULL) {
-                       return NULL;
-               }
-
-               *where = ref;
-               return ref;
-       } else {
-               return *where;
-       }
-}
-
-static void native_error(JNIEnv *env, const char *what, int err)
-{
-       char buf[256] = "";
-       strerror_r(err, buf, sizeof(buf));
-       IO("Native operation %s failed: %s", what, buf);
-}
-
-static int resolve_exceptions(JNIEnv *env)
-{
-       // First resolve Exception classes, these are mandatory
-       if (resolve_class(env, "java/lang/IllegalStateException", &illegal_state) == NULL) {
-               fprintf(stderr, "Failed to resolve java.lang.IllegalStateException\n");
-               return 1;
-       }
-       if (resolve_class(env, "java/lang/IllegalArgumentException", &illegal_argument) == NULL) {
-               fprintf(stderr, "Failed to resolve java.lang.IllegalArgumentException\n");
-               return 1;
-       }
-       if (resolve_class(env, "java/io/IOException", &io) == NULL) {
-               fprintf(stderr, "Failed to resolve java.io.IOException\n");
-               return 1;
-       }
-
-       return 0;
-}
-
-static jobject resolve_logging(JNIEnv *env, jclass clazz)
-{
-       jclass lf = (*env)->FindClass(env, "org/slf4j/LoggerFactory");
-       if (lf != NULL) {
-               jmethodID mid = (*env)->GetStaticMethodID(env, lf, "getLogger", "(Ljava/lang/Class;)Lorg/slf4j/Logger;");
-               if (mid != NULL) {
-                       return (*env)->CallStaticObjectMethod(env, lf, mid, clazz);
-               }
-       }
-
-       return NULL;
-}
-
-static jint sanity_check(JNIEnv *env, jobject logger)
-{
-       struct tcp_md5sig md5sig = {
-               .tcpm_addr = {
-                       .ss_family = AF_INET,
-               },
-       };
-
-       // Sanity-check maximum key size against the structure
-       if (TCP_MD5SIG_MAXKEYLEN > sizeof(md5sig.tcpm_key)) {
-               ERROR("Structure key size %zu is less than %d", sizeof(md5sig.tcpm_key), TCP_MD5SIG_MAXKEYLEN);
-               return -1;
-       }
-
-       // Now run a quick check to see if we can really the getsockopt/setsockopt calls are
-       // supported.
-       const int fd = socket(AF_INET, SOCK_STREAM, 0);
-       if (fd == -1) {
-               ERROR("Failed to open a socket for sanity tests: %s", strerror(errno));
-               return -1;
-       }
-
-       // Attempt to set a new key with maximum size
-       md5sig.tcpm_keylen = TCP_MD5SIG_MAXKEYLEN;
-       if (setsockopt(fd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig)) != 0) {
-               ERROR("Failed to set TCP_MD5SIG option: %s", strerror(errno));
-               close(fd);
-               return -1;
-       }
-
-       // Attempt to remove the key
-       md5sig.tcpm_keylen = 0;
-       if (setsockopt(fd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig)) != 0) {
-               ERROR("Failed to clear TCP_MD5SIG option: %s", strerror(errno));
-               close(fd);
-               return -1;
-       }
-
-       // All done
-       close(fd);
-       return 0;
-}
-
-/*
- * Class:     org_opendaylight_bgpcep_tcpmd5_jni_NarSystem
- * Method:    runUnitTestsNative
- * Signature: ()I
- */
-jint Java_org_opendaylight_bgpcep_tcpmd5_jni_NarSystem_runUnitTestsNative(JNIEnv *env, jobject obj)
-{
-       if (resolve_exceptions(env)) {
-               return 0;
-       }
-
-       jobject logger = resolve_logging(env, (*env)->GetObjectClass(env, obj));
-       if (sanity_check(env, logger)) {
-               return 0;
-       }
-
-       int ret = 0;
-       if (add_handler(env, logger, "sun/nio/ch/ServerSocketChannelImpl", "fdVal", "I")) {
-               ++ret;
-       }
-       if (add_handler(env, logger, "sun/nio/ch/SocketChannelImpl", "fdVal", "I")) {
-               ++ret;
-       }
-
-       return ret;
-}
-
-/*
- * Class:     org_opendaylight_bgpcep_tcpmd5_jni_NativeKeyAccess
- * Method:    isClassSupported0
- * Signature: (Ljava/lang/Class;)Z
- */
-jboolean Java_org_opendaylight_bgpcep_tcpmd5_jni_NativeKeyAccess_isClassSupported0(JNIEnv *env, jclass clazz, jclass arg)
-{
-       const struct handler *h = find_handler(env, arg);
-       return h == NULL ? JNI_FALSE : JNI_TRUE;
-}
-
-/*
- * Class:     org_opendaylight_bgpcep_tcpmd5_jni_NativeKeyAccess
- * Method:    setChannelKey0
- * Signature: (Ljava/nio/channels/Channel;[B)V
- */
-void Java_org_opendaylight_bgpcep_tcpmd5_jni_NativeKeyAccess_setChannelKey0(JNIEnv *env, jclass clazz, jobject channel, jbyteArray address, jbyteArray key)
-{
-       if (address == NULL) {
-               ILLEGAL_ARGUMENT("Address may not be null");
-               return;
-       }
-       if (channel == NULL) {
-               ILLEGAL_ARGUMENT("Channel may not be null");
-               return;
-       }
-
-       const jsize addrlen = (*env)->GetArrayLength(env, address);
-       if (addrlen != 4 && addrlen != 16) {
-               ILLEGAL_ARGUMENT("Unsupported address length %d", addrlen);
-               return;
-       }
-
-       jsize keylen = 0;
-       if (key != NULL) {
-               keylen = (*env)->GetArrayLength(env, key);
-               if (keylen <= 0) {
-                       ILLEGAL_ARGUMENT("Negative array length %d encountered", keylen);
-                       return;
-               }
-               if (keylen > TCP_MD5SIG_MAXKEYLEN) {
-                       ILLEGAL_ARGUMENT("Key length %d exceeds platform limit %d", keylen, TCP_MD5SIG_MAXKEYLEN);
-                       return;
-               }
-       }
-
-       struct tcp_md5sig md5sig;
-       memset(&md5sig, 0, sizeof(md5sig));
-       md5sig.tcpm_keylen = (uint16_t) keylen;
-
-       /*
-        * TCP_MD5SIG_MAXKEYLEN may not be an accurate check of key field
-        * length. Check the field size before accessing it.
-        */
-       if (keylen > sizeof(md5sig.tcpm_key)) {
-               ILLEGAL_ARGUMENT("Key length %d exceeds native buffer limit %zu", keylen, sizeof(md5sig.tcpm_key));
-               return;
-       }
-
-       if (keylen != 0) {
-               (*env)->GetByteArrayRegion(env, key, 0, keylen, (void *) &md5sig.tcpm_key);
-               if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-                       return;
-               }
-       }
-
-       const struct handler *h = find_handler(env, (*env)->GetObjectClass(env, channel));
-       if (h == NULL) {
-               ILLEGAL_STATE("Failed to find handler");
-               return;
-       }
-
-       const jint fd = (*env)->GetIntField(env, channel, h->field);
-       if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-               return;
-       }
-
-       struct sockaddr_storage ss;
-       memset(&ss, 0, sizeof(ss));
-
-       socklen_t ssl = sizeof(ss);
-       if (getsockname(fd, (struct sockaddr *)&ss, &ssl) == -1) {
-               native_error(env, "getsockname", errno);
-               return;
-       }
-
-       /*
-        * Fill out the address.
-        */
-       md5sig.tcpm_addr.ss_family = ss.ss_family;
-       void *dest = NULL;
-
-       switch (ss.ss_family) {
-       case AF_INET:
-               switch (addrlen) {
-               case 4:
-                       // IPv4 dest in IPv4 socket
-                       dest = &((struct sockaddr_in *)&md5sig.tcpm_addr)->sin_addr;
-                       break;
-               case 16:
-                       // IPv6 dest in IPv4 socket
-                       ILLEGAL_ARGUMENT("Invalid IPv6 address for IPv4 socket");
-                       return;
-               default:
-                       // Ugh?
-                       ILLEGAL_STATE("Unexpected address length %d", addrlen);
-                       return;
-               }
-               break;
-       case AF_INET6:
-               switch (addrlen) {
-               case 4:
-                       {
-                               // IPv4 dest in IPv4 socket, we need to create a mapped address.
-                               struct in6_addr *a = &((struct sockaddr_in6 *)&md5sig.tcpm_addr)->sin6_addr;
-
-                               a->s6_addr[10] = 0xFF;
-                               a->s6_addr[11] = 0xFF;
-                               dest = a->s6_addr + 12;
-                               break;
-                       }
-               case 16:
-                       // IPv6 dest in IPv6 socket
-                       dest = &((struct sockaddr_in6 *)&md5sig.tcpm_addr)->sin6_addr;
-                       return;
-               default:
-                       ILLEGAL_STATE("Unexpected address length %d", addrlen);
-                       return;
-               }
-               break;
-       default:
-               ILLEGAL_STATE("Unexpected address family %d", ss.ss_family);
-               return;
-       }
-
-       (*env)->GetByteArrayRegion(env, address, 0, addrlen, dest);
-       if ((*env)->ExceptionCheck(env) == JNI_TRUE) {
-               return;
-       }
-
-       if (setsockopt(fd, IPPROTO_TCP, TCP_MD5SIG, &md5sig, sizeof(md5sig)) == -1) {
-               native_error(env, "setsockopt", errno);
-       }
-}
-
diff --git a/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccess.java b/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccess.java
deleted file mode 100644 (file)
index 481fcde..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import com.google.common.base.Preconditions;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.nio.channels.Channel;
-import java.util.Arrays;
-import java.util.Map.Entry;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Implementation of KeyAccess using Java Native Interface plugin to talk directly to the underlying operating system.
- */
-final class NativeKeyAccess implements KeyAccess {
-    private static final Logger LOG = LoggerFactory.getLogger(NativeKeyAccess.class);
-
-    private static native void setChannelKey0(Channel channel, byte[] address, byte[] key) throws IOException;
-
-    static native boolean isClassSupported0(Class<?> channel);
-
-    private KeyMapping currentKeys = new KeyMapping();
-    private final Channel channel;
-
-    NativeKeyAccess(final Channel channel) {
-        this.channel = Preconditions.checkNotNull(channel);
-    }
-
-    @Override
-    public void setKeys(final KeyMapping keys) throws IOException {
-        for (Entry<InetAddress, byte[]> e : keys.entrySet()) {
-            Preconditions.checkArgument(e.getKey() != null, "Null address is not allowed");
-            Preconditions.checkArgument(e.getValue() != null, "Key for address %s is null", e.getKey());
-            Preconditions.checkArgument(e.getValue().length != 0, "Key for address %s is empty", e.getKey());
-        }
-
-        synchronized (this) {
-            // Walk current keys and delete any that are not in the new map
-            for (Entry<InetAddress, byte[]> e : currentKeys.entrySet()) {
-                if (!keys.containsKey(e.getKey())) {
-                    LOG.debug("Channel {} removing key for address {}", channel, e.getKey());
-                    setChannelKey0(channel, e.getKey().getAddress(), null);
-                }
-            }
-
-            for (Entry<InetAddress, byte[]> e : keys.entrySet()) {
-                final byte[] currentValue = currentKeys.get(e.getKey());
-                if (!Arrays.equals(currentValue, e.getValue())) {
-                    LOG.debug("Channel {} adding key for address {}", channel, e.getKey());
-                    setChannelKey0(channel, e.getKey().getAddress(), e.getValue());
-                }
-            }
-
-            this.currentKeys = new KeyMapping(keys);
-            LOG.debug("Channel {} key mapping update completed", channel);
-        }
-    }
-
-    @Override
-    public synchronized KeyMapping getKeys() {
-        return currentKeys;
-    }
-}
diff --git a/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccessFactory.java b/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeKeyAccessFactory.java
deleted file mode 100644 (file)
index 9a9c4bb..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import com.google.common.base.Preconditions;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.channels.Channel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
-import java.nio.file.attribute.PosixFilePermission;
-import java.nio.file.attribute.PosixFilePermissions;
-import java.util.Map;
-import java.util.Set;
-import java.util.WeakHashMap;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class NativeKeyAccessFactory implements KeyAccessFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(NativeKeyAccessFactory.class);
-    private static final String LIBNAME = "libtcpmd5-jni.so";
-    private static NativeKeyAccessFactory INSTANCE = null;
-
-    private final Map<Channel, KeyAccess> channels = new WeakHashMap<>();
-
-    private NativeKeyAccessFactory() {
-
-    }
-
-    /**
-     * Get the singleton instance.
-     *
-     * @return Singleton service instance.
-     * @throws NativeSupportUnavailableException if run-time does not support the functions needed to instantiate an
-     *         operational factory.
-     */
-    public static NativeKeyAccessFactory getInstance() throws NativeSupportUnavailableException {
-        if (INSTANCE != null) {
-            return INSTANCE;
-        }
-
-        synchronized (NativeKeyAccessFactory.class) {
-            if (INSTANCE == null) {
-                try {
-                    loadLibrary();
-                } catch (IOException | RuntimeException e) {
-                    throw new NativeSupportUnavailableException("Failed to load library", e);
-                }
-
-                int rt = NarSystem.runUnitTests();
-                if (rt == 0) {
-                    throw new NativeSupportUnavailableException("Run-time does not support required functionality");
-                }
-
-                LOG.debug("Run-time found {} supported channel classes", rt);
-                INSTANCE = new NativeKeyAccessFactory();
-            }
-            return INSTANCE;
-        }
-    }
-
-    @Override
-    public KeyAccess getKeyAccess(final Channel channel) {
-        if (!NativeKeyAccess.isClassSupported0(channel.getClass())) {
-            LOG.debug("No support available for class {}", channel.getClass());
-            return null;
-        }
-
-        synchronized (channels) {
-            KeyAccess e = channels.get(channel);
-            if (e == null) {
-                e = new NativeKeyAccess(channel);
-                channels.put(channel, e);
-            }
-
-            return e;
-        }
-    }
-
-    @Override
-    public boolean canHandleChannelClass(final Class<? extends Channel> clazz) {
-        if (!NativeKeyAccess.isClassSupported0(Preconditions.checkNotNull(clazz))) {
-            LOG.debug("No support available for class {}", clazz);
-            return false;
-        }
-
-        return true;
-    }
-
-    private static void loadLibrary() throws IOException {
-        final InputStream is = NativeKeyAccessFactory.class.getResourceAsStream('/' + LIBNAME);
-        if (is == null) {
-            throw new IOException(String.format("Failed to open library resource %s", LIBNAME));
-        }
-
-        try {
-            final Set<PosixFilePermission> perms = PosixFilePermissions.fromString("rwxr-x---");
-            final Path p = Files.createTempFile(LIBNAME, null, PosixFilePermissions.asFileAttribute(perms));
-
-            try {
-                LOG.debug("Copying {} to {}", is, p);
-
-                Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
-
-                Runtime.getRuntime().load(p.toString());
-                LOG.info("Library {} loaded", p);
-            } finally {
-                try {
-                    Files.deleteIfExists(p);
-                } catch (IOException e) {
-                    LOG.warn("Failed to remove temporary file {}", p, e);
-                }
-            }
-        } finally {
-            try {
-                is.close();
-            } catch (IOException e) {
-                LOG.warn("Failed to close library input stream", e);
-            }
-        }
-    }
-}
diff --git a/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeSupportUnavailableException.java b/tcp-md5/jni/src/main/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeSupportUnavailableException.java
deleted file mode 100644 (file)
index e424d98..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import java.io.IOException;
-
-/**
- * Exception thrown when the runtime platform or underlying operating system cannot support native key access.
- */
-public final class NativeSupportUnavailableException extends IOException {
-    private static final long serialVersionUID = 1L;
-
-    public NativeSupportUnavailableException(final String message, final Throwable cause) {
-        super(message, cause);
-    }
-
-    public NativeSupportUnavailableException(final String message) {
-        super(message);
-    }
-}
diff --git a/tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModule.java b/tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModule.java
deleted file mode 100644 (file)
index 8b77318..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.jni.cfg;
-
-import java.nio.channels.Channel;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeKeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeSupportUnavailableException;
-
-/**
- * Service representing a way for accessing key informtion.
- */
-public class NativeKeyAccessFactoryModule extends
-        org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.AbstractNativeKeyAccessFactoryModule {
-    private KeyAccessFactory kaf;
-
-    public NativeKeyAccessFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public NativeKeyAccessFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.NativeKeyAccessFactoryModule oldModule,
-            final java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        try {
-            kaf = NativeKeyAccessFactory.getInstance();
-        } catch (NativeSupportUnavailableException e) {
-            throw new UnsupportedOperationException("Native support is not available", e);
-        }
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final KeyAccessFactory kaf = this.kaf;
-
-        final class CloseableNativeKeyAccessFactory implements AutoCloseable, KeyAccessFactory {
-            @Override
-            public KeyAccess getKeyAccess(final Channel channel) {
-                return kaf.getKeyAccess(channel);
-            }
-
-            @Override
-            public boolean canHandleChannelClass(final Class<? extends Channel> clazz) {
-                return kaf.canHandleChannelClass(clazz);
-            }
-
-            @Override
-            public void close() {
-                // Nothing to do
-            }
-        }
-
-        return new CloseableNativeKeyAccessFactory();
-    }
-}
diff --git a/tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModuleFactory.java b/tcp-md5/jni/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/jni/cfg/NativeKeyAccessFactoryModuleFactory.java
deleted file mode 100644 (file)
index 9509fa2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.jni.cfg;
-
-public class NativeKeyAccessFactoryModuleFactory extends
-        org.opendaylight.controller.config.yang.tcpmd5.jni.cfg.AbstractNativeKeyAccessFactoryModuleFactory {
-
-}
diff --git a/tcp-md5/jni/src/main/yang/odl-tcpmd5-jni-cfg.yang b/tcp-md5/jni/src/main/yang/odl-tcpmd5-jni-cfg.yang
deleted file mode 100644 (file)
index 6404ad7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// vi: set smarttab et sw=4 tabstop=4:
-module odl-tcpmd5-jni-cfg {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:jni:cfg";
-    prefix "jni";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
-
-    organization "Cisco Systems, Inc.";
-
-    contact "Robert Varga <rovarga@cisco.com>";
-
-    description
-        "This module contains the base YANG definitions for
-         TCP MD5 Signature option.
-
-        Copyright (c)2014 Cisco Systems, Inc. All rights reserved.;
-
-        This program and the accompanying materials are made available
-        under the terms of the Eclipse Public License v1.0 which
-        accompanies this distribution, and is available at
-        http://www.eclipse.org/legal/epl-v10.html";
-
-    revision "2014-04-27" {
-        description
-            "Initial revision";
-    }
-
-    identity native-key-access-factory {
-        description
-            "Service representing a way for accessing key informtion.";
-
-        base config:module-type;
-        config:provided-service tcpmd5:key-access-factory;
-        config:java-name-prefix NativeKeyAccessFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case native-key-access-factory {
-            when "/config:modules/config:module/config:type = 'native-key-access-factory'";
-        }
-    }
-}
-
diff --git a/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/BasicNativeKeyAccessTest.java b/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/BasicNativeKeyAccessTest.java
deleted file mode 100644 (file)
index 112ec9a..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.nio.channels.Channel;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.Collections;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BasicNativeKeyAccessTest {
-    private static final Logger LOG = LoggerFactory.getLogger(BasicNativeKeyAccessTest.class);
-    private static final byte[] KEY1 = new byte[] { 1 };
-    private static final byte[] KEY2 = new byte[] { 2, 3 };
-
-    private KeyAccessFactory factory;
-    private Channel channel;
-
-    private void testKeyManipulation(final Channel c) throws IOException {
-        assertTrue(factory.canHandleChannelClass(c.getClass()));
-
-        final KeyAccess ka = factory.getKeyAccess(c);
-        assertEquals(Collections.emptyMap(), ka.getKeys());
-
-        final KeyMapping key1 = new KeyMapping();
-        key1.put(InetAddress.getLocalHost(), KEY1);
-        LOG.debug("Setting key {}", KEY1);
-        ka.setKeys(key1);
-        assertEquals(key1, ka.getKeys());
-
-        final KeyMapping key2 = new KeyMapping();
-        key2.put(InetAddress.getLocalHost(), KEY2);
-        LOG.debug("Setting key {}", KEY2);
-        ka.setKeys(key2);
-        assertEquals(key2, ka.getKeys());
-
-        LOG.debug("Deleting keys");
-        ka.setKeys(new KeyMapping());
-        assertEquals(Collections.emptyMap(), ka.getKeys());
-    }
-
-    @Before
-    public void setup() throws IOException {
-        factory = NativeKeyAccessFactory.getInstance();
-        channel = SocketChannel.open();
-    }
-
-    @After
-    public void teardown() throws IOException {
-        channel.close();
-    }
-
-    @Test
-    public void testSocket() throws IOException {
-        testKeyManipulation(channel);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testNullChannel() {
-        factory.getKeyAccess(null);
-    }
-
-    @Test(expected = NullPointerException.class)
-    public void testNullClass() {
-        factory.canHandleChannelClass(null);
-    }
-
-    @Test
-    public void testServerSocket() throws IOException {
-        try (final ServerSocketChannel ssc = ServerSocketChannel.open()) {
-            testKeyManipulation(ssc);
-        }
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testShortKey() throws IOException {
-        final KeyAccess ka = factory.getKeyAccess(channel);
-
-        final KeyMapping map = new KeyMapping();
-        map.put(InetAddress.getLocalHost(), new byte[0]);
-        ka.setKeys(map);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testLongKey() throws IOException {
-        final KeyAccess ka = factory.getKeyAccess(channel);
-        final KeyMapping map = new KeyMapping();
-        map.put(InetAddress.getLocalHost(), new byte[81]);
-        ka.setKeys(map);
-    }
-}
diff --git a/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/ConnectivityNativeKeyAccessTest.java b/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/ConnectivityNativeKeyAccessTest.java
deleted file mode 100644 (file)
index e6794cb..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketTimeoutException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ConnectivityNativeKeyAccessTest {
-    private static final Logger LOG = LoggerFactory.getLogger(ConnectivityNativeKeyAccessTest.class);
-    private static final byte[] KEY1 = new byte[] { 1 };
-    private static final byte[] KEY2 = new byte[] { 2, 3 };
-
-    private KeyAccessFactory factory;
-    private Thread serverThread;
-    private InetAddress address;
-    private int port;
-    private AtomicReference<SocketChannel> serverClient;
-
-    @Before
-    public void setup() throws IOException {
-        factory = NativeKeyAccessFactory.getInstance();
-        address = InetAddress.getLoopbackAddress();
-        serverClient = new AtomicReference<>();
-
-        final ServerSocketChannel sc = ServerSocketChannel.open();
-        LOG.debug("Instatiated server {}", sc);
-
-        final KeyAccess ka = factory.getKeyAccess(sc);
-        final KeyMapping map = new KeyMapping();
-        map.put(address, KEY1);
-        ka.setKeys(map);
-        LOG.debug("Server got key {}", KEY1);
-
-        sc.bind(new InetSocketAddress(address, 0));
-        port = ((InetSocketAddress) sc.getLocalAddress()).getPort();
-        LOG.debug("Server bound to port {}", port);
-
-        serverThread = new Thread(new Runnable() {
-            @Override
-            public void run() {
-                LOG.debug("Server thread started");
-                try {
-                    SocketChannel s = sc.accept();
-                    LOG.debug("Accepted channel {}", s);
-                    serverClient.set(s);
-                } catch (IOException e) {
-                    LOG.debug("Failed to accept connection", e);
-                }
-            }
-        });
-        serverThread.start();
-    }
-
-    @After
-    public void teardown() throws InterruptedException {
-        serverThread.interrupt();
-        serverThread.join();
-    }
-
-    @Test(timeout = 2000)
-    public void testMatchingKey() throws IOException {
-        try (final SocketChannel c = SocketChannel.open()) {
-            final KeyAccess ka = factory.getKeyAccess(c);
-            final KeyMapping map = new KeyMapping();
-            map.put(address, KEY1);
-            ka.setKeys(map);
-
-            c.connect(new InetSocketAddress(address, port));
-            assertTrue(c.isConnected());
-        }
-    }
-
-    @Test(timeout = 5000, expected = SocketTimeoutException.class)
-    public void testMisatchedKey() throws IOException {
-        try (final SocketChannel c = SocketChannel.open()) {
-            final KeyAccess ka = factory.getKeyAccess(c);
-            final KeyMapping map = new KeyMapping();
-            map.put(address, KEY2);
-            ka.setKeys(map);
-
-            c.socket().connect(new InetSocketAddress(address, port), 2000);
-            assertFalse(c.isConnected());
-        }
-    }
-}
diff --git a/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeTestSupport.java b/tcp-md5/jni/src/test/java/org/opendaylight/bgpcep/tcpmd5/jni/NativeTestSupport.java
deleted file mode 100644 (file)
index c4c3d8e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.bgpcep.tcpmd5.jni;
-
-import org.junit.Assume;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NativeTestSupport {
-    private static final Logger LOG = LoggerFactory.getLogger(NativeTestSupport.class);
-
-    public static void assumeSupportedPlatform() {
-        try {
-            NativeKeyAccessFactory.getInstance();
-        }catch (NativeSupportUnavailableException e) {
-            LOG.info("Skipping test, this platform is not supported");
-            Assume.assumeNoException(e);
-        }
-    }
-}
diff --git a/tcp-md5/netty/.project b/tcp-md5/netty/.project
deleted file mode 100644 (file)
index 089a55a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<projectDescription>
-       <name>tcpmd5-netty</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/netty/pom.xml b/tcp-md5/netty/pom.xml
deleted file mode 100644 (file)
index 358b88c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>tcpmd5-parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tcpmd5-netty</artifactId>
-    <description>RFC2385-enable sockets for Netty</description>
-    <packaging>bundle</packaging>
-    <name>${project.artifactId}</name>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-transport</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>config-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>netty-config-api</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.opendaylight.yangtools</groupId>
-                <artifactId>yang-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5ServerSocketChannelConfig.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5ServerSocketChannelConfig.java
deleted file mode 100644 (file)
index 4f6c6f6..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2014 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.buffer.ByteBufAllocator;
-import io.netty.channel.ChannelOption;
-import io.netty.channel.MessageSizeEstimator;
-import io.netty.channel.RecvByteBufAllocator;
-import io.netty.channel.socket.DefaultServerSocketChannelConfig;
-
-import java.util.Map;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-public class DefaultMD5ServerSocketChannelConfig extends DefaultServerSocketChannelConfig implements MD5ServerSocketChannelConfig {
-    private final NettyKeyAccess keyAccess;
-
-    public DefaultMD5ServerSocketChannelConfig(final MD5NioServerSocketChannel channel, final KeyAccessFactory keyAccessFactory) {
-        super(channel, channel.javaChannel().socket());
-        this.keyAccess = NettyKeyAccess.create(keyAccessFactory, channel.javaChannel());
-    }
-
-    @Override
-    public KeyMapping getMD5SignatureKeys() {
-        return keyAccess.getKeys();
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setMD5SignatureKeys(final KeyMapping keys) {
-        keyAccess.setKeys(keys);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setBacklog(final int backlog) {
-        super.setBacklog(backlog);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setReuseAddress(final boolean reuseAddress) {
-        super.setReuseAddress(reuseAddress);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setReceiveBufferSize(final int receiveBufferSize) {
-        super.setReceiveBufferSize(receiveBufferSize);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setPerformancePreferences(final int connectionTime, final int latency, final int bandwidth) {
-        super.setPerformancePreferences(connectionTime, latency, bandwidth);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setConnectTimeoutMillis(final int connectTimeoutMillis) {
-        super.setConnectTimeoutMillis(connectTimeoutMillis);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setMaxMessagesPerRead(final int maxMessagesPerRead) {
-        super.setMaxMessagesPerRead(maxMessagesPerRead);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setWriteSpinCount(final int writeSpinCount) {
-        super.setWriteSpinCount(writeSpinCount);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setAllocator(final ByteBufAllocator allocator) {
-        super.setAllocator(allocator);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setRecvByteBufAllocator(final RecvByteBufAllocator allocator) {
-        super.setRecvByteBufAllocator(allocator);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setAutoRead(final boolean autoRead) {
-        super.setAutoRead(autoRead);
-        return this;
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig setMessageSizeEstimator(final MessageSizeEstimator estimator) {
-        super.setMessageSizeEstimator(estimator);
-        return this;
-    }
-
-    @Override
-    public Map<ChannelOption<?>, Object> getOptions() {
-        final Map<ChannelOption<?>, Object> opts = super.getOptions();
-        final KeyMapping keys = keyAccess.getKeys();
-        if (keys != null) {
-            opts.put(MD5ChannelOption.TCP_MD5SIG, keys);
-        }
-
-        return opts;
-    }
-
-    @Override
-    public boolean setOptions(final Map<ChannelOption<?>, ?> options) {
-        boolean setAllOptions = true;
-        if (options.containsKey(MD5ChannelOption.TCP_MD5SIG)) {
-            setAllOptions = setOption(MD5ChannelOption.TCP_MD5SIG, (KeyMapping) options.get(MD5ChannelOption.TCP_MD5SIG));
-        }
-
-        return super.setOptions(options) && setAllOptions;
-    }
-
-    @Override
-    public <T> T getOption(final ChannelOption<T> option) {
-        if (option == MD5ChannelOption.TCP_MD5SIG) {
-            @SuppressWarnings("unchecked")
-            final T ret = (T) keyAccess.getKeys();
-            return ret;
-        }
-
-        return super.getOption(option);
-    }
-
-    @Override
-    public <T> boolean setOption(final ChannelOption<T> option, final T value) {
-        if (option == MD5ChannelOption.TCP_MD5SIG) {
-            keyAccess.setKeys((KeyMapping) value);
-            return true;
-        }
-
-        return super.setOption(option, value);
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5SocketChannelConfig.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/DefaultMD5SocketChannelConfig.java
deleted file mode 100644 (file)
index 9aa4558..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2014 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.buffer.ByteBufAllocator;
-import io.netty.channel.ChannelOption;
-import io.netty.channel.MessageSizeEstimator;
-import io.netty.channel.RecvByteBufAllocator;
-import io.netty.channel.socket.DefaultSocketChannelConfig;
-
-import java.util.Map;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-public class DefaultMD5SocketChannelConfig extends DefaultSocketChannelConfig implements MD5SocketChannelConfig {
-    private final NettyKeyAccess keyAccess;
-
-    public DefaultMD5SocketChannelConfig(final MD5NioSocketChannel channel, final KeyAccessFactory keyAccessFactory) {
-        super(channel, channel.javaChannel().socket());
-        this.keyAccess = NettyKeyAccess.create(keyAccessFactory, channel.javaChannel());
-    }
-
-    @Override
-    public KeyMapping getMD5SignatureKeys() {
-        return keyAccess.getKeys();
-    }
-
-    @Override
-    public MD5SocketChannelConfig setMD5SignatureKeys(final KeyMapping keys) {
-        keyAccess.setKeys(keys);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setTcpNoDelay(final boolean tcpNoDelay) {
-        super.setTcpNoDelay(tcpNoDelay);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setSoLinger(final int soLinger) {
-        super.setSoLinger(soLinger);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setSendBufferSize(final int sendBufferSize) {
-        super.setSendBufferSize(sendBufferSize);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setReceiveBufferSize(final int receiveBufferSize) {
-        super.setReceiveBufferSize(receiveBufferSize);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setKeepAlive(final boolean keepAlive) {
-        super.setKeepAlive(keepAlive);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setTrafficClass(final int trafficClass) {
-        super.setTrafficClass(trafficClass);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setReuseAddress(final boolean reuseAddress) {
-        super.setReuseAddress(reuseAddress);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setPerformancePreferences(final int connectionTime, final int latency, final int bandwidth) {
-        super.setPerformancePreferences(connectionTime, latency, bandwidth);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setAllowHalfClosure(final boolean allowHalfClosure) {
-        super.setAllowHalfClosure(allowHalfClosure);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setConnectTimeoutMillis(final int connectTimeoutMillis) {
-        super.setConnectTimeoutMillis(connectTimeoutMillis);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setMaxMessagesPerRead(final int maxMessagesPerRead) {
-        super.setMaxMessagesPerRead(maxMessagesPerRead);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setWriteSpinCount(final int writeSpinCount) {
-        super.setWriteSpinCount(writeSpinCount);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setAllocator(final ByteBufAllocator allocator) {
-        super.setAllocator(allocator);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setRecvByteBufAllocator(final RecvByteBufAllocator allocator) {
-        super.setRecvByteBufAllocator(allocator);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setAutoRead(final boolean autoRead) {
-        super.setAutoRead(autoRead);
-        return this;
-    }
-
-    @Override
-    public MD5SocketChannelConfig setMessageSizeEstimator(final MessageSizeEstimator estimator) {
-        super.setMessageSizeEstimator(estimator);
-        return this;
-    }
-
-    @Override
-    public Map<ChannelOption<?>, Object> getOptions() {
-        final Map<ChannelOption<?>, Object> opts = super.getOptions();
-        final KeyMapping keys = keyAccess.getKeys();
-        if (keys != null) {
-            opts.put(MD5ChannelOption.TCP_MD5SIG, keys);
-        }
-
-        return opts;
-    }
-
-    @Override
-    public boolean setOptions(final Map<ChannelOption<?>, ?> options) {
-        boolean setAllOptions = true;
-        if (options.containsKey(MD5ChannelOption.TCP_MD5SIG)) {
-            setAllOptions = setOption(MD5ChannelOption.TCP_MD5SIG, (KeyMapping) options.get(MD5ChannelOption.TCP_MD5SIG));
-        }
-
-        return super.setOptions(options) && setAllOptions;
-    }
-
-    @Override
-    public <T> T getOption(final ChannelOption<T> option) {
-        if (option == MD5ChannelOption.TCP_MD5SIG) {
-            @SuppressWarnings("unchecked")
-            final T ret = (T) keyAccess.getKeys();
-            return ret;
-        }
-
-        return super.getOption(option);
-    }
-
-    @Override
-    public <T> boolean setOption(final ChannelOption<T> option, final T value) {
-        if (option == MD5ChannelOption.TCP_MD5SIG) {
-            keyAccess.setKeys((KeyMapping) value);
-            return true;
-        }
-
-        return super.setOption(option, value);
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelFactory.java
deleted file mode 100644 (file)
index 01c5d11..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.bootstrap.ChannelFactory;
-import io.netty.channel.Channel;
-
-public interface MD5ChannelFactory<C extends Channel> extends ChannelFactory<C> {
-
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelOption.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ChannelOption.java
deleted file mode 100644 (file)
index 93a165c..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.channel.ChannelOption;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-/**
- * TCP MD5 Signature {@link ChannelOption}.
- */
-public final class MD5ChannelOption extends ChannelOption<KeyMapping> {
-    /**
-     * Singleton instance of TCP MD5 Signature ChannelOption.
-     */
-    public static final MD5ChannelOption TCP_MD5SIG = new MD5ChannelOption("TCP_MD5SIG");
-
-    @SuppressWarnings("deprecation")
-    private MD5ChannelOption(final String name) {
-        super(name);
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannel.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannel.java
deleted file mode 100644 (file)
index da5b7e6..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import com.google.common.base.Preconditions;
-
-import io.netty.channel.ChannelException;
-import io.netty.channel.ChannelMetadata;
-import io.netty.channel.ChannelOutboundBuffer;
-import io.netty.channel.nio.AbstractNioMessageChannel;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.List;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-
-/**
- * {@link io.netty.channel.socket.nio.NioServerSocketChannel} enabled with support for TCP MD5 Signature option.
- */
-public class MD5NioServerSocketChannel extends AbstractNioMessageChannel implements io.netty.channel.socket.ServerSocketChannel {
-    private static final ChannelMetadata METADATA = new ChannelMetadata(false);
-
-    private final MD5ServerSocketChannelConfig config;
-    private final KeyAccessFactory keyAccessFactory;
-
-    private static ServerSocketChannel newChannel() {
-        try {
-            return ServerSocketChannel.open();
-        } catch (IOException e) {
-            throw new ChannelException("Failed to instantiate channel", e);
-        }
-    }
-
-    private MD5NioServerSocketChannel(final ServerSocketChannel channel, final KeyAccessFactory keyAccessFactory) {
-        super(null, channel, SelectionKey.OP_ACCEPT);
-        this.config = new DefaultMD5ServerSocketChannelConfig(this, keyAccessFactory);
-        this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
-    }
-
-    public MD5NioServerSocketChannel(final KeyAccessFactory keyAccessFactory) {
-        this(newChannel(), keyAccessFactory);
-    }
-
-    @Override
-    public MD5ServerSocketChannelConfig config() {
-        return this.config;
-    }
-
-    @Override
-    public InetSocketAddress localAddress() {
-        return (InetSocketAddress) super.localAddress();
-    }
-
-    @Override
-    public ChannelMetadata metadata() {
-        return METADATA;
-    }
-
-    @Override
-    public boolean isActive() {
-        return javaChannel().socket().isBound();
-    }
-
-    @Override
-    public InetSocketAddress remoteAddress() {
-        return null;
-    }
-
-    @Override
-    protected ServerSocketChannel javaChannel() {
-        return (ServerSocketChannel) super.javaChannel();
-    }
-
-    @Override
-    protected SocketAddress localAddress0() {
-        return javaChannel().socket().getLocalSocketAddress();
-    }
-
-    @Override
-    protected void doBind(final SocketAddress localAddress) throws IOException {
-        javaChannel().socket().bind(localAddress, config.getBacklog());
-    }
-
-    @Override
-    protected void doClose() throws IOException {
-        javaChannel().close();
-    }
-
-    @Override
-    protected int doReadMessages(final List<Object> buf) throws IOException {
-        final SocketChannel jc = javaChannel().accept();
-        if (jc == null) {
-            return 0;
-        }
-
-        final MD5NioSocketChannel ch = new MD5NioSocketChannel(this, jc, keyAccessFactory);
-        buf.add(ch);
-        return 1;
-    }
-
-    @Override
-    protected boolean doWriteMessage(final Object msg, final ChannelOutboundBuffer in) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    protected boolean doConnect(final SocketAddress remoteAddress, final SocketAddress localAddress) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    protected void doFinishConnect() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    protected SocketAddress remoteAddress0() {
-        return null;
-    }
-
-    @Override
-    protected void doDisconnect() {
-        throw new UnsupportedOperationException();
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannelFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioServerSocketChannelFactory.java
deleted file mode 100644 (file)
index b68580e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import com.google.common.base.Preconditions;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-
-public class MD5NioServerSocketChannelFactory implements MD5ServerChannelFactory<MD5NioServerSocketChannel> {
-    private final KeyAccessFactory keyAccessFactory;
-
-    public MD5NioServerSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
-        this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
-    }
-
-    @Override
-    public MD5NioServerSocketChannel newChannel() {
-        return new MD5NioServerSocketChannel(keyAccessFactory);
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannel.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannel.java
deleted file mode 100644 (file)
index c714d1d..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import com.google.common.base.Preconditions;
-
-import io.netty.buffer.ByteBuf;
-import io.netty.channel.ChannelException;
-import io.netty.channel.ChannelFuture;
-import io.netty.channel.ChannelMetadata;
-import io.netty.channel.ChannelPromise;
-import io.netty.channel.EventLoop;
-import io.netty.channel.FileRegion;
-import io.netty.channel.nio.AbstractNioByteChannel;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.SocketChannel;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-
-/**
- * {@link io.netty.channel.socket.nio.NioSocketChannel} enabled with support for TCP MD5 Signature option.
- */
-public class MD5NioSocketChannel extends AbstractNioByteChannel implements io.netty.channel.socket.SocketChannel {
-    private static final ChannelMetadata METADATA = new ChannelMetadata(false);
-
-    private final MD5SocketChannelConfig config;
-
-    private static SocketChannel newChannel() {
-        try {
-            return SocketChannel.open();
-        } catch (IOException e) {
-            throw new ChannelException("Failed to instantiate channel", e);
-        }
-    }
-
-    MD5NioSocketChannel(final MD5NioServerSocketChannel parent, final SocketChannel channel, final KeyAccessFactory factory) {
-        super(parent, channel);
-        this.config = new DefaultMD5SocketChannelConfig(this, factory);
-    }
-
-    public MD5NioSocketChannel(final KeyAccessFactory keyAccessFactory) {
-        this(null, newChannel(), keyAccessFactory);
-    }
-
-    @Override
-    public MD5SocketChannelConfig config() {
-        return this.config;
-    }
-
-    @Override
-    protected SocketChannel javaChannel() {
-        return (SocketChannel) super.javaChannel();
-    }
-
-    @Override
-    public boolean isActive() {
-        final SocketChannel ch = javaChannel();
-        return ch.isOpen() && ch.isConnected();
-    }
-
-    @Override
-    public ChannelMetadata metadata() {
-        return METADATA;
-    }
-
-    @Override
-    public MD5NioServerSocketChannel parent() {
-        return (MD5NioServerSocketChannel) super.parent();
-    }
-
-    @Override
-    public InetSocketAddress localAddress() {
-        return (InetSocketAddress) super.localAddress();
-    }
-
-    @Override
-    public InetSocketAddress remoteAddress() {
-        return (InetSocketAddress) super.remoteAddress();
-    }
-
-    @Override
-    public boolean isInputShutdown() {
-        return super.isInputShutdown();
-    }
-
-    @Override
-    public boolean isOutputShutdown() {
-        return javaChannel().socket().isOutputShutdown() || !isActive();
-    }
-
-    @Override
-    public ChannelFuture shutdownOutput() {
-        return shutdownOutput(newPromise());
-    }
-
-    @Override
-    public ChannelFuture shutdownOutput(final ChannelPromise future) {
-        EventLoop loop = eventLoop();
-        if (loop.inEventLoop()) {
-            try {
-                javaChannel().socket().shutdownOutput();
-                future.setSuccess();
-            } catch (Exception e) {
-                future.setFailure(e);
-            }
-        } else {
-            loop.execute(new Runnable() {
-                @Override
-                public void run() {
-                    shutdownOutput(future);
-                }
-            });
-        }
-        return future;
-    }
-
-    @Override
-    protected long doWriteFileRegion(final FileRegion region) throws IOException {
-        return region.transferTo(javaChannel(), region.transfered());
-    }
-
-    @Override
-    protected int doReadBytes(final ByteBuf buf) throws IOException {
-        return buf.writeBytes(javaChannel(), buf.writableBytes());
-    }
-
-    @Override
-    protected int doWriteBytes(final ByteBuf buf) throws IOException {
-        return buf.readBytes(javaChannel(), buf.readableBytes());
-    }
-
-    @Override
-    protected boolean doConnect(final SocketAddress remoteAddress, final SocketAddress localAddress) throws IOException {
-        if (localAddress != null) {
-            javaChannel().socket().bind(localAddress);
-        }
-
-        boolean success = false;
-        try {
-            boolean connected = javaChannel().connect(remoteAddress);
-            if (!connected) {
-                selectionKey().interestOps(SelectionKey.OP_CONNECT);
-            }
-            success = true;
-            return connected;
-        } finally {
-            if (!success) {
-                doClose();
-            }
-        }
-    }
-
-    @Override
-    protected void doFinishConnect() throws IOException {
-        Preconditions.checkState(javaChannel().finishConnect(), "finishConnect() failed");
-    }
-
-    @Override
-    protected SocketAddress localAddress0() {
-        return javaChannel().socket().getLocalSocketAddress();
-    }
-
-    @Override
-    protected SocketAddress remoteAddress0() {
-        return javaChannel().socket().getRemoteSocketAddress();
-    }
-
-    @Override
-    protected void doBind(final SocketAddress localAddress) throws IOException {
-        javaChannel().socket().bind(localAddress);
-    }
-
-    @Override
-    protected void doDisconnect() throws IOException {
-        doClose();
-    }
-
-    @Override
-    protected void doClose() throws IOException {
-        javaChannel().close();
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannelFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5NioSocketChannelFactory.java
deleted file mode 100644 (file)
index ad7a21f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import com.google.common.base.Preconditions;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-
-public class MD5NioSocketChannelFactory implements MD5ChannelFactory<MD5NioSocketChannel> {
-    private final KeyAccessFactory keyAccessFactory;
-
-    public MD5NioSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
-        this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
-    }
-
-    @Override
-    public MD5NioSocketChannel newChannel() {
-        return new MD5NioSocketChannel(keyAccessFactory);
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerChannelFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerChannelFactory.java
deleted file mode 100644 (file)
index 6cb1647..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.bootstrap.ChannelFactory;
-import io.netty.channel.ServerChannel;
-
-public interface MD5ServerChannelFactory<C extends ServerChannel> extends ChannelFactory<C> {
-
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerSocketChannelConfig.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5ServerSocketChannelConfig.java
deleted file mode 100644 (file)
index 82b15d9..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.buffer.ByteBufAllocator;
-import io.netty.channel.MessageSizeEstimator;
-import io.netty.channel.RecvByteBufAllocator;
-import io.netty.channel.socket.ServerSocketChannelConfig;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-/**
- * {@link ServerSocketChannelConfig} augmented with TCP MD5 Signature option support.
- */
-public interface MD5ServerSocketChannelConfig extends ServerSocketChannelConfig {
-    KeyMapping getMD5SignatureKeys();
-
-    MD5ServerSocketChannelConfig setMD5SignatureKeys(KeyMapping keys);
-
-    @Override
-    MD5ServerSocketChannelConfig setBacklog(int backlog);
-
-    @Override
-    MD5ServerSocketChannelConfig setReuseAddress(boolean reuseAddress);
-
-    @Override
-    MD5ServerSocketChannelConfig setReceiveBufferSize(int receiveBufferSize);
-
-    @Override
-    MD5ServerSocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth);
-
-    @Override
-    MD5ServerSocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
-
-    @Override
-    MD5ServerSocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
-
-    @Override
-    MD5ServerSocketChannelConfig setWriteSpinCount(int writeSpinCount);
-
-    @Override
-    MD5ServerSocketChannelConfig setAllocator(ByteBufAllocator allocator);
-
-    @Override
-    MD5ServerSocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
-
-    @Override
-    MD5ServerSocketChannelConfig setAutoRead(boolean autoRead);
-
-    @Override
-    MD5ServerSocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5SocketChannelConfig.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/MD5SocketChannelConfig.java
deleted file mode 100644 (file)
index 51bd969..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import io.netty.buffer.ByteBufAllocator;
-import io.netty.channel.MessageSizeEstimator;
-import io.netty.channel.RecvByteBufAllocator;
-import io.netty.channel.socket.SocketChannelConfig;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-/**
- * {@link SocketChannelConfig} augmented with TCP MD5 Signature option support.
- */
-public interface MD5SocketChannelConfig extends SocketChannelConfig {
-    KeyMapping getMD5SignatureKeys();
-
-    MD5SocketChannelConfig setMD5SignatureKeys(KeyMapping keys);
-
-    @Override
-    MD5SocketChannelConfig setTcpNoDelay(boolean tcpNoDelay);
-
-    @Override
-    MD5SocketChannelConfig setSoLinger(int soLinger);
-
-    @Override
-    MD5SocketChannelConfig setSendBufferSize(int sendBufferSize);
-
-    @Override
-    MD5SocketChannelConfig setReceiveBufferSize(int receiveBufferSize);
-
-    @Override
-    MD5SocketChannelConfig setKeepAlive(boolean keepAlive);
-
-    @Override
-    MD5SocketChannelConfig setTrafficClass(int trafficClass);
-
-    @Override
-    MD5SocketChannelConfig setReuseAddress(boolean reuseAddress);
-
-    @Override
-    MD5SocketChannelConfig setPerformancePreferences(int connectionTime, int latency, int bandwidth);
-
-    @Override
-    MD5SocketChannelConfig setAllowHalfClosure(boolean allowHalfClosure);
-
-    @Override
-    MD5SocketChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis);
-
-    @Override
-    MD5SocketChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead);
-
-    @Override
-    MD5SocketChannelConfig setWriteSpinCount(int writeSpinCount);
-
-    @Override
-    MD5SocketChannelConfig setAllocator(ByteBufAllocator allocator);
-
-    @Override
-    MD5SocketChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator);
-
-    @Override
-    MD5SocketChannelConfig setAutoRead(boolean autoRead);
-
-    @Override
-    MD5SocketChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator);
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/NettyKeyAccess.java b/tcp-md5/netty/src/main/java/org/opendaylight/bgpcep/tcpmd5/netty/NettyKeyAccess.java
deleted file mode 100644 (file)
index b4ebd64..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.netty;
-
-import com.google.common.base.Preconditions;
-
-import io.netty.channel.ChannelException;
-
-import java.io.IOException;
-import java.nio.channels.NetworkChannel;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-
-/**
- * Utility class for handling MD5 option.
- */
-final class NettyKeyAccess implements KeyAccess {
-    private final KeyAccess delegate;
-
-    private NettyKeyAccess(final KeyAccess delegate) {
-        this.delegate = Preconditions.checkNotNull(delegate);
-    }
-
-    public static NettyKeyAccess create(final KeyAccessFactory factory, final NetworkChannel channel) {
-        final KeyAccess access = factory.getKeyAccess(channel);
-        return new NettyKeyAccess(access);
-    }
-
-    @Override
-    public KeyMapping getKeys() {
-        try {
-            return delegate.getKeys();
-        } catch (IOException e) {
-            throw new ChannelException("Failed to set channel MD5 signature keys", e);
-        }
-    }
-
-    @Override
-    public void setKeys(final KeyMapping keys) {
-        try {
-            delegate.setKeys(keys);
-        } catch (IOException e) {
-            throw new ChannelException("Failed to set channel MD5 signature key", e);
-        }
-    }
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModule.java b/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModule.java
deleted file mode 100644 (file)
index 4a7a051..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.netty.cfg;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5NioSocketChannelFactory;
-
-/**
- * Service representing a way for accessing key informtion.
- */
-public class MD5ClientChannelFactoryModule extends
-        org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.AbstractMD5ClientChannelFactoryModule {
-    public MD5ClientChannelFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public MD5ClientChannelFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ClientChannelFactoryModule oldModule,
-            final java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final class AutoCloseableMD5NioSocketChannelFactory extends MD5NioSocketChannelFactory implements AutoCloseable {
-            public AutoCloseableMD5NioSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
-                super(keyAccessFactory);
-            }
-
-            @Override
-            public void close() {
-                // Noop
-            }
-        }
-
-        return new AutoCloseableMD5NioSocketChannelFactory(getKeyAccessFactoryDependency());
-    }
-
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModuleFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ClientChannelFactoryModuleFactory.java
deleted file mode 100644 (file)
index 8ffe997..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.netty.cfg;
-
-public class MD5ClientChannelFactoryModuleFactory extends
-        org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.AbstractMD5ClientChannelFactoryModuleFactory {
-
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModule.java b/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModule.java
deleted file mode 100644 (file)
index 8f1544d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.netty.cfg;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.netty.MD5NioServerSocketChannelFactory;
-
-/**
- * Service representing a way for accessing key informtion.
- */
-public class MD5ServerChannelFactoryModule extends
-        org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.AbstractMD5ServerChannelFactoryModule {
-    public MD5ServerChannelFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public MD5ServerChannelFactoryModule(final org.opendaylight.controller.config.api.ModuleIdentifier identifier,
-            final org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
-            final org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.MD5ServerChannelFactoryModule oldModule,
-            final java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final class AutoCloseableMD5NioServerSocketChannelFactory extends MD5NioServerSocketChannelFactory implements AutoCloseable {
-            public AutoCloseableMD5NioServerSocketChannelFactory(final KeyAccessFactory keyAccessFactory) {
-                super(keyAccessFactory);
-            }
-
-            @Override
-            public void close() {
-                // Noop
-            }
-        }
-
-        return new AutoCloseableMD5NioServerSocketChannelFactory(getServerKeyAccessFactoryDependency());
-    }
-
-}
diff --git a/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModuleFactory.java b/tcp-md5/netty/src/main/java/org/opendaylight/controller/config/yang/tcpmd5/netty/cfg/MD5ServerChannelFactoryModuleFactory.java
deleted file mode 100644 (file)
index 49fb55e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.config.yang.tcpmd5.netty.cfg;
-
-public class MD5ServerChannelFactoryModuleFactory extends
-        org.opendaylight.controller.config.yang.tcpmd5.netty.cfg.AbstractMD5ServerChannelFactoryModuleFactory {
-
-}
diff --git a/tcp-md5/netty/src/main/yang/odl-tcpmd5-netty-cfg.yang b/tcp-md5/netty/src/main/yang/odl-tcpmd5-netty-cfg.yang
deleted file mode 100644 (file)
index f04b170..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// vi: set smarttab et sw=4 tabstop=4:
-module odl-tcpmd5-netty-cfg {
-    yang-version 1;
-    namespace "urn:opendaylight:params:xml:ns:yang:controller:tcpmd5:netty:cfg";
-    prefix "md5-netty";
-
-    import config { prefix config; revision-date 2013-04-05; }
-    import netty { prefix netty; revision-date 2013-11-19; }
-    import odl-tcpmd5-cfg { prefix tcpmd5; revision-date 2014-04-27; }
-
-    organization "Cisco Systems, Inc.";
-
-    contact "Robert Varga <rovarga@cisco.com>";
-
-    description
-        "This module contains the base YANG definitions for
-         TCP MD5 Signature option.
-
-        Copyright (c)2014 Cisco Systems, Inc. All rights reserved.;
-
-        This program and the accompanying materials are made available
-        under the terms of the Eclipse Public License v1.0 which
-        accompanies this distribution, and is available at
-        http://www.eclipse.org/legal/epl-v10.html";
-
-    revision "2014-04-27" {
-        description
-            "Initial revision";
-    }
-
-    identity md5-channel-factory {
-        description
-            "Service representing a way for instantiating channels.";
-
-        //base "netty:channel-factory";
-        base "config:service-type";
-        config:java-class "org.opendaylight.bgpcep.tcpmd5.netty.MD5ChannelFactory";
-    }
-
-    identity md5-server-channel-factory {
-        description
-            "Service representing a way for instantiating channels.";
-
-        //base "netty:channel-factory";
-        base "config:service-type";
-        config:java-class "org.opendaylight.bgpcep.tcpmd5.netty.MD5ServerChannelFactory";
-    }
-
-    identity md5-server-channel-factory-impl {
-        description
-            "Service representing a way for accessing key informtion.";
-
-        base config:module-type;
-        config:provided-service md5-server-channel-factory;
-        config:java-name-prefix MD5ServerChannelFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case md5-server-channel-factory-impl {
-            when "/config:modules/config:module/config:type = 'md5-server-channel-factory-impl'";
-
-            container server-key-access-factory {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity tcpmd5:key-access-factory;
-                    }
-                }
-            }
-        }
-    }
-
-    identity md5-client-channel-factory {
-        description
-            "Service representing a way for accessing key informtion.";
-
-        base config:module-type;
-        config:provided-service md5-channel-factory;
-        config:java-name-prefix MD5ClientChannelFactory;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case md5-client-channel-factory {
-            when "/config:modules/config:module/config:type = 'md5-client-channel-factory'";
-
-            container key-access-factory {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity tcpmd5:key-access-factory;
-                    }
-                }
-            }
-        }
-    }
-}
-
diff --git a/tcp-md5/nio/.project b/tcp-md5/nio/.project
deleted file mode 100644 (file)
index 713d9f0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<projectDescription>
-       <name>tcpmd5-nio</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.m2e.core.maven2Builder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>
-       </natures>
-</projectDescription>
diff --git a/tcp-md5/nio/pom.xml b/tcp-md5/nio/pom.xml
deleted file mode 100644 (file)
index 65a3554..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>tcpmd5-parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-    <artifactId>tcpmd5-nio</artifactId>
-    <description>RFC2385-enable sockets</description>
-    <packaging>bundle</packaging>
-    <name>${project.artifactId}</name>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <dependencies>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>tcpmd5-jni</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
-
-        <!-- Testing dependencies -->
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>mockito-configuration</artifactId>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
-                        <Export-Package>
-                            org.opendaylight.bgpcep.tcpmd5.nio
-                        </Export-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/DefaultKeyAccessFactoryFactory.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/DefaultKeyAccessFactoryFactory.java
deleted file mode 100644 (file)
index 62c2dd7..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import org.opendaylight.bgpcep.tcpmd5.DummyKeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeKeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.jni.NativeSupportUnavailableException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Internal utility class for selecting the best available KeyAccessFactory. We prefer NativeKeyAccessFactory, but fall
- * back to DummyKeyAccessFactory if that is not available.
- */
-final class DefaultKeyAccessFactoryFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(DefaultKeyAccessFactoryFactory.class);
-    private static final KeyAccessFactory FACTORY;
-
-    static {
-        KeyAccessFactory factory;
-
-        try {
-            factory = NativeKeyAccessFactory.getInstance();
-        } catch (NativeSupportUnavailableException e) {
-            LOG.debug("Native key access not available, using no-op fallback", e);
-            factory = DummyKeyAccessFactory.getInstance();
-        }
-
-        FACTORY = factory;
-    }
-
-    private DefaultKeyAccessFactoryFactory() {
-        throw new UnsupportedOperationException("Utility class should never be instantiated");
-    }
-
-    public static KeyAccessFactory getKeyAccessFactory() {
-        return FACTORY;
-    }
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptions.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptions.java
deleted file mode 100644 (file)
index 1db8a9d..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-import java.io.IOException;
-import java.net.SocketOption;
-import java.nio.channels.NetworkChannel;
-import java.util.Set;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.opendaylight.bgpcep.tcpmd5.MD5SocketOptions;
-
-/**
- * Channel option wrapper which unifies the underlying NetworkChannel with the TCP MD5 Signature option if the channel
- * is supported by the JNI library.
- */
-final class MD5ChannelOptions {
-    private static final Set<SocketOption<?>> MD5_OPTIONS = ImmutableSet.<SocketOption<?>> of(MD5SocketOptions.TCP_MD5SIG);
-    private final NetworkChannel ch;
-    private final KeyAccess access;
-
-    private MD5ChannelOptions(final NetworkChannel ch, final KeyAccess access) {
-        this.ch = Preconditions.checkNotNull(ch);
-        this.access = access;
-    }
-
-    static MD5ChannelOptions create(final KeyAccessFactory keyAccessFactory, final NetworkChannel ch) {
-        final KeyAccess access = keyAccessFactory.getKeyAccess(Preconditions.checkNotNull(ch));
-        return new MD5ChannelOptions(ch, access);
-    }
-
-    @SuppressWarnings("unchecked")
-    public <T> T getOption(final SocketOption<T> name) throws IOException {
-        if (access != null && name.equals(MD5SocketOptions.TCP_MD5SIG)) {
-            return (T) access.getKeys();
-        }
-
-        return ch.getOption(name);
-    }
-
-    public <T> void setOption(final SocketOption<T> name, final T value) throws IOException {
-        if (access != null && name.equals(MD5SocketOptions.TCP_MD5SIG)) {
-            access.setKeys((KeyMapping) value);
-        } else {
-            ch.setOption(name, value);
-        }
-    }
-
-    public Set<SocketOption<?>> supportedOptions() {
-        if (access != null) {
-            return Sets.union(MD5_OPTIONS, ch.supportedOptions());
-        } else {
-            return ch.supportedOptions();
-        }
-    }
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SelectorProvider.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SelectorProvider.java
deleted file mode 100644 (file)
index a22e8cb..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import com.google.common.base.Preconditions;
-
-import java.io.IOException;
-import java.net.ProtocolFamily;
-import java.nio.channels.DatagramChannel;
-import java.nio.channels.Pipe;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.nio.channels.spi.AbstractSelector;
-import java.nio.channels.spi.SelectorProvider;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class MD5SelectorProvider extends SelectorProvider {
-    private static final Logger LOG = LoggerFactory.getLogger(MD5SelectorProvider.class);
-    private static final Map<SelectorProvider, MD5SelectorProvider> INSTANCES = new WeakHashMap<>();
-    private final KeyAccessFactory keyAccessFactory;
-    private final SelectorProvider delegate;
-
-    private MD5SelectorProvider(final KeyAccessFactory keyAccessFactory, final SelectorProvider delegate) {
-        this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
-        this.delegate = Preconditions.checkNotNull(delegate);
-    }
-
-    public static synchronized MD5SelectorProvider getInstance(final KeyAccessFactory keyAccessFactory, final SelectorProvider provider) {
-        MD5SelectorProvider ret = INSTANCES.get(provider);
-        if (ret == null) {
-            ret = new MD5SelectorProvider(keyAccessFactory, provider);
-            LOG.debug("Created new provider instance {} for delegate {}", ret, provider);
-            INSTANCES.put(provider, ret);
-        }
-
-        return ret;
-    }
-
-    public static MD5SelectorProvider getInstance(final KeyAccessFactory keyAccessFactory) {
-        return getInstance(keyAccessFactory, provider());
-    }
-
-    @Override
-    public DatagramChannel openDatagramChannel() throws IOException {
-        throw new UnsupportedOperationException("Datagram channels are not supported");
-    }
-
-    @Override
-    public DatagramChannel openDatagramChannel(final ProtocolFamily family) throws IOException {
-        throw new UnsupportedOperationException("Datagram channels are not supported");
-    }
-
-    @Override
-    public Pipe openPipe() throws IOException {
-        throw new UnsupportedOperationException("Pipes are not supported");
-    }
-
-    @Override
-    public AbstractSelector openSelector() throws IOException {
-        final AbstractSelector s = delegate.openSelector();
-        final AbstractSelector ret = new SelectorFacade(delegate, s);
-
-        LOG.debug("Opened facade {} for selector {}", ret, s);
-        return ret;
-    }
-
-    @Override
-    public MD5ServerSocketChannel openServerSocketChannel() throws IOException {
-        final ServerSocketChannel ch = delegate.openServerSocketChannel();
-        final MD5ServerSocketChannel ret = new MD5ServerSocketChannel(ch, keyAccessFactory);
-
-        LOG.debug("Created facade {} for server channel {}", ret, ch);
-        return ret;
-    }
-
-    @Override
-    public MD5SocketChannel openSocketChannel() throws IOException {
-        final SocketChannel ch = delegate.openSocketChannel();
-        final MD5SocketChannel ret = new MD5SocketChannel(ch, keyAccessFactory);
-
-        LOG.debug("Created facade {} for channel {}", ret, ch);
-        return ret;
-    }
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ServerSocketChannel.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ServerSocketChannel.java
deleted file mode 100644 (file)
index 2e9411b..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import com.google.common.base.Preconditions;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.SocketAddress;
-import java.net.SocketOption;
-import java.nio.channels.ServerSocketChannel;
-import java.util.Set;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * {@link ServerSocketChannel} augmented with support for TCP MD5 Signature option.
- */
-public final class MD5ServerSocketChannel extends ServerSocketChannel implements ProxyChannel<ServerSocketChannel> {
-    private static final Logger LOG = LoggerFactory.getLogger(MD5ServerSocketChannel.class);
-    private final KeyAccessFactory keyAccessFactory;
-    private final ServerSocketChannel inner;
-    private final MD5ChannelOptions options;
-
-    public MD5ServerSocketChannel(final ServerSocketChannel inner, final KeyAccessFactory keyAccessFactory) {
-        super(MD5SelectorProvider.getInstance(keyAccessFactory, inner.provider()));
-        this.inner = inner;
-        this.keyAccessFactory = Preconditions.checkNotNull(keyAccessFactory);
-        this.options = MD5ChannelOptions.create(keyAccessFactory, inner);
-    }
-
-    public MD5ServerSocketChannel(final ServerSocketChannel inner) {
-        this(inner, DefaultKeyAccessFactoryFactory.getKeyAccessFactory());
-    }
-
-    public static MD5ServerSocketChannel open() throws IOException {
-        return new MD5ServerSocketChannel(ServerSocketChannel.open());
-    }
-
-    public static MD5ServerSocketChannel open(final KeyAccessFactory keyAccessFactory) throws IOException {
-        return new MD5ServerSocketChannel(ServerSocketChannel.open(), keyAccessFactory);
-    }
-
-    @Override
-    public SocketAddress getLocalAddress() throws IOException {
-        return inner.getLocalAddress();
-    }
-
-    @Override
-    public <T> T getOption(final SocketOption<T> name) throws IOException {
-        return options.getOption(name);
-    }
-
-    @Override
-    public Set<SocketOption<?>> supportedOptions() {
-        return options.supportedOptions();
-    }
-
-    @Override
-    public ServerSocketChannel bind(final SocketAddress local, final int backlog) throws IOException {
-        inner.bind(local, backlog);
-        return this;
-    }
-
-    @Override
-    public <T> ServerSocketChannel setOption(final SocketOption<T> name, final T value) throws IOException {
-        options.setOption(name, value);
-        return this;
-    }
-
-    @Override
-    public ServerSocket socket() {
-        final ServerSocket s = inner.socket();
-        LOG.info("Leaking inner socket {} from server {}", s, this);
-        return s;
-    }
-
-    @Override
-    public MD5SocketChannel accept() throws IOException {
-        return new MD5SocketChannel(inner.accept(), keyAccessFactory);
-    }
-
-    @Override
-    protected void implCloseSelectableChannel() throws IOException {
-        inner.close();
-    }
-
-    @Override
-    protected void implConfigureBlocking(final boolean block) throws IOException {
-        inner.configureBlocking(block);
-    }
-
-    @Override
-    public ServerSocketChannel getDelegate() {
-        return inner;
-    }
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannel.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannel.java
deleted file mode 100644 (file)
index 8bc8304..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2013 Robert Varga. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketOption;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.Set;
-
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-
-/**
- * {@link SocketChannel} augmented with support for TCP MD5 Signature option.
- */
-public final class MD5SocketChannel extends SocketChannel implements ProxyChannel<SocketChannel> {
-    private final MD5ChannelOptions options;
-    private final SocketChannel inner;
-
-    public MD5SocketChannel(final SocketChannel inner) {
-        this(inner, DefaultKeyAccessFactoryFactory.getKeyAccessFactory());
-    }
-
-    public MD5SocketChannel(final SocketChannel inner, final KeyAccessFactory keyAccessFactory) {
-        super(MD5SelectorProvider.getInstance(keyAccessFactory, inner.provider()));
-        this.inner = inner;
-        options = MD5ChannelOptions.create(keyAccessFactory, inner);
-    }
-
-    public static MD5SocketChannel open() throws IOException {
-        return new MD5SocketChannel(SocketChannel.open());
-    }
-
-    public static MD5SocketChannel open(final KeyAccessFactory keyAccessFactory) throws IOException {
-        return new MD5SocketChannel(SocketChannel.open(), keyAccessFactory);
-    }
-
-    @Override
-    public SocketAddress getLocalAddress() throws IOException {
-        return inner.getLocalAddress();
-    }
-
-    @Override
-    public <T> T getOption(final SocketOption<T> name) throws IOException {
-        return options.getOption(name);
-    }
-
-    @Override
-    public Set<SocketOption<?>> supportedOptions() {
-        return options.supportedOptions();
-    }
-
-    @Override
-    public SocketChannel bind(final SocketAddress local) throws IOException {
-        inner.bind(local);
-        return this;
-    }
-
-    @Override
-    public <T> SocketChannel setOption(final SocketOption<T> name, final T value) throws IOException {
-        options.setOption(name, value);
-        return this;
-    }
-
-    @Override
-    public SocketChannel shutdownInput() throws IOException {
-        inner.shutdownInput();
-        return this;
-    }
-
-    @Override
-    public SocketChannel shutdownOutput() throws IOException {
-        inner.shutdownOutput();
-        return this;
-    }
-
-    @Override
-    public Socket socket() {
-        // FIXME: provide a wrapper
-        return inner.socket();
-    }
-
-    @Override
-    public boolean isConnected() {
-        return inner.isConnected();
-    }
-
-    @Override
-    public boolean isConnectionPending() {
-        return inner.isConnectionPending();
-    }
-
-    @Override
-    public boolean connect(final SocketAddress remote) throws IOException {
-        return inner.connect(remote);
-    }
-
-    @Override
-    public boolean finishConnect() throws IOException {
-        return inner.finishConnect();
-    }
-
-    @Override
-    public SocketAddress getRemoteAddress() throws IOException {
-        return inner.getRemoteAddress();
-    }
-
-    @Override
-    public int read(final ByteBuffer dst) throws IOException {
-        return inner.read(dst);
-    }
-
-    @Override
-    public long read(final ByteBuffer[] dsts, final int offset, final int length) throws IOException {
-        return inner.read(dsts, offset, length);
-    }
-
-    @Override
-    public int write(final ByteBuffer src) throws IOException {
-        return inner.write(src);
-    }
-
-    @Override
-    public long write(final ByteBuffer[] srcs, final int offset, final int length) throws IOException {
-        return inner.write(srcs, offset, length);
-    }
-
-    @Override
-    protected void implCloseSelectableChannel() throws IOException {
-        inner.close();
-    }
-
-    @Override
-    protected void implConfigureBlocking(final boolean block) throws IOException {
-        inner.configureBlocking(block);
-    }
-
-    @Override
-    public SocketChannel getDelegate() {
-        return inner;
-    }
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/ProxyChannel.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/ProxyChannel.java
deleted file mode 100644 (file)
index 56f62ea..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import java.nio.channels.spi.AbstractSelectableChannel;
-
-interface ProxyChannel<C extends AbstractSelectableChannel> {
-    C getDelegate();
-}
diff --git a/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/SelectorFacade.java b/tcp-md5/nio/src/main/java/org/opendaylight/bgpcep/tcpmd5/nio/SelectorFacade.java
deleted file mode 100644 (file)
index ff7c014..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import com.google.common.base.Preconditions;
-
-import java.io.IOException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.spi.AbstractSelectableChannel;
-import java.nio.channels.spi.AbstractSelector;
-import java.nio.channels.spi.SelectorProvider;
-import java.util.Set;
-
-final class SelectorFacade extends AbstractSelector {
-    private final AbstractSelector delegate;
-
-    SelectorFacade(final SelectorProvider provider, final AbstractSelector delegate) {
-        super(provider);
-        this.delegate = Preconditions.checkNotNull(delegate);
-    }
-
-    @Override
-    protected void implCloseSelector() throws IOException {
-        delegate.close();
-    }
-
-    @Override
-    protected SelectionKey register(final AbstractSelectableChannel ch, final int ops, final Object att) {
-        Preconditions.checkArgument(ch instanceof ProxyChannel<?>);
-
-        final AbstractSelectableChannel ach = ((ProxyChannel<?>) ch).getDelegate();
-        try {
-            return ach.register(delegate, ops, att);
-        } catch (ClosedChannelException e) {
-            throw new IllegalArgumentException("Failed to register channel", e);
-        }
-    }
-
-    @Override
-    public Set<SelectionKey> keys() {
-        return delegate.keys();
-    }
-
-    @Override
-    public Set<SelectionKey> selectedKeys() {
-        return delegate.selectedKeys();
-    }
-
-    @Override
-    public int selectNow() throws IOException {
-        return delegate.selectNow();
-    }
-
-    @Override
-    public int select(final long timeout) throws IOException {
-        return delegate.select(timeout);
-    }
-
-    @Override
-    public int select() throws IOException {
-        return delegate.select();
-    }
-
-    @Override
-    public Selector wakeup() {
-        return delegate.wakeup();
-    }
-}
diff --git a/tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptionsTest.java b/tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5ChannelOptionsTest.java
deleted file mode 100644 (file)
index 3686b4a..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-
-import com.google.common.collect.ImmutableSet;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.SocketOption;
-import java.net.StandardSocketOptions;
-import java.nio.channels.NetworkChannel;
-import java.util.Set;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.opendaylight.bgpcep.tcpmd5.MD5SocketOptions;
-
-public class MD5ChannelOptionsTest {
-
-    @Mock
-    private KeyAccessFactory keyAccessFactory;
-    @Mock
-    private KeyAccess keyAccess;
-    @Mock
-    private NetworkChannel channel;
-
-    @Before
-    public void setup() throws IOException {
-        MockitoAnnotations.initMocks(this);
-
-        Mockito.doReturn(keyAccess).when(keyAccessFactory).getKeyAccess(channel);
-        Mockito.doReturn(null).when(keyAccess).getKeys();
-        Mockito.doNothing().when(keyAccess).setKeys(any(KeyMapping.class));
-
-        Mockito.doReturn(ImmutableSet.of(StandardSocketOptions.TCP_NODELAY)).when(channel).supportedOptions();
-        Mockito.doReturn(false).when(channel).getOption(StandardSocketOptions.TCP_NODELAY);
-        Mockito.doReturn(channel).when(channel).setOption(StandardSocketOptions.TCP_NODELAY, true);
-    }
-
-    @Test
-    public void testCreate() {
-        final MD5ChannelOptions opts = MD5ChannelOptions.create(keyAccessFactory, channel);
-
-        final Set<SocketOption<?>> so = opts.supportedOptions();
-        assertTrue(so.contains(MD5SocketOptions.TCP_MD5SIG));
-        assertTrue(so.contains(StandardSocketOptions.TCP_NODELAY));
-
-        Mockito.verifyZeroInteractions(keyAccess);
-        Mockito.verify(keyAccessFactory).getKeyAccess(channel);
-        Mockito.verify(channel).supportedOptions();
-    }
-
-    @Test
-    public void testGetOption() throws IOException {
-        final MD5ChannelOptions opts = MD5ChannelOptions.create(keyAccessFactory, channel);
-
-        assertNull(opts.getOption(MD5SocketOptions.TCP_MD5SIG));
-        assertFalse(opts.getOption(StandardSocketOptions.TCP_NODELAY));
-
-        Mockito.verify(keyAccess).getKeys();
-        Mockito.verify(channel).getOption(StandardSocketOptions.TCP_NODELAY);
-    }
-
-    @Test
-    public void testSetOption() throws IOException {
-        final MD5ChannelOptions opts = MD5ChannelOptions.create(keyAccessFactory, channel);
-
-        final KeyMapping map = new KeyMapping();
-        map.put(InetAddress.getLoopbackAddress(), new byte[] { 1, });
-
-        opts.setOption(MD5SocketOptions.TCP_MD5SIG, map);
-        opts.setOption(StandardSocketOptions.TCP_NODELAY, true);
-
-        Mockito.verify(keyAccess).setKeys(any(KeyMapping.class));
-        Mockito.verify(channel).setOption(StandardSocketOptions.TCP_NODELAY, true);
-    }
-}
diff --git a/tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannelTest.java b/tcp-md5/nio/src/test/java/org/opendaylight/bgpcep/tcpmd5/nio/MD5SocketChannelTest.java
deleted file mode 100644 (file)
index ef99580..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.bgpcep.tcpmd5.nio;
-
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.mockito.Matchers.any;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.nio.channels.NetworkChannel;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.mockito.MockitoAnnotations;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccess;
-import org.opendaylight.bgpcep.tcpmd5.KeyAccessFactory;
-import org.opendaylight.bgpcep.tcpmd5.KeyMapping;
-import org.opendaylight.bgpcep.tcpmd5.MD5SocketOptions;
-
-public class MD5SocketChannelTest {
-    @Mock
-    private KeyAccessFactory keyAccessFactory;
-    @Mock
-    private KeyAccess keyAccess;
-
-    @Before
-    public void setup() throws IOException {
-        MockitoAnnotations.initMocks(this);
-
-        Mockito.doReturn(keyAccess).when(keyAccessFactory).getKeyAccess(any(NetworkChannel.class));
-        Mockito.doReturn(null).when(keyAccess).getKeys();
-        Mockito.doNothing().when(keyAccess).setKeys(any(KeyMapping.class));
-    }
-
-    @Test
-    public void testCreate() throws IOException {
-        try (final MD5SocketChannel sc = MD5SocketChannel.open(keyAccessFactory)) {
-
-        }
-
-        Mockito.verify(keyAccessFactory).getKeyAccess(any(NetworkChannel.class));
-    }
-
-    @Test
-    public void testGetKey() throws IOException {
-        try (final MD5SocketChannel sc = MD5SocketChannel.open(keyAccessFactory)) {
-
-            assertNull(sc.getOption(MD5SocketOptions.TCP_MD5SIG));
-        }
-
-        Mockito.verify(keyAccessFactory).getKeyAccess(any(NetworkChannel.class));
-        Mockito.verify(keyAccess).getKeys();
-    }
-
-    @Test
-    public void testSetKey() throws IOException {
-        final KeyMapping map = new KeyMapping();
-        map.put(InetAddress.getLoopbackAddress(), new byte[] { 1, 2, 3 });
-
-        try (final MD5SocketChannel sc = MD5SocketChannel.open(keyAccessFactory)) {
-            assertSame(sc, sc.setOption(MD5SocketOptions.TCP_MD5SIG, map));
-        }
-
-        Mockito.verify(keyAccessFactory).getKeyAccess(any(NetworkChannel.class));
-        Mockito.verify(keyAccess).setKeys(map);
-    }
-}
diff --git a/tcp-md5/pom.xml b/tcp-md5/pom.xml
deleted file mode 100644 (file)
index 55ca251..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
- Copyright (c) 2013 Robert Varga. All rights reserved.
-
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-    <scm>
-        <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
-        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
-        <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
-        <tag>HEAD</tag>
-    </scm>
-    <parent>
-        <groupId>org.opendaylight.bgpcep</groupId>
-        <artifactId>commons.parent</artifactId>
-        <version>0.3.1-SNAPSHOT</version>
-        <relativePath>../commons/parent</relativePath>
-    </parent>
-    <prerequisites>
-        <maven>3.0.4</maven>
-    </prerequisites>
-
-    <artifactId>tcpmd5-parent</artifactId>
-    <description>RFC2385-enabled sockets components</description>
-    <packaging>pom</packaging>
-    <name>${project.artifactId}</name>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-api-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-jni</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-jni-cfg</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-netty</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-nio</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-jni</artifactId>
-                <version>${project.version}</version>
-                <type>nar</type>
-            </dependency>
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tcpmd5-controller-config</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <profiles>
-        <profile>
-            <id>jni</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <modules>
-                <module>api</module>
-                <module>jni</module>
-                <module>netty</module>
-                <module>nio</module>
-                <module>controller-config</module>
-            </modules>
-        </profile>
-        <profile>
-            <id>default</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <modules>
-                <module>api</module>
-                <module>netty</module>
-                <module>nio</module>
-                <module>controller-config</module>
-            </modules>
-        </profile>
-    </profiles>
-</project>