diff options
author | Mark McLoughlin <markmc@redhat.com> | 2012-05-24 12:02:50 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2012-05-30 23:19:49 +0100 |
commit | c41fad5015bff7341d6952ed645f639917ada529 (patch) | |
tree | 6b0bd8990a285566542228d49024d2fc86ebdbc7 /nova/context.py | |
parent | 2f5e5431000751a9afeda3f961a04c96c944963a (diff) | |
download | nova-c41fad5015bff7341d6952ed645f639917ada529.tar.gz nova-c41fad5015bff7341d6952ed645f639917ada529.tar.xz nova-c41fad5015bff7341d6952ed645f639917ada529.zip |
Add a note on why quota classes are unused in Nova
Quota classes can only be used if you write a custom middleware which
sets the quota_class context attribute. Nothing in OpenStack core does
this.
The only known middleware which does this is the rs_limits turnstile
preprocessor: https://github.com/klmitch/rs_limits
Add a note to the code to give others some chance of figuring this out
for themselves.
Change-Id: I52973f2f4d7f07f5121492e062dd31cadf02aa43
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/context.py b/nova/context.py index 9555f9fc1..bca5dec0f 100644 --- a/nova/context.py +++ b/nova/context.py @@ -78,7 +78,12 @@ class RequestContext(object): request_id = generate_request_id() self.request_id = request_id self.auth_token = auth_token + + # NOTE(markmc): this attribute is currently only used by the + # rs_limits turnstile pre-processor. + # See https://lists.launchpad.net/openstack/msg12200.html self.quota_class = quota_class + if overwrite or not hasattr(local.store, 'context'): self.update_store() |