neutron/neutron/tests/unit/db
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
..
metering Add source_ip_prefix and destination_ip_prefix to metering label rules 2020-09-29 09:06:03 -03:00
quota Implement specific tracked resource count method per quota driver 2022-07-28 21:54:01 +02:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
test__utils.py Refactor session "is_active" handling for sqlalchemy-20 2022-02-10 09:03:36 +00:00
test_agents_db.py Set process name for agents 2020-07-01 12:28:29 +02:00
test_agentschedulers_db.py Handle properly ObjectNotFound while deleting network from DHCP agent 2022-05-05 10:44:53 +00:00
test_allowedaddresspairs_db.py Switch to new engine facade in test_allowedaddresspairs_db module 2020-03-20 02:18:04 +01:00
test_db_base_plugin_common.py Replace to_dict() calls with a function decorator 2015-08-03 11:42:25 +03:00
test_db_base_plugin_v2.py Set "type=virtual" for OVN LSP with parent ports 2022-05-20 21:52:21 +00:00
test_dvr_mac_db.py Replace assertItemsEqual with assertCountEqual 2020-11-30 10:21:57 +01:00
test_extraroute_db.py Use payloads for ROUTER AFTER_ callbacks 2021-08-09 14:13:28 +00:00
test_ipam_backend_mixin.py Remove "PortBindingMixin" class and related DB table 2022-01-08 14:53:21 +00:00
test_ipam_pluggable_backend.py [OVN] Allow IP allocation with different segments for OVN service ports 2020-07-22 07:38:49 +00:00
test_l3_db.py Improve Router callback system's publish events 2021-12-05 04:36:36 +00:00
test_l3_dvr_db.py Improve Router callback system's publish events 2021-12-05 04:36:36 +00:00
test_l3_hamode_db.py Add port IDs in "RouterInUse" exception during router deletion 2022-02-25 18:31:08 +00:00
test_migration.py Replace "Inspector.from_engine()" with "sqlalchemy.inspect()" 2021-09-23 13:41:50 +00:00
test_ovn_hash_ring_db.py Match created_at and updated_at timestamp in TestHashRing 2020-10-08 14:45:51 +00:00
test_ovn_revision_numbers_db.py Merge "Support remote address group in SG rules" 2020-11-28 11:26:39 +00:00
test_portsecurity_db.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_portsecurity_db_common.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_provisioning_blocks.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_rbac_db_mixin.py Replace "target_tenant" with "target_project" in RBAC OVOs and models 2021-12-03 10:48:57 +00:00
test_securitygroups_db.py Merge "Add shared field to SG API response and filter" 2021-11-02 01:20:21 +00:00
test_segments_db.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00