neutron/neutron/tests/etc
Ihar Hrachyshka 9cb6591997 Postpone heavy policy check for ports to later
When a port is validated, we check for the user to be the owner of
corresponding network, among other things. Sadly, this check requires a
plugin call to fetch the network, which goes straight into the database.
Now, if there are multiple ports to validate with current policy, and
the user is not admin, we fetch the network for each port, f.e. making
list operation on ports to scale badly.

To avoid that, we should postpone OwnerCheck (tenant_id) based
validations that rely on foreign keys, tenant_id:%(network:...)s, to as
late as possible. It will make policy checks avoid hitting database in
some cases, like when a port is owned by current user.

Note: the patch excludes regression unit tests to avoid breaking
external plugin repos that rely on base db test classes private methods
like _create_network or _create_router.

See Ic323e148f7d6d333194aa339774afa953b241aa7 for details about possible
third party breakage.

Change-Id: I99e0c4280b06d8ebab0aa8adc497662c995133ad
Closes-Bug: #1513782
2016-02-09 13:47:53 +01:00
..
api-paste.ini.test Reorganize unit test tree 2015-04-06 23:28:31 +00:00
neutron.conf Make pep8 job succeed when /etc/neutron/neutron.conf is not installed 2015-06-09 12:50:35 +02:00
neutron_test.conf Get rid of ConfigParser code in ProviderConfiguration 2015-09-21 10:55:56 -07:00
policy.json Postpone heavy policy check for ports to later 2016-02-09 13:47:53 +01:00