neutron/neutron/objects
Doug Wiegley f9cbd939b9
Fix performance regression adding rules to security groups
Sometime between liberty and pike, adding rules to SG's got
slow, and slower with every rule. Streamline the rule create path,
and get close to the old performance back.

Two performance fixes:
1. Get rid of an n^2 duplicate check, using a hash table instead,
on bulk creates. This is more memory intensive than the previous loop,
but usable far past where the other becomes too slow to be useful.
2. Use an object existence check in a few places where we do not
want to load all of the child rules.

Also squashed in:
Restore tenant_id check on security group rule adds to previous semantic

We switched from swapping the tenant_id in the context to explicitly
checking the db column. Switch back, and a test that checks for
not breaking this rather odd behavior. At least, until we decide
to fix it as a bug.

Co-Authored-By: William Hager <whager@salesforce.com>
Change-Id: I34e41a128f28211f2e7ab814a2611ce22620fcf3
Closes-bug: 1810563
(cherry picked from commit 2eb31f84c9)
(squashed patch from commit bd4c291cdf)
2019-02-01 21:10:21 -07:00
..
db Support object string field filtering on "LIKE" statement 2017-07-07 16:15:44 +00:00
extensions Tag mechanism supports resources with standard attribute 2017-07-25 08:14:04 +09:00
logapi [log]: implement logging plugin 2017-07-12 13:30:50 +07:00
plugins OVO for FlatAllocation 2016-12-22 13:25:50 +00:00
port objects: update fields_no_update to reflect models 2017-05-24 20:28:04 +00:00
qos Fix error message when duplicate QoS rule is created 2018-02-23 14:39:14 +01:00
README.rst Objects: Add README for neutron/objects directory tree 2016-10-07 15:12:20 +00:00
__init__.py Use dirname in object recursive import 2017-04-20 04:35:10 -07:00
address_scope.py Use project_id instead of tenant_id in objects 2017-01-13 14:31:26 +00:00
agent.py Support object string field filtering on "LIKE" statement 2017-07-07 16:15:44 +00:00
auto_allocate.py objects: update fields_no_update to reflect models 2017-05-24 20:28:04 +00:00
base.py Fix performance regression adding rules to security groups 2019-02-01 21:10:21 -07:00
common_types.py Support protocol numbers in security group API 2018-01-09 14:28:49 +01:00
exceptions.py Move OVO exceptions to neutron/objects/exceptions 2016-11-10 10:25:06 -07:00
flavor.py Flavor and Service Profile to OVO 2017-01-05 16:59:36 -06:00
floatingip.py Make UUIDField actually validate UUIDs 2016-12-07 15:11:43 +00:00
ipam.py objects: update fields_no_update to reflect models 2017-05-24 20:28:04 +00:00
l3agent.py [OVO] Integration of RouterL3AgentBinding 2017-05-26 13:17:58 -07:00
metering.py objects: update fields_no_update to reflect models 2017-05-24 20:28:04 +00:00
network.py Allow to set/modify network mtu 2017-08-11 00:57:34 +00:00
ports.py Fix Port OVO filtering based on security groups 2018-06-08 13:25:16 +00:00
provisioning_blocks.py OVO for Provisioning Block DB Model 2016-11-22 19:15:51 +00:00
quota.py OVO for Quotas and Reservation 2017-03-24 15:52:34 +00:00
rbac_db.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
router.py Merge "RouterPort OVO integration" 2017-07-31 09:39:02 +00:00
securitygroup.py Integrate Security Groups OVO 2017-06-13 19:27:27 +00:00
servicetype.py Make UUIDField actually validate UUIDs 2016-12-07 15:11:43 +00:00
subnet.py objects: update fields_no_update to reflect models 2017-05-24 20:28:04 +00:00
subnetpool.py objects: added update_objects to OVO framework 2017-05-24 20:28:11 +00:00
tag.py OVO for Tag 2017-03-07 23:06:00 +00:00
trunk.py Tag mechanism supports resources with standard attribute 2017-07-25 08:14:04 +09:00
utils.py Support object string field filtering on "LIKE" statement 2017-07-07 16:15:44 +00:00

README.rst

Neutron Objects

Directory

This directory is designed to contain all modules which have objects definitions shipped with core Neutron. The files and directories located inside of this directory should follow the guidelines below.

Structure

The Neutron objects tree should have the following structure:

  • The expected directory structure is flat, except for the ML2 plugins. All ML2 plugin objects should fall under the plugins subdirectory (i.e. plugins/ml2/gre_allocation).
  • Module names should use singular forms for nouns (network.py, not networks.py).