summaryrefslogtreecommitdiff
path: root/neutron/pecan_wsgi
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <ralonsoh@redhat.com>2021-05-12 13:28:36 +0000
committerRodolfo Alonso Hernandez <ralonsoh@redhat.com>2021-07-26 15:00:32 +0000
commitad31c58d60142cffcdea86d0257dc10277b53ff0 (patch)
tree03839dea61de0d7c840b21f36fef120f394ba3cb /neutron/pecan_wsgi
parent389584c389f7cb7a13e75587dae558658e1ccb1a (diff)
downloadneutron-ad31c58d60142cffcdea86d0257dc10277b53ff0.tar.gz
Remove ``ConfDriver`` code
The quota driver ``ConfDriver`` was deprecated in Liberty release. ``NullQuotaDriver`` is created for testing although it could be used in production if no quota enforcement is needed. However, because the Quota engine is not plugable (is an extension always loaded), it could be interesting to make it plugable as any other plugin. This patch also creates a Quota engine driver API class that should be used in any Quota engine driver. Currently it is used in the three in-tree drivers implemented: ``NullQuotaDriver``, ``DbQuotaDriver`` and ``DbQuotaNoLockDriver``. Change-Id: Ib4af80e18fac52b9f68f26c84a215415e63c2822 Closes-Bug: #1928211
Diffstat (limited to 'neutron/pecan_wsgi')
-rw-r--r--neutron/pecan_wsgi/hooks/quota_enforcement.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/neutron/pecan_wsgi/hooks/quota_enforcement.py b/neutron/pecan_wsgi/hooks/quota_enforcement.py
index 0f42b49ffb..0267145c0f 100644
--- a/neutron/pecan_wsgi/hooks/quota_enforcement.py
+++ b/neutron/pecan_wsgi/hooks/quota_enforcement.py
@@ -53,7 +53,8 @@ class QuotaEnforcementHook(hooks.PecanHook):
LOG.debug("Made reservation on behalf of %(tenant_id)s "
"for: %(delta)s",
{'tenant_id': tenant_id, 'delta': {resource: delta}})
- reservations.append(reservation)
+ if reservation:
+ reservations.append(reservation)
except exceptions.QuotaResourceUnknown as e:
# Quotas cannot be enforced on this resource
LOG.debug(e)