<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:16:12 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>[NETCONF-904] Data sent via yang-patch is validated in a different way than PUT / POST</title>
                <link>https://jira.opendaylight.org/browse/NETCONF-904</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;Data that is sent via yang-patch is validated in a different way than sending it via simple PUT/POST 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;
{    
     &lt;span class=&quot;code-quote&quot;&gt;&quot;ietf-restconf:yang-patch&quot;&lt;/span&gt;: {        
         &lt;span class=&quot;code-quote&quot;&gt;&quot;patch-id&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;patch-1&quot;&lt;/span&gt;,        
         &lt;span class=&quot;code-quote&quot;&gt;&quot;edit&quot;&lt;/span&gt;: [            
             {                
               &lt;span class=&quot;code-quote&quot;&gt;&quot;edit-id&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;edit1&quot;&lt;/span&gt;,                
               &lt;span class=&quot;code-quote&quot;&gt;&quot;operation&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;replace&quot;&lt;/span&gt;,                
               &lt;span class=&quot;code-quote&quot;&gt;&quot;target&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;/&quot;&lt;/span&gt;,                
               &lt;span class=&quot;code-quote&quot;&gt;&quot;value&quot;&lt;/span&gt;: {                    
                   &amp;lt;config&amp;gt;   
               }            
              }        
          ]    
      }
}  &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Opendaylight returns following error when data is sent via yang-patch:&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-quote&quot;&gt;&quot;errors&quot;&lt;/span&gt;: {
        &lt;span class=&quot;code-quote&quot;&gt;&quot;error&quot;&lt;/span&gt;: [
            {
                &lt;span class=&quot;code-quote&quot;&gt;&quot;error-type&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;protocol&quot;&lt;/span&gt;,
                &lt;span class=&quot;code-quote&quot;&gt;&quot;error-tag&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;malformed-message&quot;&lt;/span&gt;,
                &lt;span class=&quot;code-quote&quot;&gt;&quot;error-message&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Error parsing json input: Expected BEGIN_OBJECT but was NUMBER at line 22 column 63 path $.ietf-restconf:yang-patch.edit[0].value.&amp;lt;...&amp;gt;&quot;&lt;/span&gt;,
                &lt;span class=&quot;code-quote&quot;&gt;&quot;error-info&quot;&lt;/span&gt;: &lt;span class=&quot;code-quote&quot;&gt;&quot;Expected BEGIN_OBJECT but was NUMBER at line 22 column 63 path $.ietf-restconf:yang-patch.edit[0].value.data[0].&amp;lt;...&amp;gt;&quot;&lt;/span&gt;
            }
        ]
    }
} &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;For yang-patch all NUMBERS / BOOLEAN-values needs to be converted in order that it is acceppted from Opendaylight.&lt;/p&gt;

&lt;p&gt;&quot;Simple&quot; PUT / POST request accepts different types of values (number / boolean).&lt;/p&gt;</description>
                <environment></environment>
        <key id="36224">NETCONF-904</key>
            <summary>Data sent via yang-patch is validated in a different way than PUT / POST</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="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="-1">Unassigned</assignee>
                                    <reporter username="lenapeuk">Lena Peuker</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Oct 2022 06:40:15 +0000</created>
                <updated>Thu, 24 Nov 2022 12:04:54 +0000</updated>
                            <resolved>Thu, 24 Nov 2022 12:04:54 +0000</resolved>
                                                    <fixVersion>2.0.11</fixVersion>
                                    <component>restconf-nb</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="71541" author="ivanhrasko" created="Wed, 12 Oct 2022 14:21:15 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=lenapeuk&quot; class=&quot;user-hover&quot; rel=&quot;lenapeuk&quot;&gt;lenapeuk&lt;/a&gt;&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;
Expected BEGIN_OBJECT but was NUMBER at line 22 column 63&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;But the input is too short, it does not contain line 22.&lt;/p&gt;

&lt;p&gt;Can you please provide us with example of successful PUT/POST and unsuccessful PATCH with the same values/data?&lt;/p&gt;</comment>
                            <comment id="71631" author="JIRAUSER13801" created="Mon, 21 Nov 2022 16:18:09 +0000"  >&lt;p&gt;Example using the o-ran-delay-management module of the O-RAN simulator:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;PUT&lt;/b&gt;&lt;br/&gt;
