Browse Source

Fix E402 pep8 errors

Fix E402 (module level import not at top of file) pep8 errors
and no longer ignore new failures.

Trivialfix

Change-Id: If9a202f1f322b5b03966c692e33e94b7c872079b
changes/39/561039/3
Brian Haley 3 years ago
committed by Brian Haley
parent
commit
de243a3513
82 changed files with 303 additions and 310 deletions
  1. +4
    -4
      neutron/db/migration/alembic_migrations/script.py.mako
  2. +11
    -12
      neutron/db/migration/alembic_migrations/versions/kilo_initial.py
  3. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py
  4. +2
    -2
      neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py
  5. +5
    -5
      neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py
  6. +2
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py
  7. +4
    -5
      neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py
  8. +4
    -4
      neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
  9. +2
    -2
      neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py
  10. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py
  11. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py
  12. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py
  13. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py
  14. +6
    -6
      neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py
  15. +5
    -6
      neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py
  16. +4
    -4
      neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py
  17. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py
  18. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py
  19. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py
  20. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py
  21. +3
    -3
      neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py
  22. +2
    -2
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py
  23. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py
  24. +5
    -6
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py
  25. +4
    -4
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py
  26. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py
  27. +6
    -6
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py
  28. +2
    -2
      neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py
  29. +5
    -6
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py
  30. +4
    -4
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py
  31. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py
  32. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py
  33. +4
    -4
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py
  34. +6
    -6
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py
  35. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py
  36. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py
  37. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py
  38. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py
  39. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py
  40. +4
    -4
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py
  41. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py
  42. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py
  43. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py
  44. +3
    -3
      neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py
  45. +5
    -5
      neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py
  46. +6
    -5
      neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py
  47. +2
    -2
      neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py
  48. +2
    -2
      neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py
  49. +4
    -4
      neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py
  50. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py
  51. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py
  52. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py
  53. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py
  54. +4
    -4
      neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py
  55. +6
    -6
      neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py
  56. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py
  57. +2
    -2
      neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py
  58. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py
  59. +6
    -6
      neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py
  60. +4
    -4
      neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py
  61. +3
    -2
      neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py
  62. +3
    -4
      neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
  63. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py
  64. +4
    -4
      neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py
  65. +2
    -2
      neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py
  66. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py
  67. +6
    -6
      neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py
  68. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py
  69. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py
  70. +3
    -3
      neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py
  71. +2
    -2
      neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py
  72. +2
    -3
      neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py
  73. +7
    -7
      neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py
  74. +6
    -6
      neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py
  75. +4
    -4
      neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py
  76. +3
    -3
      neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py
  77. +5
    -6
      neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py
  78. +3
    -3
      neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py
  79. +5
    -5
      neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py
  80. +7
    -7
      neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py
  81. +6
    -5
      neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py
  82. +1
    -2
      tox.ini

+ 4
- 4
neutron/db/migration/alembic_migrations/script.py.mako View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
"""${message}
Revision ID: ${up_revision}
@ -28,10 +32,6 @@ down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
% endif
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
def upgrade():
${upgrades if upgrades else "pass"}

+ 11
- 12
neutron/db/migration/alembic_migrations/versions/kilo_initial.py View File

@ -13,18 +13,6 @@
# under the License.
#
"""kilo_initial
Revision ID: kilo
Revises: None
"""
# revision identifiers, used by Alembic.
revision = 'kilo'
down_revision = None
from neutron.db import migration
from neutron.db.migration.alembic_migrations import agent_init_ops
from neutron.db.migration.alembic_migrations import brocade_init_ops
@ -48,6 +36,17 @@ from neutron.db.migration.alembic_migrations import secgroup_init_ops
from neutron.db.migration.alembic_migrations import vmware_init_ops
from neutron.db.migration.alembic_migrations import vpn_init_ops
"""kilo_initial
Revision ID: kilo
Revises: None
"""
# revision identifiers, used by Alembic.
revision = 'kilo'
down_revision = None
def upgrade():
migration.pk_on_alembic_version_table()


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add geneve ml2 type driver
Revision ID: 11926bcfe72d
@ -25,9 +28,6 @@ Create Date: 2015-08-27 19:56:16.356522
revision = '11926bcfe72d'
down_revision = '2e5352a0ad4d'
from alembic import op
import sqlalchemy as sa
def contract_creation_exceptions():
"""These elements were created by mistake in the contract branch."""


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py View File

@ -13,6 +13,8 @@
# under the License.
#
from alembic import op
"""Metaplugin removal
Revision ID: 2a16083502f3
@ -25,8 +27,6 @@ Create Date: 2015-06-16 09:11:10.488566
revision = '2a16083502f3'
down_revision = '5498d17be016'
from alembic import op
def upgrade():
op.drop_table('networkflavors')


