Merge "Making it easier for cygwin users to run OpenDaylight using run.sh. With this...
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / NetconfMapping.java
index f0b711d368595dede27c14030b4d0d4ef64112a6..f76ec28624e158a3cfa5ad8050c13647b82e2163 100644 (file)
@@ -99,7 +99,11 @@ public class NetconfMapping {
 
         for (org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument component : Lists
                 .reverse(identifier.getPath())) {
-            previous = toNode(component, previous);
+            if (component instanceof NodeIdentifierWithPredicates) {
+                previous = toNode((NodeIdentifierWithPredicates)component, previous);
+            } else {
+                previous = toNode(component, previous);
+            }
         }
         return filter("subtree", previous);
     }
@@ -135,7 +139,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,7 +196,7 @@ public class NetconfMapping {
                 rawRpc = it.toInstance();
                 // sys(xmlData)
             } else {
-                rawRpc = (CompositeNode) toCompositeNode(message.getDocument());
+                rawRpc = (CompositeNode) toCompositeNode(message, context);
             }
         else {
             rawRpc = (CompositeNode) toCompositeNode(message.getDocument());