<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:01 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[NETCONF-430] get-config and edit-config fail with schemaless mount points</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-430</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;ODL Boron release introduced schemaless netconf mount points &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; to deal with devices that do not offer YANG models. This feature can also be used as a workaround for devices whose YANG model cannot be parsed by ODL.&lt;/p&gt;

&lt;p&gt;I developed a proof-of-concept ODL application in order to figure out how to work with schemaless netconf mount points. Its code can be found on github &lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;, and it can be used to reproduce the problem.&lt;/p&gt;

&lt;p&gt;Getting or editing the configuration of a schemaless-mounted netconf device from the code of an ODL application results in a NullPointerException. Example while trying to read the configuration of a Juniper device:&lt;/p&gt;

&lt;p&gt;2017-06-02 11:05:06,955 | ERROR | tp1288045576-189 | ContainerResponse                | 232 - com.sun.jersey.jersey-server - 1.17.0 | The RuntimeException could not be mapped to a response, re-throwing to the HTTP container&lt;br/&gt;
java.lang.NullPointerException: Cannot find (&lt;a href=&quot;http://xml.juniper.net/xnm/1.1/xnm)configuration&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://xml.juniper.net/xnm/1.1/xnm)configuration&lt;/a&gt; node in schema context. Instance identifier has to start from root&lt;br/&gt;
		at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:250)&lt;span class=&quot;error&quot;&gt;&amp;#91;65:com.google.guava:18.0.0&amp;#93;&lt;/span&gt;&lt;br/&gt;
		at org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes.fromInstanceId(ImmutableNodes.java:134)&lt;span class=&quot;error&quot;&gt;&amp;#91;81:org.opendaylight.yangtools.yang-data-impl:1.1.0.Carbon&amp;#93;&lt;/span&gt;&lt;br/&gt;
		at org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes.fromInstanceId(ImmutableNodes.java:105)&lt;span class=&quot;error&quot;&gt;&amp;#91;81:org.opendaylight.yangtools.yang-data-impl:1.1.0.Carbon&amp;#93;&lt;/span&gt;&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.util.NetconfMessageTransformUtil.toFilterStructure(NetconfMessageTransformUtil.java:170)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.util.NetconfRpcStructureTransformer.toFilterStructure(NetconfRpcStructureTransformer.java:44)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.util.NetconfBaseOps.getConfig(NetconfBaseOps.java:170)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.util.NetconfBaseOps.getConfigRunning(NetconfBaseOps.java:205)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.util.NetconfBaseOps.getConfigRunningData(NetconfBaseOps.java:184)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.sal.tx.ReadOnlyTx.readConfigurationData(ReadOnlyTx.java:42)&lt;br/&gt;
		at org.opendaylight.netconf.sal.connect.netconf.sal.tx.ReadOnlyTx.read(ReadOnlyTx.java:66)&lt;br/&gt;
		at com.bcom.pocnetconfschemaless.impl.Hostname.getHostname(Hostname.java:89)&lt;/p&gt;

&lt;p&gt;This is quite unexpected because we&apos;re working in schemaless mode. So ODL should not look for a schema, and there should not be an exception.&lt;/p&gt;

&lt;p&gt;The traceback shows that ODL uses a NetconfRpcStructureTransformer, while it should use a SchemalessRpcStructureTransformer.&lt;/p&gt;

&lt;p&gt;Looking for ODL behaviour at mount time with a debugger, we can see that the NetconfBaseOps object is created with the wrong transformer. As a matter of fact, in the NetconfBaseOps constructor, the &quot;rpc instanceof SchemalessNetconfDeviceRpc&quot; test fails. Investigation shows that rpc is a KeepAliveSalFacade.KeepAliveDomRpcService object, while rpc.deviceRpc is a SchemalessNetconfDeviceRpc object.&lt;/p&gt;

&lt;p&gt;I will submit a patch that fixes the issue.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/38300/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/38300/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt; &lt;a href=&quot;https://github.com/b-com/pocnetconfschemaless&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/b-com/pocnetconfschemaless&lt;/a&gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="21443">NETCONF-430</key>
            <summary>get-config and edit-config fail with schemaless mount points</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="gwenael.lambrouin@b-com.com">Gwenael Lambrouin</assignee>
                                    <reporter username="gwenael.lambrouin@b-com.com">Gwenael Lambrouin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 15 Jun 2017 07:45:41 +0000</created>
                <updated>Fri, 15 Mar 2019 22:22:42 +0000</updated>
                            <resolved>Wed, 28 Jun 2017 14:13:09 +0000</resolved>
                                                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="40100" author="gwenael.lambrouin@b-com.com" created="Fri, 23 Jun 2017 08:32:52 +0000"  >&lt;p&gt;Patch submitted for review here:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/59068/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/59068/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="40101" author="gwenael.lambrouin@b-com.com" created="Wed, 28 Jun 2017 14:13:09 +0000"  >&lt;p&gt;Patch merged on:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;stable/carbon&lt;/li&gt;
	&lt;li&gt;master (nitrogen)&lt;/li&gt;
	&lt;li&gt;stable/boron&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8697</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=8697]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10324"><![CDATA[Carbon-SR1]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i01yhr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>