nova/nova/tests/unit/compute
Dan Smith 72058b7a40 Join quota exception family trees
For some reason, we have two lineages of quota-related exceptions in
Nova. We have QuotaError (which sounds like an actual error), from
which all of our case-specific "over quota" exceptions inhert, such
as KeypairLimitExceeded, etc. In contrast, we have OverQuota which
lives outside that hierarchy and is unrelated. In a number of places,
we raise one and translate to the other, or raise the generic
QuotaError to signal an overquota situation, instead of OverQuota.
This leads to places where we have to catch both, signaling the same
over quota situation, but looking like there could be two different
causes (i.e. an error and being over quota).

This joins the two cases, by putting OverQuota at the top of the
hierarchy of specific exceptions and removing QuotaError. The latter
was only used in a few situations, so this isn't actually much change.
Cleaning this up will help with the unified limits work, reducing the
number of potential exceptions that mean the same thing.

Related to blueprint bp/unified-limits-nova

Change-Id: I17a3e20b8be98f9fb1a04b91fcf1237d67165871
2022-02-08 07:52:01 -08:00
..
monitors Do not log a warning about not using compute monitors 2019-04-04 14:32:53 -04:00
provider_config_data Provider Config File: Coding style and test cases improvement 2020-09-01 01:05:34 +00:00
__init__.py
eventlet_utils.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
fake_resource_tracker.py Tests: autospecs all the mock.patch usages 2019-08-19 09:43:10 -05:00
test_api.py Merge "Avoid unbound instance_uuid var during delete" 2021-11-03 19:51:32 +00:00
test_claims.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_compute.py Join quota exception family trees 2022-02-08 07:52:01 -08:00
test_compute_mgr.py Revert "Revert resize: wait for events according to hybrid plug" 2022-01-31 13:10:59 +00:00
test_flavors.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_host_api.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_instance_list.py db: Unify 'nova.db.api', 'nova.db.sqlalchemy.api' 2021-08-09 15:34:40 +01:00
test_keypairs.py objects: Stop querying the main DB for keypairs 2021-10-18 20:26:18 +01:00
test_multi_cell_list.py Refactor scatter-gather utility to return exception objects 2018-10-31 15:18:07 -04:00
test_provider_config.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
test_provider_tree.py Add resources dict into _Provider 2019-09-13 08:50:35 +00:00
test_resource_tracker.py Add force kwarg to delete_allocation_for_instance 2021-08-30 06:11:25 +00:00
test_rpcapi.py Remove (almost) all references to 'instance_type' 2021-03-29 12:24:15 +01:00
test_shelve.py Fix instance's image_ref lost on failed unshelving 2021-10-20 09:12:02 +02:00
test_stats.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_utils.py objects: Remove 'bandwidth' fields from notifications 2021-11-03 17:33:43 +00:00
test_virtapi.py Log instance event wait times 2021-11-10 11:08:25 -08:00