From c41fad5015bff7341d6952ed645f639917ada529 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Thu, 24 May 2012 12:02:50 +0100 Subject: 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 --- nova/context.py | 5 +++++ 1 file changed, 5 insertions(+) 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() -- cgit