neutron/neutron/tests/unit/db/quota
Rodolfo Alonso Hernandez ca96555e81 Implement specific tracked resource count method per quota driver
This patch implements a new method specific for each quota driver
class. This method, "get_resource_count", returns the current number
of resources created in a project of a tracked resource. A tracked
resource is an instance of ``neutron.quota.resource.TrackedResource``.
This method does not count the current reservations, just the actual
resources created.

This new method, "get_resource_count", will be added to the abstract
class ``neutron_lib.db.quota_api.QuotaDriverAPI``.

This patch also fixes ``TestDbQuotaDriverNoLock``, that was using a
plugin inheriting from ``DbQuotaDriver`` instead of
``DbQuotaNoLockDriver``.

Closes-Bug: #1982962

Conflicts:
  neutron/db/quota/driver_null.py

Change-Id: I2707506468cb60d93a4459ea364f1e79faa83838
(cherry picked from commit bd60f0833b)
2022-07-28 21:54:01 +02:00
..
__init__.py Add DB support for resource usage tracking 2015-07-26 15:26:10 -07:00
test_api.py Replace "tenant_id" with "project_id" in Quota engine 2021-09-22 08:27:10 +00:00
test_driver_nolock.py Implement specific tracked resource count method per quota driver 2022-07-28 21:54:01 +02:00
test_driver.py Remove the expired reservations in a separate DB transaction 2021-12-14 15:09:31 +00:00