[openstack-dev] [Quantum] the consistency of return code of the remove action

Nachi Ueno nachi at nttmcl.com
Thu Oct 25 23:48:06 UTC 2012


Hi Dolph, Salvatore

Thank you for your comment

IMO, We can agree 1 & 2
1) returning null should be bug.
 ( This should be some message ( interface 'port_id' removed ) )
2) 200 for all put is spec

OK I'll fix the bug :)

Thanks
Nachi Ueno

2012/10/25 Salvatore Orlando <sorlando at nicira.com>:
> We might argue that conceptually there's both a case for a 200 OK and a 204
> NoContent.
> This request is a PUT, and I agree that it should return the same thing that
> every PUT returns.
> Also, I won't risk backward compatibility for something like this.
>
> Nevertheless, the 'null' string in the response body looks like a bug to me.
> Nachi, can you confirm what Dolph saw?
>
> Salvatore
>
> On 25 October 2012 21:52, Dolph Mathews <dolph.mathews at gmail.com> wrote:
>>
>> If the actual response body is the string "null" (which it looks to be,
>> based on the bug report), then 200 OK is correct. If the response body is
>> actually empty, then I believe 204 No Content would be more appropriate.
>>
>> However, I'm guessing it's a bug that a response body is returned at all?
>>
>> -Dolph
>>
>>
>>
>> On Thu, Oct 25, 2012 at 3:07 PM, Nachi Ueno <nachi at nttmcl.com> wrote:
>>>
>>> Hi Salvatore
>>>
>>> I have question about  the consistency of return code of the remove
>>> action.
>>> So currently remove_router_interface returns 200.
>>> It looks deletion of the interface , so it should be 204.
>>>
>>> remove_router_interface returns string "null"
>>> https://bugs.launchpad.net/quantum/+bug/1064727
>>>
>>> I discussed with Dan about this.
>>> His opinion is PUT always should return 200.  ( One another reason is
>>> backward compatibility with Folsom version )
>>> This is also make sense for me if all PUT method returns 200 if success.
>>>
>>> How do you think about this spec?
>>>
>>> Thanks
>>> Nachi
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list