Comment 2 for bug 1075369

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/15747
Committed: http://github.com/openstack/quantum/commit/513307fa916c5461bb9a144b74b562b9d34a1c65
Submitter: Jenkins
Branch: master

commit 513307fa916c5461bb9a144b74b562b9d34a1c65
Author: Juergen Brendel <email address hidden>
Date: Thu Nov 8 15:00:11 2012 +1300

    Use DB count to get resource counts.

    Fixes bug 1075369.

    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.

    Patch incorporates review feedback from Dan W, Alex Xu, Zhongyue Luo,
    Edgar Magana, Akihiro Motoki and gongysh.

    Change-Id: I87e2d0294e116e8147fed2ee90c9eb0cf1a54362