X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-netconf-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fconnect%2Fnetconf%2FNetconfStateSchemas.java;h=3874040c2eab645a80909281b9eebcbda2d9b02c;hb=763637814399c58b48d4203766c7e87e64a8406c;hp=aa0897e021cdd2402ae539bd0536fc89fda3c270;hpb=40c2487f8068ee8ba045798d3be716899c77a6e6;p=controller.git diff --git a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfStateSchemas.java b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfStateSchemas.java index aa0897e021..3874040c2e 100644 --- a/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfStateSchemas.java +++ b/opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/NetconfStateSchemas.java @@ -1,3 +1,11 @@ +/* + * 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; @@ -174,7 +182,7 @@ public final class NetconfStateSchemas { public final static class RemoteYangSchema { private final QName qname; - private RemoteYangSchema(final QName qname) { + RemoteYangSchema(final QName qname) { this.qname = qname; } @@ -188,13 +196,8 @@ public final class NetconfStateSchemas { 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(); }