summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMark Washenberger <mark.washenberger@rackspace.com>2011-05-16 20:51:08 +0000
committerTarmac <>2011-05-16 20:51:08 +0000
commit0946bac5fa210dc9172bbd6ab73ffd77495ebe58 (patch)
tree964d158a965af832fd59a42c48c4383df4532c9f /bin
parent8d5d0cfeadb42dec55bd94664a28ddd63b7d51d6 (diff)
parentb1e14b1451a860871c20e8a5a733e89c72bdccd5 (diff)
downloadnova-0946bac5fa210dc9172bbd6ab73ffd77495ebe58.tar.gz
nova-0946bac5fa210dc9172bbd6ab73ffd77495ebe58.tar.xz
nova-0946bac5fa210dc9172bbd6ab73ffd77495ebe58.zip
Migrate quota schema from hardcoded columns to a key-value approach. The hope is that this change would make it easier to change the quota system without future schema changes. It also adds the concept of quotas that are unlimited.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index a36ec86d0..c95b216ce 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -397,11 +397,10 @@ class ProjectCommands(object):
arguments: project_id [key] [value]"""
ctxt = context.get_admin_context()
if key:
- quo = {'project_id': project_id, key: value}
try:
- db.quota_update(ctxt, project_id, quo)
+ db.quota_update(ctxt, project_id, key, value)
except exception.NotFound:
- db.quota_create(ctxt, quo)
+ db.quota_create(ctxt, project_id, key, value)
project_quota = quota.get_quota(ctxt, project_id)
for key, value in project_quota.iteritems():
print '%s: %s' % (key, value)