<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:55: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>[YANGTOOLS-1037] Mis-ordered keyed list children in NETCONF requests</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-1037</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;When yang model has a list with multiple keys, ODL is not maintaining the order of the attributes while sending the request down to the netconf device. It appears from RFC 6020 that order needs to be strictly followed.&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;&quot;The list&apos;s key nodes are encoded as subelements to the list&apos;s identifier element, in the same order as they are defined within the &quot;key&quot; statement.&quot;&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Mainly my vendor device does not complain while creating the list with out of order but during deletion complains with error.&lt;/p&gt;

&lt;p&gt;Yang model example:&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;
container acl-config {
    list acl-config-list {
    key &lt;span class=&quot;code-quote&quot;&gt;&quot;tenant-id access-control-list-id&quot;&lt;/span&gt;;
    leaf tenant-id {
        type leafref {
        path &lt;span class=&quot;code-quote&quot;&gt;&quot;/tenant:tenant-config/tenant:tenant-list/tenant:tenant-id&quot;&lt;/span&gt;;
        }
    description
        &lt;span class=&quot;code-quote&quot;&gt;&quot;Unique identifier of the Tenant&quot;&lt;/span&gt;;
    }

    leaf access-control-list-id {
        type custom-id;
        mandatory &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
        description
            &lt;span class=&quot;code-quote&quot;&gt;&quot;Unique ACL identifier&quot;&lt;/span&gt;;
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;ODL while encoding during delete operation sends the request as below:&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;
&amp;lt;edit-config&amp;gt;
  &amp;lt;target&amp;gt;
    &amp;lt;running/&amp;gt;
  &amp;lt;/target&amp;gt;
  &amp;lt;&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-operation&amp;gt;none&amp;lt;/&lt;span class=&quot;code-keyword&quot;&gt;default&lt;/span&gt;-operation&amp;gt;
  &amp;lt;error-option&amp;gt;rollback-on-error&amp;lt;/error-option&amp;gt;
  &amp;lt;config&amp;gt;
    &amp;lt;acl-config xmlns=&lt;span class=&quot;code-quote&quot;&gt;&quot;http:&lt;span class=&quot;code-comment&quot;&gt;//example.com/acl&quot;&lt;/span&gt;&amp;gt;
&lt;/span&gt;      &amp;lt;acl-config-list&amp;gt;
        &amp;lt;access-control-list-id&amp;gt;acl7&amp;lt;/access-control-list-id&amp;gt;
        &amp;lt;tenant-id&amp;gt;f81d4fae-7dec-11d0-a765-00a0c91e6bf6&amp;lt;/tenant-id&amp;gt;
        &amp;lt;acl-dst-config xmlns:a=&lt;span class=&quot;code-quote&quot;&gt;&quot;urn:ietf:params:xml:ns:netconf:base:1.0&quot;&lt;/span&gt; a:operation=&lt;span class=&quot;code-quote&quot;&gt;&quot;delete&quot;&lt;/span&gt;/&amp;gt;
      &amp;lt;/acl-config-list&amp;gt;
    &amp;lt;/acl-config&amp;gt;
  &amp;lt;/config&amp;gt;
&amp;lt;/edit-config&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I expected tenant-id to be encoded first rather than access-control-list-id as per key order defined in yang. Device throwing below error during delete operation:&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;
&amp;lt;rpc-error&amp;gt;
  &amp;lt;error-type&amp;gt;protocol&amp;lt;/error-type&amp;gt;
  &amp;lt;error-tag&amp;gt;missing-element&amp;lt;/error-tag&amp;gt;
  &amp;lt;error-severity&amp;gt;error&amp;lt;/error-severity&amp;gt;
  &amp;lt;error-message xml:lang=&lt;span class=&quot;code-quote&quot;&gt;&quot;en&quot;&lt;/span&gt;&amp;gt;Invalid position of the key &lt;span class=&quot;code-quote&quot;&gt;&quot;tenant-id&quot;&lt;/span&gt; in a list &lt;span class=&quot;code-quote&quot;&gt;&quot;acl-config-list&quot;&lt;/span&gt;.&amp;lt;/error-message&amp;gt;
  &amp;lt;error-info&amp;gt;
    &amp;lt;bad-element&amp;gt;/access_control_list:acl-config/acl-config-list[access-control-list-id=&lt;span class=&quot;code-quote&quot;&gt;&apos;acl7&apos;&lt;/span&gt;]/tenant-id&amp;lt;/bad-element&amp;gt;
  &amp;lt;/error-info&amp;gt;
&amp;lt;/rpc-error&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="32167">YANGTOOLS-1037</key>
            <summary>Mis-ordered keyed list children in NETCONF requests</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.opendaylight.org/images/icons/priorities/critical.svg">High</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="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Tue, 5 Nov 2019 11:47:42 +0000</created>
                <updated>Thu, 26 Dec 2019 17:36:25 +0000</updated>
                            <resolved>Tue, 5 Nov 2019 20:42:44 +0000</resolved>
                                    <version>2.0.20</version>
                    <version>3.0.6</version>
                    <version>2.1.13</version>
                    <version>4.0.2</version>
                    <version>2.0.23</version>
                                    <fixVersion>4.0.3</fixVersion>
                    <fixVersion>3.0.7</fixVersion>
                    <fixVersion>2.1.14</fixVersion>
                                    <component>data-impl</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="67359" author="rovarga" created="Tue, 5 Nov 2019 12:11:28 +0000"  >&lt;p&gt;As it turns out, NETCONF is using ImmutableNodes.fromInstanceId() (and hence InstanceIdToCompositeNodes) to create a NormalizedNode document representing the NETCONF filter structure, which is then passed to the XML codec for emission (via an ordered NormalizedNodeWriter).&lt;/p&gt;

&lt;p&gt;Both InstanceIdToCompositeNodes and NormalizedNodeWriter rely on NodeIdentifierWithPredicates.entrySet()&apos;s iteration order for child emission, assuming the order matches the key definition order in schema. While this assumption used to be&#160; true (most of the time), it was never documented and in general has not been true for 3+ years now. In order to write the entries in their proper format, the transformation code needs access to the corresponding ListSchemaNode &#8211; something InstanceIdToCompositeNodes has, while NormalizedNodeWriter does not.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="31017">NETCONF-581</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|i03puf:</customfieldvalue>

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