+ 5
- 5
neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py View File

@ -13,6 +13,11 @@
# under the License.
#
from alembic import op
from sqlalchemy.engine import reflection
from neutron.db import migration
"""Add missing foreign keys
Revision ID: 2e5352a0ad4d
@ -25,11 +30,6 @@ Create Date: 2015-08-20 12:43:09.110427
revision = '2e5352a0ad4d'
down_revision = '2a16083502f3'
from alembic import op
from sqlalchemy.engine import reflection
from neutron.db import migration
TABLE_NAME = 'flavorserviceprofilebindings'


+ 2
- 3
neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py View File

@ -11,6 +11,8 @@
# under the License.
#
from neutron.db.migration import cli
"""Initial no-op Liberty contract rule.
Revision ID: 30018084ec99
@ -19,9 +21,6 @@ Create Date: 2015-06-22 00:00:00.000000
"""
from neutron.db.migration import cli
# revision identifiers, used by Alembic.
revision = '30018084ec99'
down_revision = 'kilo'


+ 4
- 5
neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron.db import migration
"""Drop cisco monolithic tables
Revision ID: 4af11ca47297
@ -21,11 +25,6 @@ Create Date: 2015-08-13 08:01:19.709839
"""
from alembic import op
from neutron.db import migration
# revision identifiers, used by Alembic.
revision = '4af11ca47297'
down_revision = '11926bcfe72d'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
"""network_rbac
Revision ID: 4ffceebfada
@ -26,10 +30,6 @@ revision = '4ffceebfada'
down_revision = '30018084ec99'
depends_on = ('8675309a5c4f',)
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
# A simple model of the networks table with only the fields needed for
# the migration.


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py View File

