neutron/neutron/tests/unit
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
..
agent Add workaround for eventlet.greendns bug 2022-07-29 15:30:50 +00:00
api Port update will trigger less notifications to the DHCP agents 2022-07-29 13:59:26 +00:00
cmd Add upgrade check for extra DHCP options 2022-01-13 20:40:42 +01:00
common Merge "[OVN] Make binding profile validation more robust" into stable/yoga 2022-07-04 15:54:19 +00:00
conf Merge "Add ndp proxy policy rules" 2022-02-23 03:18:12 +00:00
core_extensions Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
db Implement specific tracked resource count method per quota driver 2022-07-28 21:54:01 +02:00
debug Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
extensions Fix typos in log/error messages 2022-06-19 07:20:01 +00:00
hacking Remove "six" library 2020-07-28 16:55:52 +00:00
ipam Remove exception `IpAddressAllocationNotFound` 2022-03-17 06:25:30 +00:00
notifiers Use a thread local variable to store the Nova Notifier enable flag 2022-02-02 08:03:38 +00:00
objects Optimize queries for port operations 2022-06-20 15:18:03 +00:00
pecan_wsgi Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
plugins Test: mock out _check_netfilter_for_bridges in unit tests 2022-07-26 07:35:10 +00:00
privileged Add retry for privsep get_link_devices 2022-05-16 15:39:45 +02:00
quota Replace "tenant_id" with "project_id" in Quota engine 2021-09-22 08:27:10 +00:00
scheduler Fix dynamic segment allocation race condition 2021-10-07 13:20:04 +02:00
services ovn: revert to stateful dnat_and_snat 2022-06-30 19:35:48 +00:00
tests Merge "Replace assertItemsEqual with assertCountEqual" 2021-04-26 19:12:38 +00:00
__init__.py
_test_extension_portbindings.py Deprecate 'allow_overlapping_ips' config option 2021-10-21 10:56:33 +00:00
dummy_plugin.py Remove Neutron LBaaS 2019-09-20 07:46:06 +00:00
extension_stubs.py
fake_resources.py [ovn]Refusing to bind port to dead agent 2022-05-17 23:02:38 +00:00
test_auth.py Fix context deprecation warnings 2018-02-13 15:02:49 -05:00
test_manager.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_neutron_plugin_base_v2.py Add unit test to validate non DB base core plugin can be loaded 2017-11-15 21:21:35 +00:00
test_opts.py Provide the rpc_response_max_timeout parameter to sriov-agent 2021-06-06 23:56:14 +09:00
test_policy.py Handle properly InvalidScope exceptions to not return error 500 2022-04-20 14:51:05 +00:00
test_service.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_worker.py Remove the dependency on the "mock" package 2020-04-28 18:05:37 -04:00
test_wsgi.py Disable tracebacks of eventlet.wsgi.server 2022-01-11 09:33:12 +01:00
testlib_api.py Remove usage of six.text_type and six.string_type 2020-05-22 14:02:55 -04:00