horizon/openstack_dashboard
David Lyle 2c4c4aa77a 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
(cherry picked from commit 33dc94079c)
2018-01-16 15:34:38 +00:00
..
api Merge "Show updated data on Flavor Access tab" into stable/pike 2018-01-03 23:32:56 +00:00
conf Drop FWaaS related policies from neutron_policy.json 2017-07-15 10:45:22 +00:00
contrib Theme Preview Page should include datepicker. 2017-07-27 10:24:33 -07:00
dashboards Merge "Redirect VM console dynamically" into stable/pike 2018-01-10 20:44:24 +00:00
django_pyscss_fix Handle log message interpolation by the logger 2017-03-31 20:59:16 +09:00
enabled Merge "Revert "Enable to refresh ngdetails view"" 2017-08-05 04:26:50 +00:00
local Revert "Generate language list automatically" 2017-08-13 14:41:24 +00:00
locale Imported Translations from Zanata 2017-12-16 07:37:28 +00:00
management Use WSGIApplicationGroup %{GLOBAL} in mod_wsgi configuration 2017-08-04 14:52:43 +02:00
static Fix incorrect volume type value in ng images create volume form 2018-01-03 21:55:27 +00:00
templates Fix link to serial console stylesheet 2017-10-05 19:35:45 +01:00
templatetags Added SELECTABLE_THEMES setting 2017-07-26 11:52:35 +01:00
test Correct quota usage check for instances 2018-01-16 15:34:38 +00:00
themes Merge "Replace dict.iteritems() with dict.items() in horizon" 2017-08-03 04:49:55 +00:00
usage Correct quota usage check for instances 2018-01-16 15:34:38 +00:00
utils plugin framework: allow operators to override embeded enabled files 2017-07-24 09:37:57 +09:00
wsgi Normalise the path to resolve ../.. 2016-11-14 16:29:28 +11:00
.eslintrc Add selective ESLint rule activation for Horizon Legacy JS 2015-07-08 17:06:15 -07:00
__init__.py
context_processors.py Fix KeyError for HORIZON_CONFIG['plugins'] in plugin UT 2017-07-07 11:33:40 +00:00
exceptions.py Excise Trove from Horizon 2015-12-22 02:01:07 -07:00
hooks.py
karma.conf.js Makes the xstatic files lookup dynamic in the tests 2017-07-27 10:01:33 -04:00
policy.py Specify POLICY_CHECK_FUNCTION as a string 2016-11-25 13:06:14 +01:00
settings.py Revert "Generate language list automatically" 2017-08-13 14:41:24 +00:00
theme_settings.py Added SELECTABLE_THEMES setting 2017-07-26 11:52:35 +01:00
urls.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
views.py Fix actions inside instance details view page 2017-11-17 10:04:04 +00:00