diff options
author | yugsuo <yugsuo@gmail.com> | 2013-01-07 12:15:06 +0800 |
---|---|---|
committer | Yug Suo <yugsuo@gmail.com> | 2013-01-11 19:12:31 +0800 |
commit | 7974ad3247dc4264c1834c402cf4d30f10137890 (patch) | |
tree | 7c20e6eaa07060b3bc2c222fc9503d92ec733846 /nova/exception.py | |
parent | 2b737b9f1bc18db822709f4073d7de1fd34388a6 (diff) | |
download | nova-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