Comment 3 for bug 1287813

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

Reviewed: https://review.openstack.org/79120
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=10dcf874ac16e410993d9d929a89bb07305f46da
Submitter: Jenkins
Branch: master

commit 10dcf874ac16e410993d9d929a89bb07305f46da
Author: Steven Kaufer <email address hidden>
Date: Fri Mar 7 23:01:51 2014 +0000

    get volumes with limit and filters does not work

    The /volumes and /volumes/detail REST APIs support filtering. Currently,
    all filtering is done after the volumes are retrieved from the database
    in the API.get_all function in /cinder/volume/api.py. Therefore, the usage
    combination of filters and limit will only work if all volumes matching
    the filters are in the page of data being retrieved from the database.

    For example, assume that all of the volumes with a name of "foo" would be
    retrieved from the database starting at index 100 and that you query for
    all volumes with a name of "foo" while specifying a limit of 50. In this
    case, the query would yield 0 results since the filter did not match any of
    the first 50 entries retrieved from the database.

    This patch removes all filtering from the volume API layer and moves it
    into the DB layer.

    Test cases were added to verify filtering at the DB level.

    Change-Id: Ia084e1f4cf59ea39bf8a0a36686146a315168cbb
    Closes-bug: 1287813