]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Use cached volumes in REST API extensions
authorLuis A. Garcia <luis@linux.vnet.ibm.com>
Tue, 5 Nov 2013 20:41:02 +0000 (20:41 +0000)
committerLuis A. Garcia <luis@linux.vnet.ibm.com>
Wed, 13 Nov 2013 00:33:55 +0000 (00:33 +0000)
commit9ed0f39fceaaa7a56e74055b54b7f6124e9e7f11
treeaef0049e07e39500587dc17bf438c52e73582ee9
parent233430b51ddbd207f22eee98386ffbb766fd777f
Use cached volumes in REST API extensions

This patch caches db volumes in the core volumes API so that they can be
used in the host and tenant attribute API extensions in order to lower
the response time by avoiding costly individual db queries for each
volume in the REST API contributions.

Change-Id: Ie0cbe929379df32fddbdce1953f13b6f26208bff
Partial-Bug: #1197612
cinder/api/contrib/volume_host_attribute.py
cinder/api/contrib/volume_tenant_attribute.py
cinder/api/v1/volumes.py
cinder/api/v2/volumes.py
cinder/tests/api/fakes.py
cinder/tests/api/v1/test_volumes.py
cinder/tests/api/v2/test_volumes.py