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

Salvatore Orlando sorlando at nicira.com
Thu Oct 25 23:28:35 UTC 2012


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121026/5579f733/attachment.html>


More information about the OpenStack-dev mailing list