diff --git a/openstack_dashboard/test/tests/quotas.py b/openstack_dashboard/test/tests/quotas.py index fafdf88c4d..b6c35724d6 100644 --- a/openstack_dashboard/test/tests/quotas.py +++ b/openstack_dashboard/test/tests/quotas.py @@ -67,7 +67,7 @@ class QuotaTests(test.APITestCase): usages.update({'volumes': {'available': 0, 'used': 4, 'quota': 1}, 'snapshots': {'available': 0, 'used': 3, 'quota': 1}, - 'gigabytes': {'available': 880, 'used': 120, + 'gigabytes': {'available': 600, 'used': 400, 'quota': 1000}}) return usages diff --git a/openstack_dashboard/usage/quotas.py b/openstack_dashboard/usage/quotas.py index 3e42889eeb..4ff3446e56 100644 --- a/openstack_dashboard/usage/quotas.py +++ b/openstack_dashboard/usage/quotas.py @@ -381,7 +381,9 @@ def _get_tenant_volume_usages(request, usages, disabled_quotas, tenant_id): else: volumes = cinder.volume_list(request) snapshots = cinder.volume_snapshot_list(request) - usages.tally('gigabytes', sum([int(v.size) for v in volumes])) + volume_usage = sum([int(v.size) for v in volumes]) + snapshot_usage = sum([int(s.size) for s in snapshots]) + usages.tally('gigabytes', (snapshot_usage + volume_usage)) usages.tally('volumes', len(volumes)) usages.tally('snapshots', len(snapshots)) except cinder.cinder_exception.ClientException: