<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:08:30 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>[MDSAL-45] InstanceIdentifier does not properly capture choice-case child relationship</title>
                <link>https://jira.opendaylight.org/browse/MDSAL-45</link>
                <project id="10137" key="MDSAL">mdsal</project>
                    <description>&lt;p&gt;yang model:&lt;/p&gt;

&lt;p&gt;augment &quot;&amp;lt;path&amp;gt;tables/routes&quot; {&lt;br/&gt;
  case linkstate-routes-case {	&lt;br/&gt;
        container linkstate-routes {	&lt;br/&gt;
	    list linkstate-route {&lt;br/&gt;
...&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Works fine with InstanceIdentifier constructed like this:&lt;/p&gt;

&lt;p&gt;iid = InstanceIdentifier.create(..).child(Tables.class, new TablesKey(..))&lt;br/&gt;
            .child(LinkstateRoutes.class).child(LinkstateRoute.class, new LinkstateRouteKey(this.linkNlri));&lt;/p&gt;

&lt;p&gt;But when the container is moved to grouping:&lt;/p&gt;

&lt;p&gt;grouping linkstate-routes {&lt;br/&gt;
    container linkstate-routes {	&lt;br/&gt;
	    list linkstate-route &lt;/p&gt;
{
                ....
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;augment &quot;&amp;lt;path&amp;gt;tables/routes&quot; {&lt;br/&gt;
  case linkstate-routes-case {	&lt;br/&gt;
     uses linkstate-routes;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;The instance identifier gives following compilation error:&lt;/p&gt;

&lt;p&gt;Bound mismatch: The generic method child(Class&amp;lt;N&amp;gt;) of type InstanceIdentifier&amp;lt;T&amp;gt; is not applicable for the arguments (Class&amp;lt;LinkstateRoutes&amp;gt;). The inferred type LinkstateRoutes is not a valid substitute for the bounded parameter &amp;lt;N extends ChildOf&amp;lt;? super Tables&amp;gt;&amp;gt;&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="26867">MDSAL-45</key>
            <summary>InstanceIdentifier does not properly capture choice-case child relationship</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</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="rovarga">Robert Varga</assignee>
                                    <reporter username="dkutenicsova">Dana Kutenicsova</reporter>
                        <labels>
                    </labels>
                <created>Thu, 28 Aug 2014 14:16:52 +0000</created>
                <updated>Fri, 22 Jun 2018 12:19:21 +0000</updated>
                            <resolved>Fri, 22 Jun 2018 12:19:21 +0000</resolved>
                                                    <fixVersion>Fluorine</fixVersion>
                                    <component>Binding API</component>
                    <component>Binding codegen</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="63084" author="rovarga" created="Wed, 23 May 2018 13:50:28 +0000"  >&lt;p&gt;I think the solution to this conundrum lies with &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-310&quot; title=&quot;Instance Identifier is unable to represent Choice / Case, only children&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-310&quot;&gt;&lt;del&gt;MDSAL-310&lt;/del&gt;&lt;/a&gt;&apos;s approach to fixing the problem. Essentially we can have two modes of addressing:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;direct child when unambiguous, crossing tables-&amp;gt;linkstate-routes, as is the case when the container is outside of the grouping&lt;/li&gt;
	&lt;li&gt;Intermediate addressing, which includes the item for the choice/case &#8211; requiring the user to specify the Case node (which would implement ChildOf&amp;lt;Tables&amp;gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This is slightly confusing, though, as suddenly it looks like you should be able to read the case node directly from the data store... Which you probably don&apos;t want &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/sad.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; Unfortunately we do not generate proper grouping instantiations, hence we are not getting a class for &apos;container linkstate-routes&apos; as instantiated by uses in case &#8211; that class would have ChildOf&amp;lt;Tables&amp;gt;.&lt;/p&gt;</comment>
                            <comment id="63088" author="rovarga" created="Wed, 23 May 2018 17:47:48 +0000"  >&lt;p&gt;Thinking about it a bit more, we really need a new marker interfaces:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;ChoiceIn&amp;lt;T&amp;gt;, which will mimic ChildOf&amp;lt;T&amp;gt; except being a DataObject&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Then we need a new InstanceIdentifierBuilder method, which will have a prototype like:&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;&amp;lt;C extends ChoiceIn&amp;lt;? super T&amp;gt;, N extends ChildOf&amp;lt;? super C&amp;gt; InstanceIdentifierBuilder&amp;lt;N&amp;gt; caseChild(Class&amp;lt;C&amp;gt; caze, Class&amp;lt;N&amp;gt; child);&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Hence access to a case&apos;s children (which is the problem here) is solved. This does not solve the problem addressing choices or their cases themselves.&lt;/p&gt;</comment>
                            <comment id="63090" author="rovarga" created="Wed, 23 May 2018 18:00:24 +0000"  >&lt;p&gt;To fix that problem, one of the two needs to budge:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;interfaces generated for choices would have to become a DataObject&lt;/li&gt;
	&lt;li&gt;InstanceIdentifier&amp;lt;T extends DataObject&amp;gt; needs to be lowered to InstanceIdentifier&amp;lt;T extends DataContainer&amp;gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;The first is not really an option, as DataObject guarantees implementation, whereas there can be no implementation for a choice. That leaves us with 2) as the only option.&lt;/p&gt;

&lt;p&gt;That should work, as DataContainers are not subject of ChildOf, hence if you jump to a choice in InstanceIdentifierBuilder, you are stuck and cannot move down. This is fine for read/write, as you can move towards a particular case instantiation (which is a dataobject) via checking &apos;instanceof&apos;.&lt;/p&gt;

&lt;p&gt;The problem here, though, is DataTreeChangeListeners and &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-342&quot; title=&quot;DataObjectModification not able find child via getModifiedChildContainer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-342&quot;&gt;&lt;del&gt;MDSAL-342&lt;/del&gt;&lt;/a&gt;: it will suddenly become possible to subscribe to choices and we need to figure out whether that is something we want to allow &#8211; we can support it via overwrites, but the conversation around how you navigate downwards from there is ... dicey.&lt;/p&gt;</comment>
                            <comment id="63092" author="rovarga" created="Wed, 23 May 2018 18:22:14 +0000"  >&lt;p&gt;Hence let&apos;s focus this issue on solving addressing case/grouping children. &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-342&quot; title=&quot;DataObjectModification not able find child via getModifiedChildContainer&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-342&quot;&gt;&lt;del&gt;MDSAL-342&lt;/del&gt;&lt;/a&gt; then will deal with provide a similar API to arrive to modifications of ambiguous children. &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-310&quot; title=&quot;Instance Identifier is unable to represent Choice / Case, only children&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-310&quot;&gt;&lt;del&gt;MDSAL-310&lt;/del&gt;&lt;/a&gt; will then focus on addressability of choices and cases.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10000">
                    <name>Blocks</name>
                                            <outwardlinks description="blocks">
                                        <issuelink>
            <issuekey id="30008">MDSAL-342</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="26865">MDSAL-310</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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1644</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=1644]]></customfieldvalue>

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

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

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

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

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