<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:56:05 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>[YANGTOOLS-1415] Deal with leading YangInstanceIdentifier fragment</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1415</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;We currently expect the inference to correctly point to the schema tree parent of the node that is being parsed.&lt;/p&gt;

&lt;p&gt;This unfortunately is not entirely correct, as RESTCONF demonstrates: after parsing the data tree path (from URL), it also has to peek at the document to determine the additional YangInstanceIdentifier steps required for the document root to be reached and adjust the inference it passes to XmlParserStream. JSON codec does something different &#8211; it seems to be able to recover and we adjust the path after the parser result. See JsonNormalizedNodeBodyReader and XmlNormalizedNodeBodyReader for details.&lt;/p&gt;

&lt;p&gt;What we really want to achieve is a single-pass parsing environment, where RESTCONF will give us the data tree identifier (e.g. YangInstanceIdentifier) and we figure out the missing steps as part of initialization &#8211; and communicate those back to it.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="35408">YANGTOOLS-1415</key>
            <summary>Deal with leading YangInstanceIdentifier fragment</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</priority>
                        <status id="3" iconUrl="https://jira.opendaylight.org/images/icons/statuses/inprogress.png" description="This issue is being actively worked on at the moment by the assignee.">In Progress</status>
                    <statusCategory id="4" key="indeterminate" colorName="yellow"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Mon, 28 Mar 2022 21:27:49 +0000</created>
                <updated>Thu, 18 Jan 2024 10:42:40 +0000</updated>
                                                            <fixVersion>11.0.6</fixVersion>
                    <fixVersion>13.0.2</fixVersion>
                                    <component>codecs</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="71570" author="rovarga" created="Tue, 25 Oct 2022 18:25:55 +0000"  >&lt;p&gt;The trouble here is that NormalizedNodeResult, from whence we take the resulting payload is a NormalizedNode implementation contract, which is not concerned with actual addressing.&lt;/p&gt;

&lt;p&gt;The contract here revolves around XmlParserStream.parse() and JsonParserStream.parse(): these are invoked after setting up the pipeline and end up processing a single document. As such, their current return value, which is the stream itself, is never used.&lt;/p&gt;

&lt;p&gt;As such, we need to define some sort of interface that both parsers implement, so that aside from setup (which should be a staged builder), the final bit of execution and evaluating the result is the same.&lt;/p&gt;</comment>
                            <comment id="72602" author="rovarga" created="Sat, 16 Sep 2023 06:55:26 +0000"  >&lt;p&gt;This goes a bit deeper. RESTCONF essentially has two modes of parsing:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;PUT, where we know the exact YangInstanceIdentifier of the resource&lt;/li&gt;
	&lt;li&gt;POST, where we know the YangInstanceIdentifier of the parent (sans the prefix mentioned here)&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;At least the XML codec fails to detect when the body of a PUT request does not match the identifier, for which we have a rather ugly dance (involving first parsing to org.w3c.dom.Document).&lt;br/&gt;
At the end of the day, I think we can get away with just providing two static methods, which will do the correct thing &amp;#8211; so that we do not have to worry about the intermediate setup leaking.&lt;/p&gt;

&lt;p&gt;The first method should deal with a PUT, validating whether the document element matches the requested Inference. There is a twist here, as while this method is universally useful, the way it deals with empty YangInstanceIdentifier is different between NETCONF and RESTCONF &amp;#8211; while the former wants a revision of SchemaContext.NAME, the latter wants the ietf-restconf:name.&lt;br/&gt;
The second method should deal with a POST, and should be returning the path prefix described above.&lt;/p&gt;</comment>
                            <comment id="72908" author="rovarga" created="Mon, 11 Dec 2023 21:49:55 +0000"  >&lt;p&gt;There is also a slight wrinkle we need to deal with: PUT on YangInstanceIdentifier.empty() needs to take an expected NodeIdentifier, as the datastore resource in RESTCONF has a different name than in NETCONF.&lt;br/&gt;
We therefore need two methods here &amp;#8211; and the one taking YangInstanceIdentifier must reject empty instance identifiers with IAE.&lt;/p&gt;

&lt;p&gt;We should capture this contract in an interface ... somewhere, somehow.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="36307">NETCONF-911</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i041w7:</customfieldvalue>

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