Add snapshot related data to limits api
When calling the limits api we can only get Volume and Gigabyte data, the snapshot related limit value should be returned too. Change-Id: I6a5e1e2d1aa6abbac5d5dacd042223ce49207c1f Closes-bug: 1282924
This commit is contained in:
parent
d6b3b12820
commit
c9c6befe7e
|
@ -34,6 +34,7 @@ class UsedLimitsController(wsgi.Controller):
|
|||
quota_map = {
|
||||
'totalVolumesUsed': 'volumes',
|
||||
'totalGigabytesUsed': 'gigabytes',
|
||||
'totalSnapshotsUsed': 'snapshots',
|
||||
}
|
||||
|
||||
used_limits = {}
|
||||
|
|
|
@ -47,6 +47,7 @@ class ViewBuilder(object):
|
|||
"cores": ["maxTotalCores"],
|
||||
"gigabytes": ["maxTotalVolumeGigabytes"],
|
||||
"volumes": ["maxTotalVolumes"],
|
||||
"snapshots": ["maxTotalSnapshots"],
|
||||
"key_pairs": ["maxTotalKeypairs"],
|
||||
"floating_ips": ["maxTotalFloatingIps"],
|
||||
"metadata_items": ["maxServerMeta", "maxImageMeta"],
|
||||
|
|
|
@ -45,6 +45,7 @@ class UsedLimitsTestCase(test.TestCase):
|
|||
quota_map = {
|
||||
'totalVolumesUsed': 'volumes',
|
||||
'totalGigabytesUsed': 'gigabytes',
|
||||
'totalSnapshotsUsed': 'snapshots',
|
||||
}
|
||||
|
||||
limits = {}
|
||||
|
|
Loading…
Reference in New Issue