@ -13,6 +13,8 @@
# under the License.
#
from alembic import op
"""Drop legacy OVS and LB plugin tables
Revision ID: 5498d17be016
@ -25,8 +27,6 @@ Create Date: 2015-06-25 14:08:30.984419
revision = '5498d17be016'
down_revision = '4ffceebfada'
from alembic import op
def upgrade():
op.drop_table('ovs_network_bindings')


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""address scope support in subnetpool
Revision ID: 1b4c6e320f79
@ -25,9 +28,6 @@ Create Date: 2015-07-03 09:48:39.491058
revision = '1b4c6e320f79'
down_revision = '1c844d1677f7'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('subnetpools',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add order to dnsnameservers
Revision ID: 1c844d1677f7
@ -25,9 +28,6 @@ Create Date: 2015-07-21 22:59:03.383850
revision = '1c844d1677f7'
down_revision = '26c371498592'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('dnsnameservers',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""subnetpool hash
Revision ID: 26c371498592
@ -25,9 +28,6 @@ Create Date: 2015-06-02 21:18:19.942076
revision = '26c371498592'
down_revision = '45f955889773'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Flavor framework
Revision ID: 313373c0ffee
@ -24,9 +27,6 @@ Create Date: 2014-07-17 03:00:00.00
revision = '313373c0ffee'
down_revision = '52c5312f6baf'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 6
- 6
neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
from neutron.db import migration
"""Add dns_name to Port
Revision ID: 34af2b5c5a59
@ -21,12 +27,6 @@ Create Date: 2015-08-23 00:22:47.618593
"""
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
from neutron.db import migration
# revision identifiers, used by Alembic.
revision = '34af2b5c5a59'
down_revision = '9859ac9c136'


+ 5
- 6
neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py View File

@ -13,6 +13,11 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron.db.migration import cli
"""nsxv_vdr_metadata.py
Revision ID: 354db87e3225
@ -21,12 +26,6 @@ Create Date: 2015-04-19 14:59:15.102609
"""
from alembic import op
import sqlalchemy as sa
from neutron.db.migration import cli
# revision identifiers, used by Alembic.
revision = '354db87e3225'
down_revision = 'kilo'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
"""quota_usage
Revision ID: 45f955889773
@ -25,10 +29,6 @@ Create Date: 2015-04-17 08:09:37.611546
revision = '45f955889773'
down_revision = '8675309a5c4f'
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""qos db changes
Revision ID: 48153cb5f051
@ -25,9 +28,6 @@ Create Date: 2015-06-24 17:03:34.965101
revision = '48153cb5f051'
down_revision = '1b4c6e320f79'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Initial operations in support of address scopes
"""
@ -21,9 +24,6 @@
revision = '52c5312f6baf'
down_revision = '599c6a226151'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""neutrodb_ipam
Revision ID: 599c6a226151
@ -25,9 +28,6 @@ Create Date: 2015-03-08 18:12:08.962378
revision = '599c6a226151'
down_revision = '354db87e3225'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""network_rbac
Revision ID: 8675309a5c4f
@ -25,9 +28,6 @@ Create Date: 2015-06-14 13:12:04.012457
revision = '8675309a5c4f'
down_revision = '313373c0ffee'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""quota_reservations
Revision ID: 9859ac9c136
@ -25,9 +28,6 @@ Create Date: 2015-03-11 06:40:56.775075
revision = '9859ac9c136'
down_revision = '48153cb5f051'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py View File

@ -11,6 +11,8 @@
# under the License.
#
from alembic import op
"""Drop embrane plugin table
Revision ID: 1b294093239c
@ -23,8 +25,6 @@ Create Date: 2015-10-09 14:07:59.968597
revision = '1b294093239c'
down_revision = '4af11ca47297'
from alembic import op
def upgrade():
op.drop_table('embrane_pool_port')

+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""DVR sheduling refactoring
Revision ID: 2b4c2465d44b
@ -25,9 +28,6 @@ Create Date: 2015-12-23 07:39:49.062767
revision = '2b4c2465d44b'
down_revision = '8a6d8bdae39'
from alembic import op
import sqlalchemy as sa
ROUTER_ATTR_TABLE = 'router_extra_attributes'
ROUTER_BINDING_TABLE = 'routerl3agentbindings'


+ 5
- 6
neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py View File

@ -13,6 +13,11 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
"""standard_desc
Revision ID: 4ffceebfcdc
@ -21,12 +26,6 @@ Create Date: 2016-02-10 23:12:04.012457
"""
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
# revision identifiers, used by Alembic.
revision = '4ffceebfcdc'
down_revision = '5ffceebfada'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
"""network_rbac_external
Revision ID: 5ffceebfada
@ -26,10 +30,6 @@ revision = '5ffceebfada'
down_revision = 'c6c112992c9'
depends_on = ()
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
# A simple model of the external network table with only the fields needed for
# the migration.


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""standardattributes migration
Revision ID: 8a6d8bdae39
@ -25,9 +28,6 @@ revision = '8a6d8bdae39'
down_revision = '1b294093239c'
depends_on = ('32e5974ada25',)
from alembic import op
import sqlalchemy as sa
# basic model of the tables with required field for migration
TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups',


+ 6
- 6
neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
from neutron.db import rbac_db_models
"""rbac_qos_policy
Revision ID: c6c112992c9
@ -21,12 +27,6 @@ Create Date: 2015-11-25 18:45:03.831359
"""
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
from neutron.db import rbac_db_models
# revision identifiers, used by Alembic.
revision = 'c6c112992c9'


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py View File

@ -13,6 +13,8 @@
# under the License.
#
from alembic import op
"""Drop NEC plugin tables
Revision ID: e3278ee65050
@ -25,8 +27,6 @@ Create Date: 2016-02-15 18:50:56.870043
revision = 'e3278ee65050'
down_revision = '2b4c2465d44b'
from alembic import op
def upgrade():
op.drop_table('ofcnetworkmappings')


