<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55:55 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-1356] Introduce model.api.stmt.DataNodeIdentifier</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1356</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;We are faced again and again with the problem of interfacing various constructs which boil down to addressing YANG-modeled data.&lt;/p&gt;

&lt;p&gt;The usual solution involves YangInstanceIdentifier, but that has non-trivial mapping to YANG due to its addressing mode of operation, which takes into account keyed list entries as well as augmentations. It also accumulated weird things like:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;wildcards, i.e. the use of NodeIdentifier to say &apos;match all MapEntryNodes&apos;&lt;/li&gt;
	&lt;li&gt;partial matches, i.e. NodeIdentifierWithPredicates without all the keys corresponding to schema present&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In yang-model-api we have had a similar (but different) problem with SchemaPath, which we solved through introduction of SchemaNodeIdentifier and EffectiveStatementInference, each of which has a narrow scope of what it solves and how it operates.&lt;/p&gt;

&lt;p&gt;At the end of the day, at least where NETCONF/RESTCONF is concerned, we really need an identifier which works strictly on YANG data tree addressing, pure and simple. At the heart of it is something like:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;DataTreeStep {
  QName nodeId;
  Map&amp;lt;QName, &lt;span class=&quot;code-object&quot;&gt;Object&lt;/span&gt;&amp;gt; predicates; &lt;span class=&quot;code-comment&quot;&gt;// may be empty
&lt;/span&gt;}

&lt;span class=&quot;code-keyword&quot;&gt;class &lt;/span&gt;DataTreeIdentifier {
  List&amp;lt;DataTreeStep&amp;gt; steps; &lt;span class=&quot;code-comment&quot;&gt;// at least one
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Taking the YangInstanceIdentifier/wildcard case to heart, though, we need  two dedicated specializations of that structure:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;one for read requests, where it is treated like a NETCONF subtree filter&lt;/li&gt;
	&lt;li&gt;one for read responses, where it is treated like a proper instance identifier, i.e. predicates for list keys are fully populated.&lt;br/&gt;
The specializations must not share a (publicly visible) superclass, so that there is no way of confusing the request and response side. The DataTreeIdentifier -&amp;gt; DataTreeFilter conversion is trivial.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;We then should provide schema-assisted utilities to covert:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;DataTreeFilter -&amp;gt; DataTreeIdentifier, which validates the filter specifies all key list predicates&lt;/li&gt;
	&lt;li&gt;DataTreeIdentifier &amp;lt;-&amp;gt; exact YangInstanceIdentifier&lt;/li&gt;
	&lt;li&gt;DataTreeFilter -&amp;gt; wildcard YangInstanceIdentifier which matches the superset of the DataTreeFilter (plus a structure describing what are the parts where a DataTreeChangeListener is providing a superset)&lt;/li&gt;
	&lt;li&gt;partial/wildcard YangInstanceIdentifier -&amp;gt; DataTreeFilter&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This toolkit should make life a lot easier for our downstreams.&lt;/p&gt;</description>
                <environment></environment>
        <key id="34802">YANGTOOLS-1356</key>
            <summary>Introduce model.api.stmt.DataNodeIdentifier</summary>
                <type id="10103" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10311&amp;avatarType=issuetype">New Feature</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="10001">Won&apos;t Do</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                            <label>pt</label>
                    </labels>
                <created>Tue, 26 Oct 2021 19:11:19 +0000</created>
                <updated>Sun, 10 Apr 2022 18:36:07 +0000</updated>
                            <resolved>Sun, 31 Oct 2021 22:20:30 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="70009" author="rovarga" created="Tue, 26 Oct 2021 22:54:28 +0000"  >&lt;p&gt;So we first need DataTreeIdentifier, as it is a direct counterpart to SchemaNodeIdentifier. Both should live in yang.common.&lt;/p&gt;</comment>
                            <comment id="70011" author="rovarga" created="Wed, 27 Oct 2021 00:06:48 +0000"  >&lt;p&gt;Since SchemaNodeIdentifier already exists, it takes precedence and will be the first to land in yang-common.&lt;/p&gt;</comment>
                            <comment id="70021" author="rovarga" created="Sat, 30 Oct 2021 22:58:01 +0000"  >&lt;p&gt;Actually no, these things do should not live in yang.common.&lt;br/&gt;
First of all, the use case for DataNodeFilter is already filled in by use of restricted yang-xpath-api construct &amp;#8211; so we actually have to correct representation with all the flexibility we will ever need.&lt;br/&gt;
That leaves DataNodeIdentifier, whcih is a counterpart to yang-data-api&apos;s YangInstanceIdentifier, really. For that simple reason we should not be exposing it in yang.common, as it will cause confusion to yang-data-api&apos;s users.&lt;br/&gt;
Users who overlap the two already get exposure to SchemaNodeIdentifier and a yang-model-api construct, so it is only fair they get the DataNodeIdentifier visibility as well.&lt;/p&gt;</comment>
                            <comment id="70022" author="rovarga" created="Sun, 31 Oct 2021 22:20:30 +0000"  >&lt;p&gt;As it turns out we have the correct contract available in yang-xpath-api, and we have a instance-identifier parser available in YangXPathExpression.interpretAsInstanceIdentifier().&lt;br/&gt;
All we need to do is expose it as a separate parsing construct.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                                                <inwardlinks description="is blocked by">
                                        <issuelink>
            <issuekey id="34806">YANGTOOLS-1358</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="28764">YANGTOOLS-832</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="34103">YANGTOOLS-1295</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="32789">YANGTOOLS-1114</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|i040f3:</customfieldvalue>

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