Add snapshots key support for quota class update
Fix bug 1188452 Change-Id: I3db0f3f1191a24571de9631786889ee81af777f6
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -38,11 +38,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 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 body['quota_class_set'].keys():
|
||||
|
||||
Reference in New Issue
Block a user