]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Make Neutron resources reference standard attr table
authorKevin Benton <blak111@gmail.com>
Wed, 2 Sep 2015 23:37:17 +0000 (16:37 -0700)
committerKevin Benton <blak111@gmail.com>
Mon, 23 Nov 2015 15:41:26 +0000 (07:41 -0800)
commit3c8570f3fcd54c1061467616f1d04e95db27a292
treecb5bba7c733b709a273e1aab5526fca819b1f84b
parente2567e9585eadbad0b15dea7ec04956969097a3d
Make Neutron resources reference standard attr table

This adds a new 'standardattributes' table and adds a foreign-key
references from ports, subnets, networks, subnetpools, routers,
securitygroups, and floatingips to this table.

This will make it easy to add new things to the schema like
timestamp fields or anything else that applies to multiple types
of Neutron resources. The new fields would just be added to the
'neutronresources' table instead of being duplicated across each
resource's table. Or, if the the relationship is 1-to-many (e.g. tags),
the new association table would be related to the 'standardattribute'
table.

Related-Bug: #1496802
Change-Id: Iaa3ba81a7e9cae09cea153720b29879d8cc9a080
doc/source/devref/db_layer.rst
neutron/db/l3_db.py
neutron/db/migration/alembic_migrations/versions/CONTRACT_HEAD
neutron/db/migration/alembic_migrations/versions/EXPAND_HEAD
neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py [new file with mode: 0644]
neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py [new file with mode: 0644]
neutron/db/model_base.py
neutron/db/models_v2.py
neutron/db/securitygroups_db.py
neutron/tests/unit/db/test_db_base_plugin_v2.py