+ 5
- 6
neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py View File

@ -13,6 +13,11 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
"""Add desc to standard attr table
Revision ID: 0e66c5227a8a
@ -21,12 +26,6 @@ Create Date: 2016-02-02 10:50:34.238563
"""
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
# revision identifiers, used by Alembic.
revision = '0e66c5227a8a'
down_revision = '3894bccad37f'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
"""add is_default to subnetpool
Revision ID: 13cfb89f881a
@ -25,10 +29,6 @@ Create Date: 2015-09-30 15:58:31.170153
revision = '13cfb89f881a'
down_revision = '59cb5b6cf4d'
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
def upgrade():
op.add_column('subnetpools',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add dynamic routing model data
Revision ID: 15be73214821
@ -24,9 +27,6 @@ Create Date: 2015-07-29 13:16:08.604175
revision = '15be73214821'
down_revision = '19f26505c74f'
from alembic import op
import sqlalchemy as sa
def upgrade():


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""rbac_qos_policy
Revision ID: 15e43b934f81
@ -21,9 +24,6 @@ Create Date: 2015-11-25 18:45:03.819115
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '15e43b934f81'
down_revision = 'b4caf27aae4'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py View File

@ -14,6 +14,10 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
""" Auto Allocated Topology - aka Get-Me-A-Network
Revision ID: 19f26505c74f
@ -22,10 +26,6 @@ Create Date: 2015-11-20 11:27:53.419742
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
# revision identifiers, used by Alembic.
revision = '19f26505c74f'
down_revision = '1df244e556f5'


