+/*
+ * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
package org.opendaylight.controller.sal.connect.netconf;
import static org.opendaylight.controller.sal.connect.netconf.util.NetconfMessageTransformUtil.NETCONF_DATA_QNAME;
public final static class RemoteYangSchema {
private final QName qname;
- private RemoteYangSchema(final QName qname) {
+ RemoteYangSchema(final QName qname) {
this.qname = qname;
}
QName childNode = NetconfMessageTransformUtil.IETF_NETCONF_MONITORING_SCHEMA_FORMAT;
String formatAsString = getSingleChildNodeValue(schemaNode, childNode).get();
- //This is HotFix for situations where format statement in netconf-monitoring might be passed with prefix.
- if (formatAsString.contains(":")) {
- final String[] prefixedString = formatAsString.split(":");
- //FIXME: might be good idea to check prefix against model namespace
- formatAsString = prefixedString[1];
- }
- if(formatAsString.equals(Yang.QNAME.getLocalName()) == false) {
+
+ if(formatAsString.equals(Yang.QNAME.toString()) == false) {
LOG.debug("{}: Ignoring schema due to unsupported format: {}", id, formatAsString);
return Optional.absent();
}