From: Vahid Hashemian Date: Mon, 20 Jan 2014 18:06:01 +0000 (-0800) Subject: Do not show quota of removed volume types in Default Quotas panel X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a7b6d82fd170bc594ceff791eb10b900a61c9175;p=openstack-build%2Fcinder-build.git Do not show quota of removed volume types in Default Quotas panel Fixes the issue where quota for removed volume types still show up in Admin -> Defaults -> Default Quotas view. Change-Id: I2a822ac08b8347a8d76e8de70deca0e34fafe6e3 Closes-Bug: #1266906 --- diff --git a/cinder/quota.py b/cinder/quota.py index a38ff7cac..6e48ea410 100644 --- a/cinder/quota.py +++ b/cinder/quota.py @@ -862,10 +862,8 @@ class VolumeTypeQuotaEngine(QuotaEngine): result[resource.name] = resource # Volume type quotas. - # NOTE(jdg): We also want to check deleted types here as well - # if we don't the _get_quotas resource len check on will fail volume_types = db.volume_type_get_all(context.get_admin_context(), - True) + False) for volume_type in volume_types.values(): for part_name in ('volumes', 'gigabytes', 'snapshots'): resource = VolumeTypeResource(part_name, volume_type)