+ 6
- 6
neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
"""add_unique_ha_router_agent_port_bindings
Revision ID: 1df244e556f5
@ -25,12 +31,6 @@ Create Date: 2015-10-02 18:06:01.696742
revision = '1df244e556f5'
down_revision = '659bf3d90664'
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
UNIQUE_NAME = 'uniq_ha_router_agent_port_bindings0port_id0l3_agent_id'
TABLE_NAME = 'ha_router_agent_port_bindings'


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""tag support
Revision ID: 2f9e956e7532
@ -24,9 +27,6 @@ Create Date: 2016-01-21 08:11:49.604182
revision = '2f9e956e7532'
down_revision = '31ed664953e6'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add resource_versions row to agent table
Revision ID: 31ed664953e6
@ -25,9 +28,6 @@ Create Date: 2016-01-15 13:41:30.016915
revision = '31ed664953e6'
down_revision = '15e43b934f81'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('agents',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add standard attribute table
Revision ID: 32e5974ada25
@ -24,9 +27,6 @@ Create Date: 2015-09-10 00:22:47.618593
revision = '32e5974ada25'
down_revision = '13cfb89f881a'
from alembic import op
import sqlalchemy as sa
TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups',
'floatingips', 'routers', 'securitygrouprules')


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add_timestamp_to_base_resources
Revision ID: 3894bccad37f
@ -25,9 +28,6 @@ Create Date: 2016-03-01 04:19:58.852612
revision = '3894bccad37f'
down_revision = '2f9e956e7532'
from alembic import op
import sqlalchemy as sa
def upgrade():
for column_name in ['created_at', 'updated_at']:


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add availability zone
Revision ID: 59cb5b6cf4d
@ -24,9 +27,6 @@ Create Date: 2015-01-20 14:38:47.156574
revision = '59cb5b6cf4d'
down_revision = '34af2b5c5a59'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('agents',


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
"""Add tables and attributes to support external DNS integration
Revision ID: 659bf3d90664
@ -25,10 +29,6 @@ Create Date: 2015-09-11 00:22:47.618593
revision = '659bf3d90664'
down_revision = 'c3a73f615e4'
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
def upgrade():
op.create_table('networkdnsdomains',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add_bgp_dragent_model_data
Revision ID: b4caf27aae4
@ -25,9 +28,6 @@ Create Date: 2015-08-20 17:05:31.038704
revision = 'b4caf27aae4'
down_revision = '15be73214821'
from alembic import op
import sqlalchemy as sa
def upgrade():


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add ip_version to AddressScope
Revision ID: c3a73f615e4
@ -24,9 +27,6 @@ Create Date: 2015-10-08 17:34:32.231256
revision = 'c3a73f615e4'
down_revision = 'dce3ec7a25c9'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('address_scopes',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add router availability zone
Revision ID: dce3ec7a25c9
@ -24,9 +27,6 @@ Create Date: 2015-09-17 09:36:17.468901
revision = 'dce3ec7a25c9'
down_revision = 'ec7fcfbf72ee'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('router_extra_attributes',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add network availability zone
Revision ID: ec7fcfbf72ee
@ -24,9 +27,6 @@ Create Date: 2015-09-17 09:21:51.257579
revision = 'ec7fcfbf72ee'
down_revision = '32e5974ada25'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('networks',


+ 5
- 5
neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py View File

@ -13,6 +13,11 @@
# under the License.
#
from collections import defaultdict
from alembic import op
import sqlalchemy as sa
"""Add binding index to RouterL3AgentBinding
Revision ID: 2e0d7a8a1586
@ -25,11 +30,6 @@ Create Date: 2016-09-01 14:01:57.263289
revision = '2e0d7a8a1586'
down_revision = '97c25b0d2353'
from collections import defaultdict
from alembic import op
import sqlalchemy as sa
ROUTER_L3_AGENT_BINDING = 'routerl3agentbindings'


+ 6
- 5
neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py View File

@ -13,17 +13,18 @@
# under the License.
#
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
from neutron.common import constants as const
"""migrate to pluggable ipam """
# revision identifiers, used by Alembic.
revision = '3b935b28e7a0'
down_revision = 'a8b517cff8ab'
from alembic import op
from oslo_utils import uuidutils
import sqlalchemy as sa
from neutron.common import constants as const
# A simple models for tables with only the fields needed for the migration.
neutron_subnet = sa.Table('subnets', sa.MetaData(),


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py View File

@ -13,6 +13,8 @@
# under the License.
#
from alembic import op
"""Rename ml2_dvr_port_bindings
Revision ID: 4bcd4df1f426
@ -25,8 +27,6 @@ Create Date: 2016-06-02 14:06:04.112998
revision = '4bcd4df1f426'
down_revision = '8fd3918ef6f4'
from alembic import op
OLD_REFERRED_TABLE_NAME = 'ml2_dvr_port_bindings'
NEW_REFERRED_TABLE_NAME = 'ml2_distributed_port_bindings'


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py View File

@ -11,12 +11,12 @@
# under the License.
#
"""Remove availability ranges."""
from alembic import op
from neutron.db import migration
"""Remove availability ranges."""
revision = '5c85685d616d'
down_revision = '2e0d7a8a1586'


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
"""device_owner_ha_replicate_int
Revision ID: 7bbb25278f53
@ -25,10 +29,6 @@ Create Date: 2016-03-22 10:00:43.245503
revision = '7bbb25278f53'
down_revision = '4ffceebfcdc'
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
ROUTER_ATTR_TABLE = 'router_extra_attributes'
ROUTER_PORTS_TABLE = 'routerports'


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""rename tenant to project
Revision ID: 7d9d8eeec6ad
@ -25,9 +28,6 @@ revision = '7d9d8eeec6ad'
down_revision = 'a84ccf28f06a'
depends_on = ('5abc0278ca73',)
from alembic import op
import sqlalchemy as sa
_INSPECTOR = None


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py View File

@ -10,6 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from alembic import op
from sqlalchemy.engine import reflection
"""Rename ml2_network_segments table
Revision ID: 89ab9a816d70
@ -22,9 +25,6 @@ Create Date: 2016-03-22 00:22:47.618593
revision = '89ab9a816d70'
down_revision = '7bbb25278f53'
from alembic import op
from sqlalchemy.engine import reflection
TABLE_NAME = 'ml2_port_binding_levels'
OLD_REFERRED_TABLE_NAME = 'ml2_network_segments'


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add segment_host_mapping table.
Revision ID: 8fd3918ef6f4
@ -25,9 +28,6 @@ Create Date: 2016-02-25 00:22:47.618593
revision = '8fd3918ef6f4'
down_revision = 'c879c5e1ee90'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('segmenthostmappings',


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add Name and Description to the networksegments table """
# revision identifiers, used by Alembic.
@ -27,9 +30,6 @@ depends_on = ('89ab9a816d70',)
# refer <https://docs.openstack.org/neutron/latest/contributor/
# alembic_migrations.html#expand-and-contract-scripts>
from alembic import op
import sqlalchemy as sa
TBL = 'networksegments'
TBL_MODEL = sa.Table(TBL, sa.MetaData(),


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
"""migrate dns name from port"""
# revision identifiers, used by Alembic.
@ -20,10 +24,6 @@ revision = 'a84ccf28f06a'
down_revision = 'b67e765a3524'
depends_on = ('a963b38d82f4',)
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
ports = sa.Table(
'ports', sa.MetaData(),


+ 6
- 6
neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py View File

@ -10,6 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from alembic import op
from neutron_lib import constants as lib_const
import sqlalchemy as sa
from neutron.common import constants
"""Add routerport bindings for L3 HA
Revision ID: a8b517cff8ab
@ -22,12 +28,6 @@ Create Date: 2016-07-18 14:31:45.725516
revision = 'a8b517cff8ab'
down_revision = '7d9d8eeec6ad'
from alembic import op
from neutron_lib import constants as lib_const
import sqlalchemy as sa
from neutron.common import constants
HA_AGENT_BINDINGS = 'ha_router_agent_port_bindings'
ROUTER_PORTS = 'routerports'


+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add standardattr to qos policies
Revision ID: b12a3ef66e62
@ -25,9 +28,6 @@ revision = 'b12a3ef66e62'
down_revision = '3b935b28e7a0'
depends_on = ('67daae611b6e',)
from alembic import op
import sqlalchemy as sa
# basic model of the tables with required field for migration
TABLE = 'qos_policies'


+ 2
- 2
neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py View File

@ -11,6 +11,8 @@
# under the License.
#
from alembic import op
"""Remove mtu column from networks.
Revision ID: b67e765a3524
@ -23,8 +25,6 @@ Create Date: 2016-07-17 02:07:36.625196
revision = 'b67e765a3524'
down_revision = '4bcd4df1f426'
from alembic import op
def upgrade():
op.drop_column('networks', 'mtu')

+ 3
- 3
neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py View File

@ -13,15 +13,15 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add segment_id to subnet """
# revision identifiers, used by Alembic.
revision = 'c879c5e1ee90'
down_revision = '89ab9a816d70'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('subnets',


+ 6
- 6
neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
"""uniq_routerports0port_id
Revision ID: 030a959ceafa
@ -25,12 +31,6 @@ Create Date: 2016-06-21 11:33:13.043879
revision = '030a959ceafa'
down_revision = '3d0e74aa7d37'
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
routerports = sa.Table(
'routerports', sa.MetaData(),
sa.Column('router_id', sa.String(36)),


+ 4
- 4
neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa