Add cinder backups quota support
Change-Id: If44bb6306a7fee9885cc4616e7ede30b43c1c47a Closes-Bug: #1621867
This commit is contained in:
parent
3b4c40389d
commit
6da9bf45ef
@ -31,6 +31,14 @@ class CinderQuotas(object):
|
||||
"volumes": {
|
||||
"type": "integer",
|
||||
"minimum": -1
|
||||
},
|
||||
"backups": {
|
||||
"type": "integer",
|
||||
"minimum": -1
|
||||
},
|
||||
"backup_gigabytes": {
|
||||
"type": "integer",
|
||||
"minimum": -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ class CinderQuotasTestCase(test.TestCase):
|
||||
quotas_values = {
|
||||
"volumes": 10,
|
||||
"snapshots": 50,
|
||||
"backups": 20,
|
||||
"backup_gigabytes": 1000,
|
||||
"gigabytes": 1000
|
||||
}
|
||||
cinder_quo.update(tenant_id, **quotas_values)
|
||||
@ -42,7 +44,11 @@ class CinderQuotasTestCase(test.TestCase):
|
||||
|
||||
def test_get(self):
|
||||
tenant_id = "tenant_id"
|
||||
quotas = {"gigabytes": "gb", "snapshots": "ss", "volumes": "v"}
|
||||
quotas = {"gigabytes": "gb",
|
||||
"snapshots": "ss",
|
||||
"volumes": "v",
|
||||
"backups": "b",
|
||||
"backup_gigabytes": "b_g"}
|
||||
quota_set = mock.MagicMock(**quotas)
|
||||
clients = mock.MagicMock()
|
||||
clients.cinder.return_value.quotas.get.return_value = quota_set
|
||||
|
Loading…
x
Reference in New Issue
Block a user