Rodolfo Alonso Hernandez f25cc2f503 Reorder subnet RBAC policy check strings
The subnet policy rule ``ADMIN_OR_NET_OWNER_MEMBER`` requires to
retrieve the network object from the database to read the project ID.
When retrieving a list of subnets, this operation can slow down the
API call. This patch is reordering the subnet RBAC policy checks to
make this check at the end.

As reported in the related LP bug, it is usual to have a "creator"
project where different resources are created and then shared to others;
in this case networks and subnets. All these subnets will belong to the
same project. If a non-admin user from this project list all the
subnets, with the code before to this patch it would be needed to
retrieve all the networks to read the project ID. With the current code
it is needed only to check that the user is a project reader.

The following benchmark has been done in a VM running a standalone
OpenStack deployment. One project has created 400 networks and 400
subnets (one per network). Each network has been shared with another
project. API time to process "GET /networking/v2.0/subnets":
* Without this patch: 5.5 seconds (average)
* With this patch: 0.25 seconds (average)

Related-Bug: #2071374
Related-Bug: #2037107
Change-Id: Ibca174213bba3c56fc18ec2732d80054ac95e859
(cherry picked from commit 729920da5e836fa7a27b1b85b3b2999146d905ba)
2024-07-04 10:18:12 +00:00
2016-06-28 22:46:19 +02:00
2022-12-10 20:43:54 +01:00
2023-09-25 10:10:38 -04:00
2024-03-15 14:50:24 +00:00
2014-05-16 13:40:04 -04:00
2024-01-17 13:33:08 -05:00
2023-08-21 13:57:00 +00:00
2024-02-08 10:34:10 -05:00
2023-03-28 06:59:20 +00:00
2024-01-12 17:44:09 +09:00

OpenStack Neutron

image

Neutron is an OpenStack project to provide "network connectivity as a service" between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova).

To learn more about neutron:

If you would like to contribute to Neutron, please read the file CONTRIBUTING.rst or see the Neutron contributor guide:

https://docs.openstack.org/neutron/latest/contributor/contributing.html

Get in touch via email. Use [Neutron] in your subject.

Description
OpenStack Networking (Neutron)
Readme 1 GiB
Languages
Python 99.7%
Shell 0.3%