<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:32:44 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>[OPNFLWPLUG-533] Rest Post operation is not working for group</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-533</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;Rest Post operation is not working for group function.&lt;/p&gt;

&lt;p&gt;when adding new group, Post operation is not working, getting &quot;400&quot; error code.&lt;/p&gt;

&lt;p&gt;But Put is working for adding groups to the controller.&lt;/p&gt;

&lt;p&gt;i have used to add following group action &lt;/p&gt;

&lt;p&gt;{&quot;group&quot;: [{&quot;group-name&quot;: &quot;TestFlow-0&quot;, &quot;buckets&quot;: {&quot;bucket&quot;: [{&quot;action&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;{&amp;quot;order&amp;quot;: 0, &amp;quot;pop-vlan-action&amp;quot;: {}}&amp;#93;&lt;/span&gt;, &quot;bucket-id&quot;: 0, &quot;watch_group&quot;: 0}]}, &quot;group-type&quot;: &quot;group-indirect&quot;, &quot;group-id&quot;: 9, &quot;barrier&quot;: &quot;false&quot;}]}&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: Other&lt;/p&gt;</environment>
        <key id="27801">OPNFLWPLUG-533</key>
            <summary>Rest Post operation is not working for group</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="10003">Cannot Reproduce</resolution>
                                        <assignee username="abbas.pareedkunju@tcs.com">Abbas P Pareedkunju</assignee>
                                    <reporter username="anpukarasi.muthukumaran@ericsson.com">Anpukarasi Muthukumaran</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Aug 2015 10:22:04 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:37 +0000</updated>
                            <resolved>Tue, 23 Aug 2016 07:46:07 +0000</resolved>
                                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="57275" author="dhevendran.k@tcs.com" created="Wed, 18 May 2016 09:10:37 +0000"  >&lt;p&gt;(In reply to Anpukarasi Muthukumaran from comment #0)&lt;br/&gt;
&amp;gt; Rest Post operation is not working for group function.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; when adding new group, Post operation is not working, getting &quot;400&quot; error&lt;br/&gt;
&amp;gt; code.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; But Put is working for adding groups to the controller.&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; i have used to add following group action &lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; {&quot;group&quot;: [{&quot;group-name&quot;: &quot;TestFlow-0&quot;, &quot;buckets&quot;: {&quot;bucket&quot;: [{&quot;action&quot;:&lt;br/&gt;
&amp;gt; &lt;span class=&quot;error&quot;&gt;&amp;#91;{&amp;quot;order&amp;quot;: 0, &amp;quot;pop-vlan-action&amp;quot;: {}}&amp;#93;&lt;/span&gt;, &quot;bucket-id&quot;: 0, &quot;watch_group&quot;: 0}]},&lt;br/&gt;
&amp;gt; &quot;group-type&quot;: &quot;group-indirect&quot;, &quot;group-id&quot;: 9, &quot;barrier&quot;: &quot;false&quot;}]}&lt;/p&gt;

&lt;p&gt;Hi Anpukarasi Muthukumaran&lt;/p&gt;

&lt;p&gt;Can you provide the steps to reproduce this ? &lt;br/&gt;
If you have solid reproduction step, I can take this up&lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards,&lt;br/&gt;
Dhevendran K&lt;/p&gt;</comment>
                            <comment id="57276" author="abbas.pareedkunju@tcs.com" created="Fri, 20 May 2016 07:11:47 +0000"  >&lt;p&gt;Hi Anpukarasi,&lt;/p&gt;

&lt;p&gt;I would like to have a look in to your issue.&lt;br/&gt;
Can you please share the XML file you are trying to use for POST calls, to reproduce this fault?&lt;/p&gt;

&lt;p&gt;//Abbas&lt;/p&gt;</comment>
                            <comment id="57277" author="anpukarasi.muthukumaran@ericsson.com" created="Tue, 24 May 2016 06:26:16 +0000"  >&lt;p&gt;(In reply to Abbas P Pareedkunju from comment #2)&lt;br/&gt;
&amp;gt; Hi Anpukarasi,&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; I would like to have a look in to your issue.&lt;br/&gt;
&amp;gt; Can you please share the XML file you are trying to use for POST calls, to&lt;br/&gt;
&amp;gt; reproduce this fault?&lt;br/&gt;
&amp;gt; &lt;br/&gt;
&amp;gt; //Abbas&lt;/p&gt;

&lt;p&gt;Hi Abbas,&lt;/p&gt;

&lt;p&gt;I used following json for testing this issue.&lt;/p&gt;

&lt;p&gt;{&quot;group&quot;: [{&quot;group-name&quot;: &quot;TestFlow-0&quot;, &quot;buckets&quot;: {&quot;bucket&quot;: [{&quot;action&quot;: &lt;span class=&quot;error&quot;&gt;&amp;#91;{&amp;quot;order&amp;quot;: 0, &amp;quot;pop-vlan-action&amp;quot;: {}}&amp;#93;&lt;/span&gt;, &quot;bucket-id&quot;: 0, &quot;watch_group&quot;: 0}]}, &quot;group-type&quot;: &quot;group-indirect&quot;, &quot;group-id&quot;: 9, &quot;barrier&quot;: &quot;false&quot;}]}&lt;/p&gt;

&lt;p&gt;I have raised this issue on almost a year back. Not sure if this issue still there.&lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Anpu&lt;/p&gt;</comment>
                            <comment id="57278" author="abbas.pareedkunju@tcs.com" created="Tue, 24 May 2016 08:18:25 +0000"  >&lt;p&gt;Thanks for the information. Meantime, I could reproduce the fault with a REST Client, and seeing the same behavior, POST shows &quot;400: Bad Request&quot; &lt;br/&gt;
Working on the possibility to fix this.&lt;/p&gt;</comment>
                            <comment id="57279" author="abbas.pareedkunju@tcs.com" created="Wed, 25 May 2016 10:53:03 +0000"  >&lt;p&gt;Hi Anpu,&lt;/p&gt;

&lt;p&gt;I have seen that the ODL code handles the POST operations with an additional check, which causes this problem.&lt;br/&gt;
Have sent a email to the Code owner for the suspected area, awaiting his reply to see the feasibility to correct this.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Abbas&lt;/p&gt;</comment>
                            <comment id="57280" author="abbas.pareedkunju@tcs.com" created="Mon, 30 May 2016 08:48:48 +0000"  >&lt;p&gt;Looking for an a reply on the below queries.&lt;/p&gt;

&lt;p&gt;On this issue debug, found that the problem lies in the NodeBodyReader classes (JsonNormalizedNodeBodyReader and XmlNormalizedNodeBodyReader).&lt;/p&gt;

&lt;p&gt;When the JsonParserStream object is created in JsonNormalizedNodeBodyReader, &lt;br/&gt;
the value for &apos;parentSchema&apos; passed is &quot;list group&quot; for the POST operation calls&lt;br/&gt;
whereas, for PUT operations the value is &quot;list node&quot;.&lt;/p&gt;

&lt;p&gt;The code to populate &apos;parentSchema&apos; in JsonNormalizedNodeBodyReader.java has a special check for POST calls as below&lt;br/&gt;
   If the isPost flag on -&amp;gt; populate parentSchema from getSchemaNode() which returns value of schemaNode &lt;br/&gt;
   else -&amp;gt; populate from getSchemaContext() which returns value of schemaContext from InstanceIdentifierContext.java&lt;/p&gt;

&lt;p&gt;Due to this handling, on POST operations, JsonParserStream.read() will try to resolve namespace by resolveNamespace() which throws IllegalStateException since it is not able to find schema node with type group.&lt;/p&gt;

&lt;p&gt;But for PUT operations, resolveNamespace() gets the valid schema name and hence able to proceed.&lt;/p&gt;

&lt;p&gt;A similar handling is seen for XML types aswell in XmlNormalizedNodeBodyReader.&lt;br/&gt;
Here for both POST and PUT, schemaNode gets a value &quot;list group&quot;&lt;br/&gt;
But XmlNormalizedNodeBodyReader has a dedicated check for isPost. &lt;br/&gt;
       If it is POST, it goes to the method findPathToSchemaNodeByName() where it tries to find the child nodes of schemaNode which would fail.&lt;br/&gt;
       For PUT, it will never go to this method to check.&lt;/p&gt;

&lt;p&gt;Bit confused on why this special check would be required for POST. &lt;br/&gt;
Looking for some clarity on this.&lt;br/&gt;
Also on if it is OK to use the same XML/JSON for both PUT and POST.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Abbas&lt;/p&gt;</comment>
                            <comment id="57281" author="ivan.hrasko@pantheon.tech" created="Tue, 31 May 2016 14:01:05 +0000"  >
&lt;p&gt;POST is for creating new data and PUT is for creating and updating.&lt;/p&gt;

&lt;p&gt;Try to modify your XML/JSON inputs or URIs.  Use different inputs for POST and different for PUT.&lt;/p&gt;


&lt;p&gt;example (see differences in XML/JSON for POST and PUT):&lt;/p&gt;


&lt;p&gt;YANG model: &lt;a href=&quot;https://github.com/opendaylight/controller/blob/7257dc4ecacf3e4d08273c31accd945fb8f3e769/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/opendaylight/controller/blob/7257dc4ecacf3e4d08273c31accd945fb8f3e769/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang?&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;PUT:&lt;/p&gt;

&lt;p&gt;URI: &lt;a href=&quot;http://localhost:8181/restconf/config/car:cars&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/car:cars&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;JSON:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    cars : {&lt;br/&gt;
        car-entry : &lt;/p&gt;
{
        id : &quot;0&quot;,
        year : &quot;2000&quot;
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;



&lt;p&gt;XML:&lt;/p&gt;

&lt;p&gt;&amp;lt;cars xmlns=&quot;urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car&quot;&amp;gt;&lt;br/&gt;
  &amp;lt;car-entry&amp;gt;&lt;br/&gt;
    &amp;lt;id&amp;gt;0&amp;lt;/id&amp;gt;&lt;br/&gt;
    &amp;lt;year&amp;gt;2000&amp;lt;/year&amp;gt;&lt;br/&gt;
  &amp;lt;/car-entry&amp;gt;&lt;br/&gt;
&amp;lt;/cars&amp;gt;&lt;/p&gt;




&lt;p&gt;POST:&lt;/p&gt;

&lt;p&gt;URI: &lt;a href=&quot;http://localhost:8181/restconf/config/car:cars&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/car:cars&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JSON:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    car-entry : &lt;/p&gt;
{
        id: &quot;0&quot;,
        model : &quot;Model&quot;,
        manufacturer : &quot;Manufacturer&quot;,
        year : &quot;2000&quot;,
        category : &quot;Category&quot;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;XML:&lt;br/&gt;
&amp;lt;car-entry xmlns=&quot;urn:opendaylight:params:xml:ns:yang:controller:config:sal-clustering-it:car&quot;&amp;gt;&lt;br/&gt;
    &amp;lt;id&amp;gt;0&amp;lt;/id&amp;gt;&lt;br/&gt;
    &amp;lt;model&amp;gt;Model&amp;lt;/model&amp;gt;&lt;br/&gt;
    &amp;lt;manufacturer&amp;gt;Manufacturer&amp;lt;/manufacturer&amp;gt;&lt;br/&gt;
    &amp;lt;year&amp;gt;2000&amp;lt;/year&amp;gt;&lt;br/&gt;
    &amp;lt;category&amp;gt;Category&amp;lt;/category&amp;gt;&lt;br/&gt;
&amp;lt;/car-entry&amp;gt;&lt;/p&gt;</comment>
                            <comment id="57282" author="miroslav.macko" created="Tue, 23 Aug 2016 07:46:07 +0000"  >&lt;p&gt;I have tested it. It works. If there are still issues, please reopen.&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>4119</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=4119]]></customfieldvalue>

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

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