commit ca7fc10dac532fdea5398b394ac3e58b1c3d8791
Author: Dan Wendlandt <email address hidden>
Date: Tue Nov 27 13:14:54 2012 -0800
Use DB count to get resource counts.
Fixes bug 1075369, and includes bugs 1081259, 1083696 which fixed
regression in the original version of this patch and bug 1083180
which improves the documentation of the original patch.
During quota check we used to simply retrieve the entire collection
of resources from the database, then counting them in Python. This
patch introduces a specialized _get_collection_count() method, which
instead take advantage of the DB's built-in count capabilities.
In order to take advantage of this, plugins can now implement
get_*_count() methods for their resources. This is used (if present)
by the quota checking function.
Reviewed: https:/ /review. openstack. org/16952 github. com/openstack/ quantum/ commit/ ca7fc10dac532fd ea5398b394ac3e5 8b1c3d8791
Committed: http://
Submitter: Jenkins
Branch: stable/folsom
commit ca7fc10dac532fd ea5398b394ac3e5 8b1c3d8791
Author: Dan Wendlandt <email address hidden>
Date: Tue Nov 27 13:14:54 2012 -0800
Use DB count to get resource counts.
Fixes bug 1075369, and includes bugs 1081259, 1083696 which fixed
regression in the original version of this patch and bug 1083180
which improves the documentation of the original patch.
During quota check we used to simply retrieve the entire collection _count( ) method, which
of resources from the database, then counting them in Python. This
patch introduces a specialized _get_collection
instead take advantage of the DB's built-in count capabilities.
In order to take advantage of this, plugins can now implement
get_*_count() methods for their resources. This is used (if present)
by the quota checking function.
Change-Id: Idc347cfacc363f 2cac47356296514 fe735625f29