Fix modules Restconf call for mounted devices 33/16833/1
authorMaros Marsalek <mmarsale@cisco.com>
Thu, 19 Mar 2015 14:58:39 +0000 (15:58 +0100)
committerMaros Marsalek <mmarsale@cisco.com>
Thu, 19 Mar 2015 15:01:15 +0000 (16:01 +0100)
Restconf was relying on the remote devices to contain restconf yang model. Now
Restconf relies on the controller's schema context when it serializes the
modules response.

Change-Id: Ib406d0082a5aafb7e894440ee5f75e5032ea35ba
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/restconf/impl/RestconfImpl.java

index 814273e..c000637 100644 (file)
@@ -266,7 +266,7 @@ public class RestconfImpl implements RestconfService {
         moduleContainerBuilder.withChild(mountPointModulesMap);
 
         return new NormalizedNodeContext(new InstanceIdentifierContext(null, modulesSchemaNode,
-                mountPoint, schemaContext), moduleContainerBuilder.build());
+                mountPoint, controllerContext.getGlobalSchema()), moduleContainerBuilder.build());
     }
 
     @Override

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.