Fix errors in used_limits extension

Fixes bug #1062049

There was a typo mapping the security groups resource to floating IPs.

Volumes usage isn't tracked by Nova any more since delete-nova-volume.

Key pairs don't work with the extension because of bug #1089877.

Change-Id: Ifd694b21fef1dc95e67c07dcef0cd6ea3daa8d53
This commit is contained in:
Mark McLoughlin
2012-12-13 11:21:18 +00:00
parent dc48ce7fb1
commit 6c9d9ab434
6 changed files with 10 additions and 14 deletions

View File

@@ -14,9 +14,9 @@
"maxTotalRAMSize": 51200,
"totalCoresUsed": 0,
"totalInstancesUsed": 0,
"totalKeyPairsUsed": 0,
"totalRAMUsed": 0,
"totalSecurityGroupsUsed": 0
"totalSecurityGroupsUsed": 0,
"totalFloatingIpsUsed": 0
},
"rate": [
{

View File

@@ -26,10 +26,10 @@
<limit name="totalRAMUsed" value="0"/>
<limit name="totalInstancesUsed" value="0"/>
<limit name="maxSecurityGroups" value="10"/>
<limit name="totalFloatingIpsUsed" value="0"/>
<limit name="maxTotalCores" value="20"/>
<limit name="totalSecurityGroupsUsed" value="0"/>
<limit name="maxTotalFloatingIps" value="10"/>
<limit name="totalKeyPairsUsed" value="0"/>
<limit name="maxTotalInstances" value="10"/>
<limit name="totalCoresUsed" value="0"/>
<limit name="maxTotalRAMSize" value="51200"/>

View File

@@ -56,10 +56,8 @@ class UsedLimitsController(wsgi.Controller):
'totalRAMUsed': 'ram',
'totalCoresUsed': 'cores',
'totalInstancesUsed': 'instances',
'totalVolumesUsed': 'volumes',
'totalVolumeGigabytesUsed': 'gigabytes',
'totalSecurityGroupsUsed': 'floating_ips',
'totalKeyPairsUsed': 'key_pairs',
'totalFloatingIpsUsed': 'floating_ips',
'totalSecurityGroupsUsed': 'security_groups',
}
used_limits = {}
for display_name, quota in quota_map.iteritems():

View File

@@ -52,10 +52,8 @@ class UsedLimitsTestCase(test.TestCase):
'totalRAMUsed': 'ram',
'totalCoresUsed': 'cores',
'totalInstancesUsed': 'instances',
'totalVolumesUsed': 'volumes',
'totalVolumeGigabytesUsed': 'gigabytes',
'totalSecurityGroupsUsed': 'floating_ips',
'totalKeyPairsUsed': 'key_pairs',
'totalFloatingIpsUsed': 'floating_ips',
'totalSecurityGroupsUsed': 'security_groups',
}
limits = {}
for display_name, q in quota_map.iteritems():

View File

@@ -14,9 +14,9 @@
"maxTotalRAMSize": 51200,
"totalCoresUsed": 0,
"totalInstancesUsed": 0,
"totalKeyPairsUsed": 0,
"totalRAMUsed": 0,
"totalSecurityGroupsUsed": 0
"totalSecurityGroupsUsed": 0,
"totalFloatingIpsUsed": 0
},
"rate": [
{

View File

@@ -31,7 +31,7 @@
<limit name="maxTotalCores" value="20"/>
<limit name="totalSecurityGroupsUsed" value="0"/>
<limit name="maxTotalFloatingIps" value="10"/>
<limit name="totalKeyPairsUsed" value="0"/>
<limit name="totalFloatingIpsUsed" value="0"/>
<limit name="maxTotalRAMSize" value="51200"/>
</absolute>
</limits>