<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:11 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-417] JSON PUT for list item does not work correctly</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-417</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;&lt;a href=&quot;https://gist.github.com/2da83d35b8c8b11c3822&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/2da83d35b8c8b11c3822&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This worked fine Tue 5:30am when I built. Now we are hosed again.&lt;/p&gt;

&lt;p&gt;It&apos;s very very hard not to rant when we change nothing, and either REST doesn&apos;t work for 2 days, or when it starts to work again, it breaks something else.&lt;/p&gt;

&lt;p&gt;We are blocked.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22837">YANGTOOLS-417</key>
            <summary>JSON PUT for list item does not work correctly</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</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="tony.tkacik@gmail.com">Tony Tkacik</assignee>
                                    <reporter username="alagalah">Keith Burns</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Mar 2015 04:07:53 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:29 +0000</updated>
                            <resolved>Mon, 16 Mar 2015 12:23:45 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="43287" author="alagalah" created="Thu, 12 Mar 2015 04:18:36 +0000"  >&lt;p&gt;The PUT to tenant has worked this way since:&lt;/p&gt;

&lt;p&gt;commit 304445a4343a67e68fd6111edba6cba8cbaf7ac3&lt;br/&gt;
Author: Thomas Bachman &amp;lt;tbachman@yahoo.com&amp;gt;&lt;br/&gt;
Date:   Mon Jan 19 17:03:23 2015 -0800&lt;/p&gt;

&lt;p&gt;    Fixed overwrite of tenant policy.&lt;/p&gt;

&lt;p&gt;    The existing script would overwrite any policy from tenant&lt;br/&gt;
    and below, because of the URL used. This patch only adds&lt;br/&gt;
    to the tenant list, instead of overwriting the whole thing.&lt;/p&gt;

&lt;p&gt;    Change-Id: Ia077b45a883fdd2d11cdd5775c28da6da7fb1a97&lt;br/&gt;
    Signed-off-by: Thomas Bachman &amp;lt;tbachman@yahoo.com&amp;gt;&lt;/p&gt;</comment>
                            <comment id="43288" author="hagbard@gmail.com" created="Thu, 12 Mar 2015 06:12:38 +0000"  >&lt;p&gt;I have reproduced this error by:&lt;/p&gt;

&lt;p&gt;cd groupbasedpolicy/&lt;br/&gt;
mvn clean install&lt;br/&gt;
cd distribution-karaf/target/assembly/bin&lt;br/&gt;
./karaf&lt;/p&gt;

&lt;p&gt;Then using this postman:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.getpostman.com/collections/d641d67f578c0abbf3d8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.getpostman.com/collections/d641d67f578c0abbf3d8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Doing &apos;Inventory PUT&apos; (which works) followed by &apos;Policy PUT&apos; (which gives the error Keith saw).&lt;/p&gt;</comment>
                            <comment id="43289" author="hagbard@gmail.com" created="Thu, 12 Mar 2015 06:17:27 +0000"  >&lt;p&gt;Note:  When I try to use API-docs... API-docs thinks we have the policy model, and even shows the relavent things to GET and PUT... but they are breaking because the schema is missing.&lt;/p&gt;</comment>
                            <comment id="43290" author="tony.tkacik@gmail.com" created="Thu, 12 Mar 2015 08:30:39 +0000"  >&lt;p&gt;JSON PUT does not work correctly after fixing POST for list items,&lt;/p&gt;

&lt;p&gt;this bug has also its variation in &lt;a href=&quot;https://jenkins.opendaylight.org/releng/view/CSIT-Jobs/job/openflowplugin-csit-1node-imds-flow-services-all-master/14/robot/report/log.html#s1-s4-s2-t3&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://jenkins.opendaylight.org/releng/view/CSIT-Jobs/job/openflowplugin-csit-1node-imds-flow-services-all-master/14/robot/report/log.html#s1-s4-s2-t3&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43291" author="tony.tkacik@gmail.com" created="Thu, 12 Mar 2015 12:26:33 +0000"  >&lt;p&gt;Workaround is to wrap policy:tenant object in array as it is.&lt;/p&gt;


&lt;p&gt;{&lt;br/&gt;
    &quot;policy:tenant&quot;: [{&lt;/p&gt;

&lt;p&gt;    }]&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;Seems yang-data-codec-gson does not handle parsing of one list item properly&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;it handles parsing of lists as specified in &lt;a href=&quot;https://tools.ietf.org/html/draft-lhotka-netmod-yang-json-02#page-10&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/draft-lhotka-netmod-yang-json-02#page-10&lt;/a&gt;,&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;3.2.4.  The &quot;list&quot; Data Node&lt;/p&gt;

&lt;p&gt;   A sequence of one or more sibling XML elements with the same&lt;br/&gt;
   qualified name that is modeled as YANG list is translated to a name/&lt;br/&gt;
   array pair, and the array elements are JSON objects.&lt;/p&gt;


&lt;p&gt;but implemented restconf draft provides examples for lists (which bit changes serialization of list):&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://tools.ietf.org/html/draft-bierman-netconf-restconf-02#page-37&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/draft-bierman-netconf-restconf-02#page-37&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example from biermann&lt;/p&gt;

&lt;p&gt;      PUT /restconf/config/example-jukebox:jukebox/&lt;br/&gt;
         library/artist/Foo%20Fighters/album/Wasting%20Light   HTTP/1.1&lt;br/&gt;
      Host: example.com&lt;br/&gt;
      If-Match: b3830f23a4c&lt;br/&gt;
      Content-Type: application/yang.data+json&lt;/p&gt;

&lt;p&gt;      {&lt;br/&gt;
        &quot;example-jukebox:album&quot; : &lt;/p&gt;
{
          &quot;name&quot; : &quot;Wasting Light&quot;,
          &quot;genre&quot; : &quot;example-jukebox:alternative&quot;,
          &quot;year&quot; : 2011
        }
&lt;p&gt;      }&lt;/p&gt;

&lt;p&gt;But by referenced YANG-JSON specification it should be &lt;br/&gt;
{&lt;br/&gt;
 &quot;example-jukebox:album&quot; : [&lt;/p&gt;
{
   &quot;name&quot; : &quot;Wasting Light&quot;,
   &quot;genre&quot; : &quot;example-jukebox:alternative&quot;,
   &quot;year&quot; : 2011
  }
&lt;p&gt;]&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="43292" author="tony.tkacik@gmail.com" created="Thu, 12 Mar 2015 12:32:45 +0000"  >&lt;p&gt;Seems this unclarity between specifications is still present in latest drafts:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://tools.ietf.org/html/draft-ietf-netconf-restconf-04&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/draft-ietf-netconf-restconf-04&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://tools.ietf.org/html/draft-ietf-netmod-yang-json-03#section-5.4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://tools.ietf.org/html/draft-ietf-netmod-yang-json-03#section-5.4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Where RESTCONF draft showcases reading list item returning&lt;br/&gt;
{ list: [{&lt;/p&gt;

&lt;p&gt;  }]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;but PUT showcases &lt;br/&gt;
{ list : {&lt;/p&gt;

&lt;p&gt;  }&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="43293" author="tony.tkacik@gmail.com" created="Thu, 12 Mar 2015 16:52:16 +0000"  >&lt;p&gt;YANTools - &lt;a href=&quot;https://git.opendaylight.org/gerrit/16405&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/16405&lt;/a&gt;&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_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2818</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=2818]]></customfieldvalue>

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

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