horizon/openstack_dashboard/usage
David Lyle 33dc94079c Correct quota usage check for instances
Previously, updating the quota value for instance on a project that
the user was not currently scoped to would validate the new quota
value by comparing with the usage of the currently scoped project.
The cause of this error was an incorrect use of the server list
parameters.

According to the comment in nova source:
d43d1d6734/nova/api/openstack/compute/servers.py (L277-L280)
and the comments in this bug:
https://bugs.launchpad.net/nova/+bug/1185290

indicate that the tenant_id or project_id flag cannot be used without
the --all-tenants flag.

The fix involves passing the --all-tenants flag when querying instance usage
for any project the user is not currently scoped to. It also removes the
passing of the tenant_id flag when querying the current project.

Tests were also updated to match the new behavior by not passing the
tenant_id to the API call to list servers where the target project is
the currently scoped project.

Change-Id: Iee06bc1c8ccd50f595f4cb274f956c13495c8494
Closes-Bug: #1713724
2017-10-23 14:18:50 +00:00
..
__init__.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
base.py Move SG and FIP API wrapper to api.neutron 2017-06-04 17:51:25 +00:00
quotas.py Correct quota usage check for instances 2017-10-23 14:18:50 +00:00
tables.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
views.py Add units in overview project page (limit summary) 2016-06-24 15:36:33 +00:00