Merge "Serialize capabilities for notification properly"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 23 Feb 2015 11:18:23 +0000 (11:18 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 23 Feb 2015 11:18:24 +0000 (11:18 +0000)
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NotificationHandler.java
opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/osgi/YangStoreService.java

index d340e4c..bc3326e 100644 (file)
@@ -63,7 +63,7 @@ final class NotificationHandler {
 
     private CompositeNode transformNotification(final NetconfMessage cachedNotification) {
         final CompositeNode parsedNotification = messageTransformer.toNotification(cachedNotification);
-        Preconditions.checkNotNull(parsedNotification, "{}: Unable to parse received notification %s", id, cachedNotification);
+        Preconditions.checkNotNull(parsedNotification, "%s: Unable to parse received notification: %s", id, cachedNotification);
         return parsedNotification;
     }
 
@@ -91,6 +91,7 @@ final class NotificationHandler {
     }
 
     synchronized void onRemoteSchemaDown() {
+        queue.clear();
         passNotifications = false;
     }
 
index 60b8b8f..176800f 100644 (file)
@@ -191,8 +191,7 @@ public class YangStoreService implements YangStoreContext {
     private static final Function<Module, Uri> MODULE_TO_URI = new Function<Module, Uri>() {
         @Override
         public Uri apply(final Module input) {
-            final QName qName = QName.cachedReference(QName.create(input.getQNameModule(), input.getName()));
-            return new Uri(qName.toString());
+            return new Uri(new NetconfOperationServiceFactoryImpl.YangStoreCapability(input, input.getSource()).getCapabilityUri());
         }
     };