summaryrefslogtreecommitdiff
path: root/nova/quota.py
diff options
context:
space:
mode:
authorJohn Garbutt <john@johngarbutt.com>2020-03-10 09:34:09 +0000
committermelanie witt <melwittt@gmail.com>2022-02-24 16:20:04 +0000
commit4fbe94a98cecb150b3e2dfacdc57bf0b713a32f3 (patch)
treec9bf6133aade00bad5502e463ef6bab9553709fd /nova/quota.py
parent78f02e96eddd92d7a5eb5d793b6646f0e86ab272 (diff)
downloadnova-4fbe94a98cecb150b3e2dfacdc57bf0b713a32f3.tar.gz
Add stub unified limits driver
The unified limits driver is starting with the noop driver. This gives us the closest API behaviour to what we describe in the spec. The Unified Limits quota driver will has several purposes: * stop all existing quota enforcement, so we can replace it * stop checking the database for quota info * make the API do what it does today with the noop driver enabled The next few patches will assert the existing API behaviour with the unified limits quota driver. This is the exact same thing that happens today when you enable the noop driver. As we add back limits, using the new unified limits approach, we will update the API so users are informed about what limits are actually being enforced. blueprint unified-limits-nova Change-Id: Iab152a6b2bb58454c32889390ec9add43771fa62
Diffstat (limited to 'nova/quota.py')
-rw-r--r--nova/quota.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/nova/quota.py b/nova/quota.py
index a311ecc87f..818c4a4751 100644
--- a/nova/quota.py
+++ b/nova/quota.py
@@ -768,6 +768,19 @@ class NoopQuotaDriver(object):
pass
+class UnifiedLimitsDriver(NoopQuotaDriver):
+ """Ease migration to new unified limits code.
+
+ Help ease migration to unified limits by ensuring the old code
+ paths still work with unified limits. Eventually the expectation is
+ all this legacy quota code will go away, leaving the new simpler code
+ """
+
+ def __init__(self):
+ LOG.warning("The Unified Limits Quota Driver is experimental and "
+ "is under active development. Do not use this driver.")
+
+
class BaseResource(object):
"""Describe a single resource for quota checking."""