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``.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/851357 /opendev. org/openstack/ neutron/ commit/ bd60f0833bb4391 92140b7d04e0b01 a5d63f0bb5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit bd60f0833bb4391 92140b7d04e0b01 a5d63f0bb5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Wed Jul 27 17:55:48 2022 +0200
Implement specific tracked resource count method per quota driver
This patch implements a new method specific for each quota driver count", returns the current number quota.resource. TrackedResource ``.
class. This method, "get_resource_
of resources created in a project of a tracked resource. A tracked
resource is an instance of ``neutron.
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 lib.db. quota_api. QuotaDriverAPI` `.
class ``neutron_
This patch also fixes ``TestDbQuotaDr iverNoLock` `, that was using a LockDriver` `.
plugin inheriting from ``DbQuotaDriver`` instead of
``DbQuotaNo
Closes-Bug: #1982962
Change-Id: I2707506468cb60 d93a4459ea364f1 e79faa83838