Set unable-to-connect(netconf node) if no sources are available 03/17103/1
authorMaros Marsalek <mmarsale@cisco.com>
Wed, 25 Mar 2015 12:09:11 +0000 (13:09 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Wed, 25 Mar 2015 12:11:15 +0000 (13:11 +0100)
Currently the state was set to connecting even though the connection attempts
stopped.

Change-Id: I9c5eaa1c7a547c2efaa7224d1c75f1c0c7dad5cc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfDevice.java

index cdce946..88dd0e5 100644 (file)
@@ -414,7 +414,9 @@ public final class NetconfDevice implements RemoteDevice<NetconfSessionPreferenc
 
             // If no more sources, fail
             if(requiredSources.isEmpty()) {
-                handleSalInitializationFailure(new IllegalStateException(id + ": No more sources for schema context"), listener);
+                final IllegalStateException cause = new IllegalStateException(id + ": No more sources for schema context");
+                handleSalInitializationFailure(cause, listener);
+                salFacade.onDeviceFailed(cause);
                 return;
             }