Change-Id: Ia2dca873d6447c5adb539dee1376718e405727d7
Signed-off-by: Andrej Mak <andmak@cisco.com>
}
public static Element toXml(ServiceRegistryWrapper serviceRegistryWrapper, Document document) {
}
public static Element toXml(ServiceRegistryWrapper serviceRegistryWrapper, Document document) {
- Element root = XmlUtil.createElement(document, XmlMappingConstants.SERVICES_KEY, Optional.of(XmlMappingConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG));
+ final Optional<String> configNs = Optional.of(XmlMappingConstants.URN_OPENDAYLIGHT_PARAMS_XML_NS_YANG_CONTROLLER_CONFIG);
+ Element root = XmlUtil.createElement(document, XmlMappingConstants.SERVICES_KEY, configNs);
Map<String, Map<String, Map<String, String>>> mappedServices = serviceRegistryWrapper.getMappedServices();
for (Entry<String, Map<String, Map<String, String>>> namespaceToRefEntry : mappedServices.entrySet()) {
for (Entry<String, Map<String, String>> serviceEntry : namespaceToRefEntry.getValue().entrySet()) {
// service belongs to config.yang namespace
Map<String, Map<String, Map<String, String>>> mappedServices = serviceRegistryWrapper.getMappedServices();
for (Entry<String, Map<String, Map<String, String>>> namespaceToRefEntry : mappedServices.entrySet()) {
for (Entry<String, Map<String, String>> serviceEntry : namespaceToRefEntry.getValue().entrySet()) {
// service belongs to config.yang namespace
- Element serviceElement = XmlUtil.createElement(document, SERVICE_KEY, Optional.<String>absent());
+ Element serviceElement = XmlUtil.createElement(document, SERVICE_KEY, configNs);
root.appendChild(serviceElement);
// type belongs to config.yang namespace
root.appendChild(serviceElement);
// type belongs to config.yang namespace