Merge "Add snapshots
key support for quota class update"
This commit is contained in:
commit
bbf791a1f5
cinderclient
@ -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()):
|
||||
|
Loading…
x
Reference in New Issue
Block a user