[openstack-dev] [nova][glance] Consistency around proposed server instance tagging API

Jay Pipes jaypipes at gmail.com
Thu Jun 5 00:59:40 UTC 2014

On 06/04/2014 08:21 PM, Christopher Yeoh wrote:
> On Thu, Jun 5, 2014 at 4:14 AM, Jay Pipes <jaypipes at gmail.com
> <mailto:jaypipes at gmail.com>> wrote:
>     Hi Stackers,
>     I'm looking to get consensus on a proposed API for server instance
>     tagging in Nova:
>     https://review.openstack.org/#__/c/91444/
>     <https://review.openstack.org/#/c/91444/>
>     In the proposal, the REST API for the proposed server instance
>     tagging looks like so:
>     Remove a tag on a server:
>     DELETE /v2/{project_id}/servers/{__server_id}/tags/{tag}
>     It is this last API call that has drawn the attention of John
>     Garbutt (cc'd). In Glance v2 API, if you attempt to delete a tag
>     that does not exist, then a 404 Not Found is returned. In my
>     proposal, if you attempt to delete a tag that does not exist for the
>     server, a 204 No Content is returned.
> I think attempting to delete a tag that doesn't exist should return a
> 404. The user can always ignore the error if they know there's a
> chance that the tag they want to get rid of doesn't exist. But for those
> that believe it should exist its an error is more useful to them as
> it may be an indicator that something is wrong with their logic.

A very fair point. I'll amend the spec to issue a 404 instead of a 204. 
I haven't seen anyone arguing for the 204, so I'm not all that attached 
to it :)


More information about the OpenStack-dev mailing list