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:
@@ -14,9 +14,9 @@
|
||||
"maxTotalRAMSize": 51200,
|
||||
"totalCoresUsed": 0,
|
||||
"totalInstancesUsed": 0,
|
||||
"totalKeyPairsUsed": 0,
|
||||
"totalRAMUsed": 0,
|
||||
"totalSecurityGroupsUsed": 0
|
||||
"totalSecurityGroupsUsed": 0,
|
||||
"totalFloatingIpsUsed": 0
|
||||
},
|
||||
"rate": [
|
||||
{
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
"maxTotalRAMSize": 51200,
|
||||
"totalCoresUsed": 0,
|
||||
"totalInstancesUsed": 0,
|
||||
"totalKeyPairsUsed": 0,
|
||||
"totalRAMUsed": 0,
|
||||
"totalSecurityGroupsUsed": 0
|
||||
"totalSecurityGroupsUsed": 0,
|
||||
"totalFloatingIpsUsed": 0
|
||||
},
|
||||
"rate": [
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user