]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Do not show quota of removed volume types in Default Quotas panel
authorVahid Hashemian <vahidhashemian@us.ibm.com>
Mon, 20 Jan 2014 18:06:01 +0000 (10:06 -0800)
committerVahid Hashemian <vahidhashemian@us.ibm.com>
Mon, 20 Jan 2014 18:20:36 +0000 (10:20 -0800)
Fixes the issue where quota for removed volume types still show up
in Admin -> Defaults -> Default Quotas view.

Change-Id: I2a822ac08b8347a8d76e8de70deca0e34fafe6e3
Closes-Bug: #1266906

cinder/quota.py

index a38ff7cacdbbb131561100c612df12f7f9d71bb1..6e48ea41042ff31f0df781d3e63421319cf2047d 100644 (file)
@@ -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)