]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Generic filter support for volume queries
authorSteven Kaufer <kaufer@us.ibm.com>
Thu, 12 Feb 2015 14:45:18 +0000 (14:45 +0000)
committerSteven Kaufer <kaufer@us.ibm.com>
Mon, 23 Feb 2015 15:59:20 +0000 (15:59 +0000)
commiteb486867d3d39d3fc3478d7d50371683fbddd9c1
tree823bb4983c9aa9471ec58c88158319c11982ea9b
parent5e05d97231742a185812da682bb73874144ce9df
Generic filter support for volume queries

DB functions exist to get all volumes, to get all volumes in a particular
project, to get all volumes in a particular group, and to get all volumes
hosted on a particular host. See the following functions in the DB API:

* volume_get_all
* volume_get_all_by_project
* volume_get_all_by_group
* volume_get_all_by_host

Only the queries that get all volumes and that get all volumes by project
support additional filtering.

The purpose of this patch set is to make the filtering support consistent
across these APIs, adding it to the volume_get_all_by_group and the
volume_get_all_by_host APIs.

Change-Id: I6af9b4de9e70ec442e7e61c6b0baa9b02798a06d
Implements: blueprint db-volume-filtering
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/tests/test_db_api.py