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 814273ebc0dc6ba1205fa3a7c93dd97152e38034..c0006377231a4b4e3dd261c0419c1b5d7248ba24 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