renamed _get_quota to get_quota and moved int(size) into quota.py

This commit is contained in:
Vishvananda Ishaya
2010-09-13 01:15:35 -07:00
parent 445c59510a
commit cdacbd25af
2 changed files with 1 additions and 2 deletions

View File

@@ -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)

View File

@@ -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)