<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:26 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-834] Duplicated list key in RESTCONF payload does not produce ERROR</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-834</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Current yang parser does not throw any error if user enters duplicated list key in config DS. Moreover the yang parser merges the overlapping data without notifying the user/application about the original data modification.&lt;/p&gt;

&lt;p&gt;To reproduce:&lt;/p&gt;

&lt;p&gt;1) Install openflow feature:&lt;/p&gt;

&lt;p&gt;feature:install odl-openflowplugin-flow-services-rest&lt;/p&gt;

&lt;p&gt;2) Send following request with duplicated key (id) and check controller does not reject the request:&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;
POST http:&lt;span class=&quot;code-comment&quot;&gt;//192.168.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0
&lt;/span&gt;{
      &lt;span class=&quot;code-quote&quot;&gt;&quot;flow&quot;&lt;/span&gt;: [
        {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;match&quot;&lt;/span&gt;: {
            &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-match&quot;&lt;/span&gt;: {
              &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-type&quot;&lt;/span&gt;: {
                &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: 2048
              }
            },
            &lt;span class=&quot;code-quote&quot;&gt;&quot;ipv4-destination&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;10.0.10.0/24&quot;&lt;/span&gt;
          },
          &lt;span class=&quot;code-quote&quot;&gt;&quot;priority&quot;&lt;/span&gt;: 2,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;table_id&quot;&lt;/span&gt;: 0
        },
        {
          &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;match&quot;&lt;/span&gt;: {
            &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-match&quot;&lt;/span&gt;: {
              &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-type&quot;&lt;/span&gt;: {
                &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: 2048
              }
            },
            &lt;span class=&quot;code-quote&quot;&gt;&quot;ipv4-destination&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;10.0.20.0/24&quot;&lt;/span&gt;
          },
          &lt;span class=&quot;code-quote&quot;&gt;&quot;priority&quot;&lt;/span&gt;: 2,
          &lt;span class=&quot;code-quote&quot;&gt;&quot;table_id&quot;&lt;/span&gt;: 0
        }
      ]
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;3) Check parser has merged 2 list objects in one:&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;
GET http:&lt;span class=&quot;code-comment&quot;&gt;//192.168.0.1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0
&lt;/span&gt;{
    &lt;span class=&quot;code-quote&quot;&gt;&quot;flow-node-inventory:table&quot;&lt;/span&gt;: [
        {
            &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;: 0,
            &lt;span class=&quot;code-quote&quot;&gt;&quot;flow&quot;&lt;/span&gt;: [
                {
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;id&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;1&quot;&lt;/span&gt;,
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;match&quot;&lt;/span&gt;: {
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-match&quot;&lt;/span&gt;: {
                            &lt;span class=&quot;code-quote&quot;&gt;&quot;ethernet-type&quot;&lt;/span&gt;: {
                                &lt;span class=&quot;code-quote&quot;&gt;&quot;type&quot;&lt;/span&gt;: 2048
                            }
                        },
                        &lt;span class=&quot;code-quote&quot;&gt;&quot;ipv4-destination&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;10.0.10.0/24&quot;&lt;/span&gt;
                    },
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;priority&quot;&lt;/span&gt;: 2,
                    &lt;span class=&quot;code-quote&quot;&gt;&quot;table_id&quot;&lt;/span&gt;: 0
                }
            ]
        }
    ]
} 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="28766">YANGTOOLS-834</key>
            <summary>Duplicated list key in RESTCONF payload does not produce ERROR</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</priority>
                        <status id="1" iconUrl="https://jira.opendaylight.org/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="blue-gray"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="ecelgp">Luis Gomez</reporter>
                        <labels>
                    </labels>
                <created>Tue, 14 Nov 2017 03:31:13 +0000</created>
                <updated>Tue, 20 Feb 2018 09:16:52 +0000</updated>
                                                                            <component>codecs</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="60037" author="rovarga" created="Tue, 14 Nov 2017 04:48:02 +0000"  >&lt;p&gt;My understanding is that the parser picked the first one and propagated that. JSON parser is supposed to be compliant with &lt;a href=&quot;https://tools.ietf.org/html/rfc7951#section-5.4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc7951#section-5.4&lt;/a&gt;, which does not specify behavior when malformed JSON is encountered. As far as I can tell this is not a valid encoding and neither RFC7159 nor RFC7951 define a behaviour in this case.&lt;/p&gt;

&lt;p&gt;Are you proposing we define a behavior? If so, can you please specify the expected behaviour in formal terms consistent with above specifications, please?&lt;/p&gt;</comment>
                            <comment id="60039" author="ecelgp" created="Tue, 14 Nov 2017 05:37:55 +0000"  >&lt;p&gt;I see same behavior with XML so I believe this issue is independent of JSON/XML encoding.&lt;/p&gt;

&lt;p&gt;If I look at RFC 6020 section 7.8.2 &lt;a href=&quot;https://tools.ietf.org/html/rfc6020#page-68&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/rfc6020#page-68&lt;/a&gt; : &quot;The combined values of all the leafs specified in the key are used to uniquely identify a list entry.&quot;&lt;/p&gt;

&lt;p&gt;The above seems to infer a duplicated key in a list is an invalid input and therefore I think the right thing to do is to reject the request instead of accepting it and propagate a different input.&lt;/p&gt;</comment>
                            <comment id="61118" author="rovarga" created="Tue, 20 Feb 2018 09:16:52 +0000"  >&lt;p&gt;It is true the issue is not dependent on encoding, as all the specifications involved do not say anything about conflicting entries being present on input &#8211; hence we are moving in a grey area where compliance is concerned.&lt;/p&gt;

&lt;p&gt;In this case Postel&apos;s Law applies, I think and this should be an explicit opt-in, if anything.&lt;/p&gt;</comment>
                    </comments>
                    <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|i037p3:</customfieldvalue>

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