Fixed all pep8 E265 errors and changed tox.ini to no longer
ignore them. Also removed an N536 comment missed from a
previous change.
Change-Id: Ie6db8406c3b884c95b2a54a7598ea83476b8dba1
Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.
Trivialfix
Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
generate_records_for_existing[2] assumes wrongly that:
session.execute(...).insert_primary_key
returns a value BUT it returns a list of last inserted primary keys.
This trouble affects at least mysql and postgresql backends but not
pymysql (which silently unwraps the list), it explains why grenade tests
didn't catch this trouble.
This change corrects generate_records_for_existing by extracting last
inserted primary key from insert_primary_key list.
[1] neutron.db.migration.alembic_migrations.versions.mitaka.contract\
.8a6d8bdae39_migrate_neutron_resources_table
Closes-Bug: #1546762
Change-Id: I607e485ab02f1d98874095b32ce53dfdd9cd1d51
The "migrate resources table" migration will fail
for some MariaDB versions if the NOT NULL alteration
is applied after the foreign key constraint has been
added [1]. This patch reverses the order so that
NOT NULL is applied first.
[1] http://paste.openstack.org/show/480820/
Change-Id: Iab2b9fc7d82c739ae458ee48c1830541fb0f9579
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