Merge "Add snapshots key support for quota class update"

This commit is contained in:
Jenkins 2013-06-21 00:45:11 +00:00 committed by Gerrit Code Review
commit bbf791a1f5
4 changed files with 6 additions and 2 deletions

@ -29,7 +29,7 @@ class QuotaClassSetsTest(utils.TestCase):
def test_update_quota(self):
q = cs.quota_classes.get('test')
q.update(volumes=2)
q.update(volumes=2, snapshots=2)
cs.assert_called('PUT', '/os-quota-class-sets/test')
def test_refresh_quota(self):

@ -29,7 +29,7 @@ class QuotaClassSetsTest(utils.TestCase):
def test_update_quota(self):
q = cs.quota_classes.get('test')
q.update(volumes=2)
q.update(volumes=2, snapshots=2)
cs.assert_called('PUT', '/os-quota-class-sets/test')
def test_refresh_quota(self):

@ -39,11 +39,13 @@ class QuotaClassSetManager(base.Manager):
def update(self,
class_name,
volumes=None,
snapshots=None,
gigabytes=None):
body = {'quota_class_set': {
'class_name': class_name,
'volumes': volumes,
'snapshots': snapshots,
'gigabytes': gigabytes}}
for key in list(body['quota_class_set'].keys()):

@ -37,11 +37,13 @@ class QuotaClassSetManager(base.Manager):
def update(self,
class_name,
volumes=None,
snapshots=None,
gigabytes=None):
body = {'quota_class_set': {
'class_name': class_name,
'volumes': volumes,
'snapshots': snapshots,
'gigabytes': gigabytes}}
for key in list(body['quota_class_set'].keys()):