summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authoryugsuo <yugsuo@gmail.com>2013-01-07 12:15:06 +0800
committerYug Suo <yugsuo@gmail.com>2013-01-11 19:12:31 +0800
commit7974ad3247dc4264c1834c402cf4d30f10137890 (patch)
tree7c20e6eaa07060b3bc2c222fc9503d92ec733846 /nova/exception.py
parent2b737b9f1bc18db822709f4073d7de1fd34388a6 (diff)
downloadnova-7974ad3247dc4264c1834c402cf4d30f10137890.tar.gz
nova-7974ad3247dc4264c1834c402cf4d30f10137890.tar.xz
nova-7974ad3247dc4264c1834c402cf4d30f10137890.zip
Fix quota updating when admin deletes common user's instance
Add 'project_id=None' optional argument in QUOTAS related methods. There are two problems when admin deletes instances of common user before fixing this bug: Firstly, It will get tenant quotas using context.project_id which results in getting admin's quotas not common user's. Secondly, It will also get wrong quota usages using context.project_id when updating common user's quota_usages. So we could pass into QUOTAS related methods an optional argument to specify the tenant ID to be affected. And if it's not set, then we default to drawing the tenant ID from the context. Fixes: bug 1078668 Change-Id: I59bc240d6547122d803a3ed3e1eeef26fc78f4f0
Diffstat (limited to 'nova/exception.py')
0 files changed, 0 insertions, 0 deletions