Several changes designed to bring the openstack api 1.1 closer to spec
- add ram limits to the nova compute quotas - enable injected file limits and injected file size limits to be overridden in the quota database table - expose quota limits as absolute limits in the openstack api 1.1 limits resource - add support for controlling 'unlimited' quotas to nova-manage
This commit is contained in:
@@ -417,12 +417,16 @@ class ProjectCommands(object):
|
|||||||
arguments: project_id [key] [value]"""
|
arguments: project_id [key] [value]"""
|
||||||
ctxt = context.get_admin_context()
|
ctxt = context.get_admin_context()
|
||||||
if key:
|
if key:
|
||||||
|
if value.lower() == 'unlimited':
|
||||||
|
value = None
|
||||||
try:
|
try:
|
||||||
db.quota_update(ctxt, project_id, key, value)
|
db.quota_update(ctxt, project_id, key, value)
|
||||||
except exception.ProjectQuotaNotFound:
|
except exception.ProjectQuotaNotFound:
|
||||||
db.quota_create(ctxt, project_id, key, value)
|
db.quota_create(ctxt, project_id, key, value)
|
||||||
project_quota = quota.get_quota(ctxt, project_id)
|
project_quota = quota.get_project_quotas(ctxt, project_id)
|
||||||
for key, value in project_quota.iteritems():
|
for key, value in project_quota.iteritems():
|
||||||
|
if value is None:
|
||||||
|
value = 'unlimited'
|
||||||
print '%s: %s' % (key, value)
|
print '%s: %s' % (key, value)
|
||||||
|
|
||||||
def remove(self, project_id, user_id):
|
def remove(self, project_id, user_id):
|
||||||
|
Reference in New Issue
Block a user