neutron/neutron/objects
Ihar Hrachyshka 752c33e92b objects: don't refetch a non-list object field if it's None
When an object field has the value of corresponding model attribute set to
None, it means that it's indeed unset, and there is no need to refetch it from
the database (it will still be None).

This becomes a more noticeable problem when we introduce security field to
Network (part of I57395d0f646ffa3089c1ac6c5a68d952ccd0b42c) that is exactly
this type of field, because with the auto-expiry patch included
(I0d65d19204da8ce30addfa5faff68544534b7853) those redundant fetches trigger
actual SELECT statements that affect performance and break
test_get_objects_queries_constant regression test case.

The patch also changes the type of 'distributed_binding' Port object field from
ObjectField to ListOfObjectFields, and also renames the field into
'distributed_bindings' to reflect actual possibilities allowed by database
schema. Note this patch is NOT expected to enable actual support for multiple
binding values, which would belong to a separate patch, but just attempts to
apply the minimal needed changes required because of the other changes included
while making sure that consequent changes for the field don't need to change
object definition.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I833b07fdbb4a57bdf8bd4255e61098ec512d1a5b
2018-06-25 15:23:10 +07:00
..
db use object utils from neutron-lib 2018-06-11 11:10:53 -06:00
extensions Tag mechanism supports resources with standard attribute 2017-07-25 08:14:04 +09:00
logapi [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
plugins [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
port [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
qos Fix all pep8 E129 errors 2018-05-03 13:44:04 +09: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 [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
agent.py use object utils from neutron-lib 2018-06-11 11:10:53 -06:00
auto_allocate.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
base.py objects: don't refetch a non-list object field if it's None 2018-06-25 15:23:10 +07:00
common_types.py Router to OVO 2017-11-24 04:11:33 +00:00
flavor.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
floatingip.py Integration of Floating IP OVO 2017-12-04 19:30:02 +09:00
ipam.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
l3_hamode.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
l3agent.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
metering.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
network.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +00:00
ports.py objects: don't refetch a non-list object field if it's None 2018-06-25 15:23:10 +07:00
provisioning_blocks.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
quota.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +00:00
rbac_db.py Merge "Use RBAC_POLICY callback constant from neutron-lib" 2018-02-20 18:19:17 +00:00
router.py Use Router OVO in external_net_db 2018-02-08 14:42:29 +00:00
securitygroup.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +00:00
servicetype.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
stdattrs.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +00:00
subnet.py Allow setting network-segment on subnet update 2018-05-24 01:09:02 +02:00
subnetpool.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +00:00
tag.py [OVO] Switch to use own registry 2017-11-22 17:44:22 +01:00
trunk.py Allow objects to opt in new engine facade 2018-02-09 04:07:34 +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).