]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Cache snapshots in request for extension
authorVishvananda Ishaya <vishvananda@gmail.com>
Tue, 19 Aug 2014 23:59:02 +0000 (16:59 -0700)
committerVishvananda Ishaya <vishvananda@gmail.com>
Wed, 20 Aug 2014 02:36:17 +0000 (19:36 -0700)
commit4f0d1d36136bcb33f578b2999812f36cadd71cec
tree9c428cf2ee2fb32a2440e876c2e305a8fb597282
parentc8941ececc22c4642d5448174ccb062d027626d8
Cache snapshots in request for extension

The extended snapshots extension makes a separate db request for
snapshots which is horribly inefficent. In addition it causes an
issue when using all_tenants=1, because the second request doesn't
pass in the filter. Fix this by caching the snapshot in the request
object like we do for volumes and retrieve the cached object in the
extension.

Change-Id: Ia943438c8d48accb7f62c43f07642c3da2fe34ab
Resolves-bug: #1358960
cinder/api/contrib/extended_snapshot_attributes.py
cinder/api/v1/snapshots.py
cinder/api/v2/snapshots.py
cinder/tests/api/test_router.py