Merge "Bug 949: Fixed support for DataChangeListeners listening directly on Augmentation"
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / NetconfMapping.java
index a6e6b3dfdf456d92711da924522d22de0aeea788..55e17c56b38e5d47b656ad37f7e5c9e5f11e78db 100644 (file)
@@ -135,7 +135,7 @@ public class NetconfMapping {
             SchemaContext schemaContext = ctx.get();
             Set<NotificationDefinition> notifications = schemaContext.getNotifications();
             Document document = message.getDocument();
-            return XmlDocumentUtils.notificationToDomNodes(document, Optional.fromNullable(notifications));
+            return XmlDocumentUtils.notificationToDomNodes(document, Optional.fromNullable(notifications), ctx.get());
         }
         return null;
     }
@@ -192,13 +192,7 @@ public class NetconfMapping {
                 rawRpc = it.toInstance();
                 // sys(xmlData)
             } else {
-                RpcDefinition rpcSchema = Iterables.find(context.get().getOperations(), new Predicate<RpcDefinition>() {
-                    @Override
-                    public boolean apply(final RpcDefinition input) {
-                        return rpc == input.getQName();
-                    }
-                });
-                rawRpc = (CompositeNode) toCompositeNode(message.getDocument());
+                rawRpc = (CompositeNode) toCompositeNode(message, context);
             }
         else {
             rawRpc = (CompositeNode) toCompositeNode(message.getDocument());