]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add plural names for quota resources
authorSalvatore Orlando <salv.orlando@gmail.com>
Tue, 23 Jun 2015 11:54:28 +0000 (04:54 -0700)
committerSalvatore Orlando <salv.orlando@gmail.com>
Tue, 28 Jul 2015 18:55:04 +0000 (11:55 -0700)
commitb39e1469e824bc8bc79e1ecafa98825a94811c0b
tree9fa72e0919c2bde5a4dd96bb880d12fc7a34b161
parent3c584084c3c79489a7c81b323df5a15b44011e9f
Add plural names for quota resources

Introduce a 'plural_name' attribute in the BaseResource
class in the neutron.quota.resource module. This will
enable to specify the plural name of a resource when it's
entered in the quota registry.

This will come handy for managing reservations and also
removes the need for passing the collection name when
counting a resource.

Also, the name of the 'resources' parameter for the
_count_resource routine has ben changed to collection_name,
as the previous one was misleading, since it led to believe
it should be used for a collection, whereas it is simply
the name of a collection.

Change-Id: I0b61ba1856e9552cc14574be28fec6c77fb8783c
Related-Blueprint: better-quotas
neutron/api/v2/base.py
neutron/quota/resource.py
neutron/quota/resource_registry.py
neutron/tests/unit/quota/test_resource.py