renamed _get_quota to get_quota and moved int(size) into quota.py
This commit is contained in:
@@ -273,7 +273,7 @@ class ProjectCommands(object):
|
||||
db.quota_update(None, project_id, quo)
|
||||
except exception.NotFound:
|
||||
db.quota_create(None, quo)
|
||||
project_quota = quota._get_quota(None, project_id)
|
||||
project_quota = quota.get_quota(None, project_id)
|
||||
for key, value in project_quota.iteritems():
|
||||
print '%s: %s' % (key, value)
|
||||
|
||||
|
@@ -284,7 +284,6 @@ class CloudController(object):
|
||||
@rbac.allow('projectmanager', 'sysadmin')
|
||||
def create_volume(self, context, size, **kwargs):
|
||||
# check quota
|
||||
size = int(size)
|
||||
if quota.allowed_volumes(context, 1, size) < 1:
|
||||
logging.warn("Quota exceeeded for %s, tried to create %sG volume",
|
||||
context.project.id, size)
|
||||
|
Reference in New Issue
Block a user