752c33e92b
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 |
||
---|---|---|
.. | ||
db | ||
extensions | ||
logapi | ||
plugins | ||
port | ||
qos | ||
README.rst | ||
__init__.py | ||
address_scope.py | ||
agent.py | ||
auto_allocate.py | ||
base.py | ||
common_types.py | ||
flavor.py | ||
floatingip.py | ||
ipam.py | ||
l3_hamode.py | ||
l3agent.py | ||
metering.py | ||
network.py | ||
ports.py | ||
provisioning_blocks.py | ||
quota.py | ||
rbac_db.py | ||
router.py | ||
securitygroup.py | ||
servicetype.py | ||
stdattrs.py | ||
subnet.py | ||
subnetpool.py | ||
tag.py | ||
trunk.py |
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).