summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorKevin L. Mitchell <kevin.mitchell@rackspace.com>2012-05-11 15:30:14 -0500
committerKevin L. Mitchell <kevin.mitchell@rackspace.com>2012-05-23 10:17:41 -0500
commitb7f0946bbd071bc76809eca440ab7d21a03eb1a3 (patch)
tree4f46ad3896cb89c8747bdf09e3f33a476eccbf16 /bin
parent7e15d4e28f98e13f0ea7399787c50839139d8492 (diff)
Finish quota refactor.
Finishes quota refactoring by making use of the new quota infrastructure. Partially implements blueprint quota-refactor (the final piece is to remove the old quota architecture). This change is fairly substantial. To make it easier to review, it has been broken up into 3 parts. This is the second part. Change-Id: I1c8b43198f0d44e9e13a45575361aa043fd0639e
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-manage10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index f81272436..a4eaf9d6b 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -105,6 +105,8 @@ flags.DECLARE('vpn_start', 'nova.network.manager')
flags.DECLARE('default_floating_pool', 'nova.network.manager')
flags.DECLARE('public_interface', 'nova.network.linux_net')
+QUOTAS = quota.QUOTAS
+
# Decorators for actions
def args(*args, **kwargs):
@@ -493,11 +495,11 @@ class ProjectCommands(object):
db.quota_update(ctxt, project_id, key, value)
except exception.ProjectQuotaNotFound:
db.quota_create(ctxt, project_id, key, value)
- project_quota = quota.get_project_quotas(ctxt, project_id)
+ project_quota = QUOTAS.get_project_quotas(ctxt, project_id)
for key, value in project_quota.iteritems():
- if value is None:
- value = 'unlimited'
- print '%s: %s' % (key, value)
+ if value['limit'] < 0 or value['limit'] is None:
+ value['limit'] = 'unlimited'
+ print '%s: %s' % (key, value['limit'])
@args('--project', dest="project_id", metavar='<Project name>',
help='Project name')