commit 2c4c4aa77a092d673f90ea5e73599fc43b6ec7be
Author: David Lyle <email address hidden>
Date: Fri Oct 6 10:44:03 2017 -0600
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.
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 33dc94079cc25128998d2f339e664a775ce82396)
Reviewed: https:/ /review. openstack. org/534348 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=2c4c4aa77a0 92d673f90ea5e73 599fc43b6ec7be
Committed: https:/
Submitter: Zuul
Branch: stable/pike
commit 2c4c4aa77a092d6 73f90ea5e73599f c43b6ec7be
Author: David Lyle <email address hidden>
Date: Fri Oct 6 10:44:03 2017 -0600
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: /github. com/openstack/ nova/blob/ d43d1d673403c1b f9e2ffd94d7a711 956a3506de/ nova/api/ openstack/ compute/ servers. py#L277- L280 /bugs.launchpad .net/nova/ +bug/1185290
https:/
and the comments in this bug:
https:/
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: Iee06bc1c8ccd50 f595f4cb274f956 c13495c8494 8998d2f339e664a 775ce82396)
Closes-Bug: #1713724
(cherry picked from commit 33dc94079cc2512