<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:00 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-822] Discover RPC operation through RESTCONF is failing with response 500</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-822</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Steps to reproduce:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Start Karaf&lt;/li&gt;
	&lt;li&gt;Install RESTCONF and topology features: &quot;&lt;em&gt;feature:install odl-restconf-all odl-netconf-topology&lt;/em&gt;&quot;&lt;/li&gt;
	&lt;li&gt;Send get request to retrieve server RPC operations: &quot;curl --request GET &apos;&lt;a href=&quot;http://localhost:8181/rests/operations&amp;#39;&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/rests/operations&apos;&lt;/a&gt; &quot;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;br/&gt;
 The request will fail because in SchemaInferenceStack class is trying to find RPC with name &quot;operations&quot; instead of returning all found RPCs operations:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;Caused by: java.lang.IllegalArgumentException: Data tree child (urn:ietf:params:xml:ns:yang:ietf-restconf)operations not present
	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.lambda$pushData$5(SchemaInferenceStack.java:799) ~[?:?]
	at java.util.Optional.orElseThrow(Optional.java:408) ~[?:?]
	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:798) ~[?:?]
	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushFirstData(SchemaInferenceStack.java:807) ~[?:?]
	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:787) ~[?:?]
	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.enterDataTree(SchemaInferenceStack.java:473) ~[?:?]
	at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.enterDataTree(NormalizedNodeStreamWriterStack.java:187) ~[?:?]
	at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.startContainerNode(NormalizedNodeStreamWriterStack.java:259) ~[?:?]
	at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.startContainerNode(JSONNormalizedNodeStreamWriter.java:305) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter.wasProcessedAsCompositeNode(ParameterAwareNormalizedNodeWriter.java:265) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter.write(ParameterAwareNormalizedNodeWriter.java:117) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter$OrderedParameterAwareNormalizedNodeWriter.write(ParameterAwareNormalizedNodeWriter.java:323) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeNormalizedNode(JsonNormalizedNodeBodyWriter.java:134) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeTo(JsonNormalizedNodeBodyWriter.java:72) ~[?:?]
	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeTo(JsonNormalizedNodeBodyWriter.java:47) ~[?:?]&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;More in attached Karaf logs and debug capture.&lt;/p&gt;</description>
                <environment></environment>
        <key id="34501">NETCONF-822</key>
            <summary>Discover RPC operation through RESTCONF is failing with response 500</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <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="rovarga">Robert Varga</assignee>
                                    <reporter username="PeterSuna">Peter Suna</reporter>
                        <labels>
                            <label>pt</label>
                            <label>regression</label>
                    </labels>
                <created>Wed, 29 Sep 2021 13:06:14 +0000</created>
                <updated>Tue, 5 Oct 2021 13:00:48 +0000</updated>
                            <resolved>Tue, 5 Oct 2021 13:00:48 +0000</resolved>
                                    <version>2.0.5</version>
                                    <fixVersion>2.0.6</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="69655" author="rovarga" created="Wed, 29 Sep 2021 17:54:35 +0000"  >&lt;p&gt;So from cursory glance there seems to be a disconnect between OperationsContainerSchemaNode, which reports its SchemaPath as /operations and JsonNormalizedNodeBodyWriter, which uses that to guide the JSON codec, which in turn talks to SchemaInferenceStack. Previously we just passed the OperationsContainerSchemaNode down the codec pipeline, which did its magic and happened to not trip over things like leafrefs (because there none), it&apos;s just simple empty leaves.&lt;/p&gt;

&lt;p&gt;This is rather unfortunate, as there is no straightforward way to fix this while retaining YANG-based codecs. Essentially ietf-restconf.yang forbids those leaves from existing as a baseline, simply because they do not exist in YANG model. The &apos;description&apos; statement, no matter how long it is, simply is not something YANG parser can use to conjure up the corresponding &apos;leaf&apos; statements into existence.&lt;/p&gt;</comment>
                            <comment id="69656" author="rovarga" created="Wed, 29 Sep 2021 18:19:25 +0000"  >&lt;p&gt;So there are essentially two things we could do:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ditch codecs for /operations and bypass the issue at least until the time someone else tries to decode things based on yang:data where this appears &#8211; essentially do not return NormalizedNodeContext from RestconfOperationsService.getOperations(UriInfo).&lt;/li&gt;
	&lt;li&gt;teach YANG parser about this particular wart, i.e. make it generate the missing leaf statements, so the generated NormalizedNode structure is valid. Since we already have a rfc8040-parser-support, its extension should be able to introduce these leaves as part of the reactor execution. Even if we do that, though, RESTCONF will need to be updated to not do the hack it is now doing and pass a proper EffectiveModelInference, not SchemaPath, down to codec. Everything needed for that should already be in place with &lt;a href=&quot;https://jira.opendaylight.org/browse/YANGTOOLS-1297&quot; title=&quot;Add support for infering on YangDataEffectiveStatement&quot; class=&quot;issue-link&quot; data-issue-key=&quot;YANGTOOLS-1297&quot;&gt;&lt;del&gt;YANGTOOLS-1297&lt;/del&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The second option does not work for bierman02, as it does not have a YANG extension and therefore YANG parser will not do anything for it.&lt;/p&gt;

&lt;p&gt;So let us:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;go with the first option for both bierman02 and rfc8040 first, which will resolve the immediate issue at hand&lt;/li&gt;
	&lt;li&gt;follow up with the rfc8040-parser-support improvement, which feels like something we should do since we explicitly know about the issue (by implementing the rc:yang-data extension)&lt;/li&gt;
	&lt;li&gt;switch rfc8040 back if we feel that is the best way we can do this&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="69657" author="rovarga" created="Wed, 29 Sep 2021 19:08:06 +0000"  >&lt;p&gt;So this is a major regression and it warrants a standalone release and perhaps re-spinning the (now 2 weeks late) Phosphorus GA.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="34602">YANGTOOLS-1337</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="34500">YANGTOOLS-1336</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="34603">YANGTOOLS-1338</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="16602" name="Capture.PNG" size="495414" author="PeterSuna" created="Wed, 29 Sep 2021 13:05:16 +0000"/>
                            <attachment id="16601" name="karaf.txt" size="448669" author="PeterSuna" created="Wed, 29 Sep 2021 13:05:28 +0000"/>
                    </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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03zv3:</customfieldvalue>

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