&lt;em&gt;/rests/data/network-topology:network-topology/topology=topology-netconf/node=nts-ng-sim/yang-ext:mount/o-ran-delay-management:delay-management&lt;/em&gt;&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;{
&#160; &#160; &quot;o-ran-delay-management:delay-management&quot;: {
&#160; &#160; &#160; &#160; &quot;adaptive-delay-configuration&quot;: {
&#160; &#160; &#160; &#160; &#160; &#160; &quot;bandwidth-scs-delay-state&quot;: [
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;bandwidth&quot;: 3000,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;subcarrier-spacing&quot;: 20,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;o-du-delay-profile&quot;: {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;tx-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;ta4-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;t1a-max-up&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;rx-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;t1a-max-cp-dl&quot;: 100
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; ]
&#160; &#160; &#160; &#160; }
&#160; &#160; }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Corresponding &lt;b&gt;PATCH&lt;/b&gt;&lt;br/&gt;
&lt;em&gt;/restconf/config/network-topology:network-topology/topology/topology-netconf/node/nts-ng-sim/yang-ext:mount/&lt;/em&gt;&lt;br/&gt;
&#160;&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;{
&#160; &#160; &quot;ietf-restconf:yang-patch&quot;: {
&#160; &#160; &#160; &#160; &quot;patch-id&quot;: &quot;patch-1&quot;,
&#160; &#160; &#160; &#160; &quot;edit&quot;: [
&#160; &#160; &#160; &#160; &#160; &#160; {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;edit-id&quot;: &quot;edit1&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;operation&quot;: &quot;merge&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;target&quot;: &quot;/o-ran-delay-management:delay-management/o-ran-delay-management:adaptive-delay-configuration&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;value&quot;: {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;adaptive-delay-configuration&quot;: {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;bandwidth-scs-delay-state&quot;: [
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;bandwidth&quot;: 3000,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;subcarrier-spacing&quot;: 20,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;o-du-delay-profile&quot;: {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;tx-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;ta4-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;t1a-max-up&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;rx-max&quot;: 100,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;t1a-max-cp-dl&quot;: 200
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ]
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; ]
&#160; &#160; }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;b&gt;error message:&lt;/b&gt;&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;{
&#160; &#160; &quot;errors&quot;: {
&#160; &#160; &#160; &#160; &quot;error&quot;: [
&#160; &#160; &#160; &#160; &#160; &#160; {
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;error-type&quot;: &quot;protocol&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;error-tag&quot;: &quot;malformed-message&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;error-message&quot;: &quot;Error parsing json input: Expected BEGIN_OBJECT but was NUMBER at line 13 column 50 path $.ietf-restconf:yang-patch.edit[0].value.adaptive-delay-configuration.bandwidth-scs-delay-state[0].bandwidth&quot;,
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &quot;error-info&quot;: &quot;Expected BEGIN_OBJECT but was NUMBER at line 13 column 50 path $.ietf-restconf:yang-patch.edit[0].value.adaptive-delay-configuration.bandwidth-scs-delay-state[0].bandwidth&quot;
&#160; &#160; &#160; &#160; &#160; &#160; }
&#160; &#160; &#160; &#160; ]
&#160; &#160; }
}&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If all numerical values are submitted as strings (e.g. &quot;bandwidth: &quot;3000&quot;), the PATCH request is executed.&lt;/p&gt;</comment>
                            <comment id="71634" author="ivanhrasko" created="Tue, 22 Nov 2022 10:06:34 +0000"  >&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                            <comment id="71639" author="ivanhrasko" created="Wed, 23 Nov 2022 12:25:31 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=achrestin&quot; class=&quot;user-hover&quot; rel=&quot;achrestin&quot;&gt;achrestin&lt;/a&gt; You are using tow different versions of RESTCONF.&lt;/p&gt;

&lt;p&gt;With &lt;b&gt;rests/data&lt;/b&gt; you are using RFC8040 version what is better for you &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;With &lt;b&gt;restconf/config&lt;/b&gt; you are using bierman-02 version - which is deprecated and in recent ODL version removed.&lt;/p&gt;

&lt;p&gt;Please use &lt;em&gt;/rests/data/network-topology:network-topology/topology=topology-netconf/node=nts-ng-sim/yang-ext:mount&lt;/em&gt; as URI in your PATCH request and everything will be ok.&lt;/p&gt;</comment>
                            <comment id="71640" author="JIRAUSER13801" created="Wed, 23 Nov 2022 15:25:46 +0000"  >&lt;p&gt;Thanks for the clarification!&lt;/p&gt;


&lt;p&gt;Just a small addition:&lt;/p&gt;

&lt;p&gt;It seems that for the bierman-02 version, the Content-Type header field must be set to &quot;application/yang.patch+json&quot;, while it must be &quot;application/yang-patch+json&quot; for the RFC8040 version.&lt;/p&gt;</comment>
                            <comment id="71643" author="rovarga" created="Wed, 23 Nov 2022 16:16:12 +0000"  >&lt;p&gt;Yes, RFC8040 follows RFC8072, bierman02 follows draft-ietf-netconf-patch-XX, where XX is a number I do not remember.&lt;/p&gt;

&lt;p&gt;The evolution of media types is evident in the &lt;a href=&quot;https://datatracker.ietf.org/doc/html/draft-ietf-netconf-yang-patch-14#appendix-B&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;draft changelog&lt;/a&gt; .&lt;/p&gt;</comment>
                            <comment id="71644" author="ivanhrasko" created="Thu, 24 Nov 2022 12:04:25 +0000"  >&lt;p&gt;Please use the same version of RESTCONF when you expect the same results.&lt;/p&gt;</comment>
                            <comment id="71645" author="ivanhrasko" created="Thu, 24 Nov 2022 12:04:38 +0000"  >&lt;p&gt;It looks there is no bug.&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|i0432v:</customfieldvalue>

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