BUG-2310 - widen yang model for netconf-node.
authorTomas Cere <tcere@cisco.com>
Tue, 20 Jan 2015 12:18:07 +0000 (13:18 +0100)
committerTomas Cere <tcere@cisco.com>
Mon, 9 Feb 2015 10:52:48 +0000 (11:52 +0100)
Netconf datastore is now in topology, added connection state,
resolved/unresolved schemas with failure reasons and host to netconf node.
Deprecated old netconf node in inventory.

Change-Id: Id34a17b82420eaf69d03d72b9a1523210cc87cc2
Signed-off-by: Tomas Cere <tcere@cisco.com>
src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
src/main/java/org/opendaylight/protocol/framework/ReconnectPromise.java

index a05d02cd09ad4e1b447a61da687768bc58e3dd94..7f5233c827c2624befc01adb1b9c02a5da30c606 100644 (file)
@@ -238,7 +238,7 @@ public abstract class AbstractDispatcher<S extends ProtocolSession<?>, L extends
      * @param connectStrategyFactory Factory for creating reconnection strategy for every reconnect attempt
      *
      * @return Future representing the reconnection task. It will report completion based on reestablishStrategy, e.g.
-     *         success if it indicates no further attempts should be made and failure if it reports an error
+     *         success is never reported, only failure when it runs out of reconnection attempts.
      */
     protected Future<Void> createReconnectingClient(final InetSocketAddress address, final ReconnectStrategyFactory connectStrategyFactory,
             final PipelineInitializer<S> initializer) {
index aaec95a74b5886150c8d0bc4bb7d11a1a1570dbf..865c666ad299ccbf86e260ed9f477d052763695f 100644 (file)
@@ -15,6 +15,7 @@ import io.netty.channel.socket.SocketChannel;
 import io.netty.util.concurrent.DefaultPromise;
 import io.netty.util.concurrent.EventExecutor;
 import io.netty.util.concurrent.Future;
+import io.netty.util.concurrent.GenericFutureListener;
 import io.netty.util.concurrent.Promise;
 import java.net.InetSocketAddress;
 import org.slf4j.Logger;
@@ -55,6 +56,15 @@ final class ReconnectPromise<S extends ProtocolSession<?>, L extends SessionList
                 channel.pipeline().addLast(new ClosedChannelHandler(ReconnectPromise.this));
             }
         });
+
+        pending.addListener(new GenericFutureListener<Future<Object>>() {
+            @Override
+            public void operationComplete(Future<Object> future) throws Exception {
+                if (!future.isSuccess()) {
+                    ReconnectPromise.this.setFailure(future.cause());
+                }
+            }
+        });
     }
 
     /**