Re: [openstack-dev] [nova][api] GET or HEAD for checking trait existence
Hi Jay, Thanks for your reply. 2017-03-29 12:26 GMT-07:00 Jay Pipes: > On 03/29/2017 02:04 PM, Ken'ichi Ohmichi wrote: >> >> Hi >> >> I have some questions about plancement API design from >> https://review.openstack.org/#/c/376200 >> Current implementation of the above patch (PS26) adds GET method for >> checking trait existence, and tags.rst of api-wg guideline[1] requires >> GET for checking trait existence. >> On the other hand, http.rst of api-wg guideline[2] requires HEAD instead. >> >> So there are two questions. >> 1. Why the part of tags.rst is different from http.rst? >> I checked the review history of >> https://review.openstack.org/#/c/155620/ which have added the part, >> but I could not find the reason. >> 2. trait should follow tags.rst? or http.rst? > > > This is from the http.rst guideline in the API-WG: > > "TODO: HEAD is weird in a bunch of our wsgi frameworks and you don't have > access to it. Figure out if there is anything useful there." > > and frankly, I tend to agree with the above statement. I'd say use GET for > exists checking. Ed submitted a LP about this as https://bugs.launchpad.net/openstack-api-wg/+bug/1677360 On the LP, Chris did put a nice comment like: "HEAD is a shortcut to use when you don't want to pay the price of GET" We can use HEAD without receiving a response body to check a resource existence if the response body could be huge on GET. In this case, IIUC trait API doesn't return a response body when getting the detail of resource, that would be the same as a resource existence check. Both GET and HEAD could be acceptable in this case. I was confused when seeing the conflict between tags.rst and http.rst, I will try it clear later on api-wg guideline. Thanks __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [nova][api] GET or HEAD for checking trait existence
On 03/29/2017 02:04 PM, Ken'ichi Ohmichi wrote: Hi I have some questions about plancement API design from https://review.openstack.org/#/c/376200 Current implementation of the above patch (PS26) adds GET method for checking trait existence, and tags.rst of api-wg guideline[1] requires GET for checking trait existence. On the other hand, http.rst of api-wg guideline[2] requires HEAD instead. So there are two questions. 1. Why the part of tags.rst is different from http.rst? I checked the review history of https://review.openstack.org/#/c/155620/ which have added the part, but I could not find the reason. 2. trait should follow tags.rst? or http.rst? This is from the http.rst guideline in the API-WG: "TODO: HEAD is weird in a bunch of our wsgi frameworks and you don't have access to it. Figure out if there is anything useful there." and frankly, I tend to agree with the above statement. I'd say use GET for exists checking. Best, -jay __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [nova][api] GET or HEAD for checking trait existence
Hi I have some questions about plancement API design from https://review.openstack.org/#/c/376200 Current implementation of the above patch (PS26) adds GET method for checking trait existence, and tags.rst of api-wg guideline[1] requires GET for checking trait existence. On the other hand, http.rst of api-wg guideline[2] requires HEAD instead. So there are two questions. 1. Why the part of tags.rst is different from http.rst? I checked the review history of https://review.openstack.org/#/c/155620/ which have added the part, but I could not find the reason. 2. trait should follow tags.rst? or http.rst? Any comments are welcome. Thanks --- [1]: https://github.com/openstack/api-wg/blob/master/guidelines/tags.rst#addressing-individual-tags [2]: https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#http-methods __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev