nova/nova/api/openstack/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
..
schemas api: Remove unnecessary 'base_' prefix from schemas 2021-08-19 11:16:59 +01:00
views policy: Deprecate field from 'os-extended-server-attributes' policy 2021-08-26 10:54:25 +01:00
__init__.py Use plain routes list for '/servers' endpoint instead of stevedore 2017-04-25 22:38:33 +08:00
admin_actions.py api: Log os-resetState as an instance action 2021-01-18 09:19:58 +00:00
admin_password.py Ensure controllers all call super 2019-06-15 16:40:00 +01:00
agents.py api: Remove 'os-agents' API 2020-09-11 14:10:32 +01:00
aggregates.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
assisted_volume_snapshots.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
attach_interfaces.py Merge "Support interface attach / detach with new resource request format" 2021-09-02 19:03:47 +00:00
availability_zone.py Pass the actual target in os-availability-zone policy 2020-03-04 09:46:41 +00:00
baremetal_nodes.py Pass the actual target in baremetal nodes policy 2020-08-17 14:36:51 +00:00
cells.py Remove '/os-cells' REST APIs 2019-04-16 18:26:13 +01:00
certificates.py Remove extensions module 2017-12-20 11:35:38 +08:00
cloudpipe.py Remove extensions module 2017-12-20 11:35:38 +08:00
console_auth_tokens.py Bump hacking min version to 3.1.0 2020-05-19 08:09:43 +08:00
console_output.py Fix os-console-output policy to be admin_or_owner 2020-03-05 15:32:02 +00:00
consoles.py Remove 'os-consoles' API 2019-11-22 16:09:36 +00:00
create_backup.py Fix os-create-backup policy to be admin_or_owner 2020-03-06 01:39:03 +00:00
deferred_delete.py Join quota exception family trees 2022-02-08 07:52:01 -08:00
evacuate.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
extension_info.py Add scope and new default roles in extensions policies 2020-08-17 09:40:02 -05:00
fixed_ips.py Remove support for /os-fixed-ips REST API 2018-06-26 09:20:28 -04:00
flavor_access.py Pass the actual target in flavor access policy 2020-04-14 17:58:02 +00:00
flavor_manage.py Pass the actual target in os-flavor-manage policy 2020-04-06 02:38:04 +00:00
flavors.py Multiple API cleanup changes 2019-08-12 08:52:38 -05:00
flavors_extraspecs.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
floating_ip_dns.py Remove support for /os-floating-ip-dns REST API 2018-07-18 22:23:45 -04:00
floating_ip_pools.py Correct the check_str and pass actual target in FIP pools policy 2020-07-20 16:53:02 -05:00
floating_ips.py Pass the actual target in FIP policy 2020-08-17 14:58:03 +00:00
floating_ips_bulk.py Remove support for /os-floating-ips-bulk REST API 2018-07-18 22:23:45 -04:00
fping.py Remove support for /os-fping REST API 2018-05-10 15:26:13 -04:00
helpers.py remove personality extension 2016-06-24 14:44:53 -04:00
hosts.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
hypervisors.py api: Drop statistics-style fields from os-hypervisors 2021-01-08 10:10:21 +00:00
image_metadata.py Remove 'nova.image.api' module 2020-02-18 11:45:39 +00:00
images.py Remove 'nova.image.api' module 2020-02-18 11:45:39 +00:00
instance_actions.py Bump hacking min version to 3.1.0 2020-05-19 08:09:43 +08:00
instance_usage_audit_log.py Pass the actual target in os-instance-usage-audit-log policy 2020-03-30 15:46:02 +01:00
ips.py api: Pass request to 'addresses' view builder 2021-08-19 11:16:59 +01:00
keypairs.py Bump hacking min version to 3.1.0 2020-05-19 08:09:43 +08:00
limits.py Bump hacking min version to 3.1.0 2020-05-19 08:09:43 +08:00
lock_server.py Pass the actual target in unlock override policy 2020-04-01 04:05:58 +00:00
migrate_server.py Join quota exception family trees 2022-02-08 07:52:01 -08:00
migrations.py Merge "objects: Add MigrationTypeField" 2020-06-29 17:38:07 +00:00
multinic.py Add new default roles in multinic policies 2020-07-21 21:21:00 -05:00
networks.py Pass the actual target in networks policy 2020-08-17 14:52:21 +00:00
networks_associate.py Remove (most) '/os-networks' REST APIs 2019-11-18 16:25:47 +00:00
pause_server.py Fix unpause server policy to be admin_or_owner 2020-03-31 01:28:09 -05:00
quota_classes.py Bump hacking min version to 3.1.0 2020-05-19 08:09:43 +08:00
quota_sets.py Remove six.moves 2020-11-07 03:25:02 +00:00
remote_consoles.py Add test coverage of existing remote console policies 2020-04-01 00:48:24 -05:00
rescue.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
rest_api_version_history.rst api: Introduce microversion 2.89 adjusting os-volume_attachments 2021-08-24 12:07:41 +01:00
routes.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
security_group_default_rules.py Remove 'os-security-group-default-rules' REST API 2019-11-18 16:25:47 +00:00
security_groups.py Pass the actual target in security_groups policy 2020-07-24 01:23:30 +00:00
server_diagnostics.py Pass the actual target in server diagnostics policy 2020-04-02 19:38:54 -05:00
server_external_events.py Pass the actual target in server external events policy 2020-04-10 23:44:55 +00:00
server_groups.py api: Log actual number of UUIDs queried 2021-08-24 08:43:50 +02:00
server_metadata.py Join quota exception family trees 2022-02-08 07:52:01 -08:00
server_migrations.py objects: Add MigrationTypeField 2020-05-08 14:45:54 +01:00
server_password.py Add autopep8 to tox and pre-commit 2021-11-08 12:37:27 +00:00
server_tags.py Fix server tags policy to be admin_or_owner 2020-04-06 23:52:40 -05:00
server_topology.py objects: Introduce 'pcpuset' field for InstanceNUMACell 2020-07-14 00:38:34 +08:00
servers.py Join quota exception family trees 2022-02-08 07:52:01 -08:00
services.py I2f9ad3df25306e070c8c3538bfed1212d6d8682f fup: add log 2021-07-30 15:10:40 +02:00
shelve.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
simple_tenant_usage.py Remove six.text_type (1/2) 2020-12-13 11:25:31 +00:00
suspend_server.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
tenant_networks.py Pass the actual target in tenant networks policy 2020-07-23 19:22:58 -05:00
versions.py Allow versioned discovery unauthenticated 2020-04-03 21:24:28 +00:00
versionsV21.py Remove extensions module 2017-12-20 11:35:38 +08:00
virtual_interfaces.py Remove support for /os-virtual-interfaces REST API 2018-06-06 21:14:39 +00:00
volumes.py Convert features not supported error to HTTPBadRequest 2021-09-01 09:09:58 -05:00
wsgi.py Add pbr-installed wsgi application for metadata api 2017-05-02 16:58:11 +00:00