]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Improve performance listing detail for volumes
authorwanghao <wanghao749@huawei.com>
Mon, 20 Jul 2015 09:09:19 +0000 (17:09 +0800)
committerwanghao <wanghao749@huawei.com>
Wed, 14 Oct 2015 06:39:35 +0000 (14:39 +0800)
commitd31fe66983ca06b1f15a7e41d124c5018bdf44a7
treebb26f8712ba1f6f30044a6e80abd6eba6cfe8b1c
parent7fb767f2d652f070a20fd70d92585d61e56f3a50
Improve performance listing detail for volumes

When large numbers of volumes are created from images in cloud,
and user uses pagination querying, there is no need to query all
volumes' volume_glance_metadata, just get those volumes which are in
response list.

Implement a new method "volume_api.get_list_volumes_image_metadata"
to query image metadata in list of volumes by using one sql querying.

Change-Id: I42307d51133bab58a166a781fccf797f0608843e
Closes-Bug: #1476150
cinder/api/contrib/volume_image_metadata.py
cinder/db/api.py
cinder/db/sqlalchemy/api.py
cinder/tests/unit/api/contrib/test_volume_image_metadata.py
cinder/tests/unit/test_db_api.py
cinder/tests/unit/test_volume.py
cinder/volume/api.py