Updated xml generated by get netconf operation to conform to yang schema in config-api
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / mapping / runtime / Runtime.java
index da281269e63275b3b11c55f3aa4d439784f83469..8af1e0ee90e94fe7c009eb93ece4b1f478b16d4f 100644 (file)
@@ -66,9 +66,12 @@ public class Runtime {
                 if (instanceToRbe == null)
                     continue;
 
-                ModuleRuntime moduleRuntime = moduleRuntimes.get(localNamespace).get(moduleName);
-                Element innerXml = moduleRuntime.toXml(localNamespace, instanceToRbe, document);
-                modulesElement.appendChild(innerXml);
+                for (String instanceName : instanceToRbe.keySet()) {
+                    ModuleRuntime moduleRuntime = moduleRuntimes.get(localNamespace).get(moduleName);
+                    Element innerXml = moduleRuntime.toXml(localNamespace, instanceName, instanceToRbe.get(instanceName), document);
+                    modulesElement.appendChild(innerXml);
+                }
+
             }
         }