Clean-up quotas/limits usages

Bug #1227169 reported by Julie Pichon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Wishlist
Unassigned

Bug Description

When we moved from quotas to limits, we moved from a centralised "all quotas-related operations should be in openstack_dashboard/usages/quotas.py" to individually calling the absolute_limits API methods whenever needed, resulting sometimes in copy-pasting and duplication for certain operations. This should be cleaned up.

Additionally, quotas are still in use in places, sometimes both limits and quotas are used in the same class (e.g. BaseUsage) and it's unclear whether the quotas code is now redundant and should be removed, or if it makes sense to use it in some case. The return output from quotas and limits are different (dictionary vs list).

Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

this might be helpful refernce:

nova sample limits results....

{"limits": {"rate": [], "absolute": {"maxServerMeta": 50, "maxPersonality": 5, "maxImageMeta": 50, "maxPersonalitySize": 10240, "maxSecurityGroupRules": 20, "maxTotalKeypairs": 100, "totalRAMUsed": 8192, "totalInstancesUsed": 8, "maxSecurityGroups": 10, "totalFloatingIpsUsed": 0, "maxTotalCores": -1, "totalSecurityGroupsUsed": 0, "maxTotalFloatingIps": 10, "maxTotalInstances": 40, "totalCoresUsed": 8, "maxTotalRAMSize": 204800}}}

sample results for volumes.....

{"limits": {"rate": [], "absolute": {"maxTotalVolumeGigabytes": 3000, "maxTotalVolumes": 20}}}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/47919

Changed in horizon:
assignee: nobody → Eric Peterson (ericpeterson-l)
status: New → In Progress
Revision history for this message
Eric Peterson (ericpeterson-l) wrote :

I have a proposed solution, though I am not sure this really cleans the code up much.... it does make for easier handing of errors when quotas extension is missing. If anyone wants to continue this effort, I am ok with some additional help here ;).

Revision history for this message
Julie Pichon (jpichon) wrote :

I would prefer if you opened a new bug for this -- I wholly agree that falling back gracefully to using limits when the quotas extension is unavailable is useful, but this isn't really the confusion / code cleanup that this bug means to be fixing.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

Clearing the assignee due to long inactivity.

This can be tacked as part of blueprint make-quotas-great-again.

Changed in horizon:
assignee: Eric Peterson (ericpeterson-l) → nobody
status: In Progress → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.