Delete tags return 200 status code but api-ref says 204

Bug #1656183 reported by Ghanshyam Mann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Ian Cordasco

Bug Description

delete tags API DELETE metadefs/namespaces/%s/tags actually return 200 status code because response ResponseSerializer is not implemented for delete_tags in https://github.com/openstack/glance/blob/master/glance/api/v2/metadef_namespaces.py

but api-ref below mentioned status code will be 204.

http://developer.openstack.org/api-ref/image/v2/metadefs-index?expanded=delete-all-tag-definitions-detail#delete-all-tag-definitions

Tests for tags are going to be added in tempest - https://review.openstack.org/#/c/403998/

Ian Cordasco (icordasc)
Changed in glance:
assignee: nobody → Ian Cordasco (icordasc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/420038

Changed in glance:
status: New → In Progress
Ian Cordasco (icordasc)
Changed in glance:
importance: Undecided → High
milestone: none → ocata-3
Ian Cordasco (icordasc)
Changed in glance:
milestone: ocata-3 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Ken'ichi Ohmichi (<email address hidden>) on branch: master
Review: https://review.openstack.org/425487
Reason: This becomes unnecessary after TC meeting

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

I think we should keep the behavior same on all supported stable branches at least. I mean if we fix API to return 204 then all stable branch should have same behavior.

But i will leave decision on stable branch core team. and accordingly we can proceed in tempest test.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/420038
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=529dc665a06bb6f28a38830d974dd2302db3bda8
Submitter: Jenkins
Branch: master

commit 529dc665a06bb6f28a38830d974dd2302db3bda8
Author: Ian Cordasco <email address hidden>
Date: Fri Jan 13 09:46:00 2017 -0600

    Satisfy API Reference documentation deleting tags

    The API Reference documentation for Glance v2 documents the response
    status code for the metadefs delete-tags call as 204, but instead that
    call returns a 200 status code. This patch fixes the disparity and adds
    the ability to start testing our response serializer.

    This patch changes the response code instead of the documentation
    because 204 (No Content) is the correct response for this call and
    because all the other metadefs DELETE calls return 204. So to preserve
    consistency and to honor the published contract, this patch changes the
    code, not the documentation.

    This patch was discussed with the API-WG (on 2 Feb 2017) and the TC (on
    14 Feb 2017), and they both endorse this approach. See the meeting logs
    for details.

    Closes-bug: #1656183
    Depends-On: I84626976ca729f65b0ee0ea6afe5c9a6a408eecc
    Change-Id: I4b6dc1714aeca409a85bfa1f9b729147da704df8

Changed in glance:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 15.0.0.0b3

This issue was fixed in the openstack/glance 15.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.