unable to delete a key in qos specs

Bug #1223660 reported by Huang Zhiteng on 2013-09-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
Huang Zhiteng

Bug Description

Currently deleting a key in certain qos specs was accomplished via 'update' API. Unfortunately, 'update' isn't able to tell the difference between setting a key with no value and deleting a key (and its value).

Changed in cinder:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Huang Zhiteng (zhiteng-huang)
milestone: none → havana-rc1

Reviewed: https://review.openstack.org/46003
Committed: http://github.com/openstack/cinder/commit/ca85d237e236f46881dc2c57a589a33e4605917d
Submitter: Jenkins
Branch: master

commit ca85d237e236f46881dc2c57a589a33e4605917d
Author: Zhiteng Huang <email address hidden>
Date: Tue Sep 10 16:39:52 2013 +0800

    Fix deleting qos specs key

    Previously deleting a key in certain qos specs was accomplished via
    'update' API. Unfortunately, 'update' isn't able to tell the
    difference between setting a key with no value and deleting a key (and
    its value).
    This change adds an new API 'delete_keys' to qos_specs API extension.
    'delete_keys' API allows client to specify a list of to-be-deleted keys
    in one single request (batch mode!), which can be handy when removing
    multiple keys in a qos specs.

    Example URL and request body for 'delete_keys' API:
     PUT to http://127.0.0.1:8776/v2/qos-specs/QOS_SPECS_UUID/delete_keys
     with body: {'keys': ['foo', 'bar', 'zoo']}

    Above example request will result in 'foo', 'bar', 'zoo' key/value
    pairs of QOS_SPECS_UUID be marked as deleted in DB. If QOS_SPECS_UUID
    doesn't exist, a 404 error will return; if any key in 'foo', 'bar',
    'zoo' couldn't be found in QOS_SPECS_UUID, a 400 error will return with
    error message telling which key couldn't be found. Note that Cinder
    will puke 400 and stop trying the rest once it encounters a
    non-existing (or deleted) key amoung the given list of keys.

    This change also fixes 'list'/'show' API includes deleted keys in
    result.

    Fix bug: # 1223660
    Fix bug: # 1223677

    Change-Id: Ia3cb07e204d655a9b837b317ce7117feb3c86a2d

Changed in cinder:
status: Confirmed → Fix Committed
Thierry Carrez (ttx) on 2013-10-04
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers