Comment 2 for bug 1223660

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

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