usage: Ensure to count resources of a given project
When retrieving resource usage, the current code calls subnet_list
twice for shared=False/True, but 'shared' attribute of subnet is
not defined in the Networking API and actually there is no need to
use it (even though it works as expected accidentally).
What we need here is to specify tenant_id as a query parameter
with a single API to limit the scope to a given project.
The same way can be used for network_list() and router_list() calls
and it is more efficient. By doing so, we now need only one
network_list() call.
Reviewed: https:/ /review. openstack. org/431793 /git.openstack. org/cgit/ openstack/ horizon/ commit/ ?id=af8a01b362a cd85aff34dfde0a 7ace197007f768
Committed: https:/
Submitter: Jenkins
Branch: master
commit af8a01b362acd85 aff34dfde0a7ace 197007f768
Author: MinSun <email address hidden>
Date: Fri Feb 10 09:00:35 2017 +0800
usage: Ensure to count resources of a given project
When retrieving resource usage, the current code calls subnet_list
twice for shared=False/True, but 'shared' attribute of subnet is
not defined in the Networking API and actually there is no need to
use it (even though it works as expected accidentally).
What we need here is to specify tenant_id as a query parameter
with a single API to limit the scope to a given project.
The same way can be used for network_list() and router_list() calls
and it is more efficient. By doing so, we now need only one
network_list() call.
Change-Id: I40d61ed9cbae4b 083e4f3cec9caa2 69e92daf306
Closes-Bug: #1663170