Page MenuHomePhabricator

Display project quota and usage in openstack-browser
Closed, ResolvedPublic

Description

It would be nice to add the quota and utilization for each project to the project's page in openstack-browser.

I think this can be fetched with the limits api but we would also need to allow novaobserver to call it. The api is protected with the os_compute_api:limits permission.

Event Timeline

bd808 triaged this task as Medium priority.May 3 2017, 12:22 AM

Change 352606 had a related patch set uploaded (by Andrew Bogott; owner: Andrew Bogott):
[operations/puppet@production] Nova policy: Open up quota-related queries

https://gerrit.wikimedia.org/r/352606

Change 352606 merged by Andrew Bogott:
[operations/puppet@production] Nova policy: Open up quota-related queries

https://gerrit.wikimedia.org/r/352606

With this:

client = novaclient.Client("2.0", session=session, region_name=region)
print(project.name, client.limits.get().to_dict()['absolute'])

You can get:
(u'bastion', {u'maxServerMeta': 128, u'maxPersonality': 5, u'totalServerGroupsUsed': 0, u'maxImageMeta': 128, u'maxPersonalitySize': 10240, u'maxTotalKeypairs': 100, u'maxSecurityGroupRules': 20, u'maxServerGroups': 10, u'totalCoresUsed': 4, u'totalRAMUsed': 8192, u'maxSecurityGroups': 10, u'totalFloatingIpsUsed': 0, u'totalInstancesUsed': 4, u'maxServerGroupMembers': 10, u'maxTotalFloatingIps': 7, u'totalSecurityGroupsUsed': 1, u'maxTotalInstances': 8, u'maxTotalRAMSize': 16384, u'maxTotalCores': 8})