summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Haley <bhaley@redhat.com>2018-04-12 16:30:07 -0400
committerBrian Haley <haleyb.dev@gmail.com>2018-04-20 18:13:07 +0000
commitde243a351302835c9138beb750ef9ef329178a61 (patch)
treebdf552d580216adf823d5c41d0beb7f76238a7f5
parentfc8511cd540d7a356c4a0ade2ac6277fe2854c0d (diff)
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
Notes
Notes (review): Code-Review+2: Ihar Hrachyshka <ihrachys@redhat.com> Code-Review+2: Slawek Kaplonski <skaplons@redhat.com> Workflow+1: Slawek Kaplonski <skaplons@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 25 Apr 2018 03:16:44 +0000 Reviewed-on: https://review.openstack.org/561039 Project: openstack/neutron Branch: refs/heads/master
-rw-r--r--neutron/db/migration/alembic_migrations/script.py.mako8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/kilo_initial.py23
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py10
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py5
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py9
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py11
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py11
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py11
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py10
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py11
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py5
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py7
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py4
-rw-r--r--neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py5
-rw-r--r--neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py14
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py12
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py8
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py11
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py6
-rw-r--r--neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py10
-rw-r--r--neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py14
-rw-r--r--neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py11
-rw-r--r--tox.ini3
82 files changed, 303 insertions, 310 deletions
diff --git a/neutron/db/migration/alembic_migrations/script.py.mako b/neutron/db/migration/alembic_migrations/script.py.mako
index 121181a..b568c22 100644
--- a/neutron/db/migration/alembic_migrations/script.py.mako
+++ b/neutron/db/migration/alembic_migrations/script.py.mako
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18${imports if imports else ""}
19
16"""${message} 20"""${message}
17 21
18Revision ID: ${up_revision} 22Revision ID: ${up_revision}
@@ -28,10 +32,6 @@ down_revision = ${repr(down_revision)}
28branch_labels = ${repr(branch_labels)} 32branch_labels = ${repr(branch_labels)}
29% endif 33% endif
30 34
31from alembic import op
32import sqlalchemy as sa
33${imports if imports else ""}
34
35 35
36def upgrade(): 36def upgrade():
37 ${upgrades if upgrades else "pass"} 37 ${upgrades if upgrades else "pass"}
diff --git a/neutron/db/migration/alembic_migrations/versions/kilo_initial.py b/neutron/db/migration/alembic_migrations/versions/kilo_initial.py
index 5bd9a95..f4290e3 100644
--- a/neutron/db/migration/alembic_migrations/versions/kilo_initial.py
+++ b/neutron/db/migration/alembic_migrations/versions/kilo_initial.py
@@ -13,18 +13,6 @@
13# under the License. 13# under the License.
14# 14#
15 15
16"""kilo_initial
17
18Revision ID: kilo
19Revises: None
20
21"""
22
23# revision identifiers, used by Alembic.
24revision = 'kilo'
25down_revision = None
26
27
28from neutron.db import migration 16from neutron.db import migration
29from neutron.db.migration.alembic_migrations import agent_init_ops 17from neutron.db.migration.alembic_migrations import agent_init_ops
30from neutron.db.migration.alembic_migrations import brocade_init_ops 18from neutron.db.migration.alembic_migrations import brocade_init_ops
@@ -48,6 +36,17 @@ from neutron.db.migration.alembic_migrations import secgroup_init_ops
48from neutron.db.migration.alembic_migrations import vmware_init_ops 36from neutron.db.migration.alembic_migrations import vmware_init_ops
49from neutron.db.migration.alembic_migrations import vpn_init_ops 37from neutron.db.migration.alembic_migrations import vpn_init_ops
50 38
39"""kilo_initial
40
41Revision ID: kilo
42Revises: None
43
44"""
45
46# revision identifiers, used by Alembic.
47revision = 'kilo'
48down_revision = None
49
51 50
52def upgrade(): 51def upgrade():
53 migration.pk_on_alembic_version_table() 52 migration.pk_on_alembic_version_table()
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py
index 39ef3ba..761bd48 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/11926bcfe72d_add_geneve_ml2_type_driver.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add geneve ml2 type driver 19"""add geneve ml2 type driver
17 20
18Revision ID: 11926bcfe72d 21Revision ID: 11926bcfe72d
@@ -25,9 +28,6 @@ Create Date: 2015-08-27 19:56:16.356522
25revision = '11926bcfe72d' 28revision = '11926bcfe72d'
26down_revision = '2e5352a0ad4d' 29down_revision = '2e5352a0ad4d'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def contract_creation_exceptions(): 32def contract_creation_exceptions():
33 """These elements were created by mistake in the contract branch.""" 33 """These elements were created by mistake in the contract branch."""
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py
index 802ad7a..2b424f6 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/2a16083502f3_metaplugin_removal.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
16"""Metaplugin removal 18"""Metaplugin removal
17 19
18Revision ID: 2a16083502f3 20Revision ID: 2a16083502f3
@@ -25,8 +27,6 @@ Create Date: 2015-06-16 09:11:10.488566
25revision = '2a16083502f3' 27revision = '2a16083502f3'
26down_revision = '5498d17be016' 28down_revision = '5498d17be016'
27 29
28from alembic import op
29
30 30
31def upgrade(): 31def upgrade():
32 op.drop_table('networkflavors') 32 op.drop_table('networkflavors')
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py
index 4961514..b02d520 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/2e5352a0ad4d_add_missing_foreign_keys.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from sqlalchemy.engine import reflection
18
19from neutron.db import migration
20
16"""Add missing foreign keys 21"""Add missing foreign keys
17 22
18Revision ID: 2e5352a0ad4d 23Revision ID: 2e5352a0ad4d
@@ -25,11 +30,6 @@ Create Date: 2015-08-20 12:43:09.110427
25revision = '2e5352a0ad4d' 30revision = '2e5352a0ad4d'
26down_revision = '2a16083502f3' 31down_revision = '2a16083502f3'
27 32
28from alembic import op
29from sqlalchemy.engine import reflection
30
31from neutron.db import migration
32
33 33
34TABLE_NAME = 'flavorserviceprofilebindings' 34TABLE_NAME = 'flavorserviceprofilebindings'
35 35
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py
index 0e6358f..6b813d0 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/30018084ec99_initial.py
@@ -11,6 +11,8 @@
11# under the License. 11# under the License.
12# 12#
13 13
14from neutron.db.migration import cli
15
14"""Initial no-op Liberty contract rule. 16"""Initial no-op Liberty contract rule.
15 17
16Revision ID: 30018084ec99 18Revision ID: 30018084ec99
@@ -19,9 +21,6 @@ Create Date: 2015-06-22 00:00:00.000000
19 21
20""" 22"""
21 23
22from neutron.db.migration import cli
23
24
25# revision identifiers, used by Alembic. 24# revision identifiers, used by Alembic.
26revision = '30018084ec99' 25revision = '30018084ec99'
27down_revision = 'kilo' 26down_revision = 'kilo'
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py
index 7a91b79..bb667ac 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/4af11ca47297_drop_cisco_monolithic_tables.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
18from neutron.db import migration
19
16"""Drop cisco monolithic tables 20"""Drop cisco monolithic tables
17 21
18Revision ID: 4af11ca47297 22Revision ID: 4af11ca47297
@@ -21,11 +25,6 @@ Create Date: 2015-08-13 08:01:19.709839
21 25
22""" 26"""
23 27
24from alembic import op
25
26from neutron.db import migration
27
28
29# revision identifiers, used by Alembic. 28# revision identifiers, used by Alembic.
30revision = '4af11ca47297' 29revision = '4af11ca47297'
31down_revision = '11926bcfe72d' 30down_revision = '11926bcfe72d'
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
index 76926fa..aa09735 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/4ffceebfada_rbac_network.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from oslo_utils import uuidutils
18import sqlalchemy as sa
19
16"""network_rbac 20"""network_rbac
17 21
18Revision ID: 4ffceebfada 22Revision ID: 4ffceebfada
@@ -26,10 +30,6 @@ revision = '4ffceebfada'
26down_revision = '30018084ec99' 30down_revision = '30018084ec99'
27depends_on = ('8675309a5c4f',) 31depends_on = ('8675309a5c4f',)
28 32
29from alembic import op
30from oslo_utils import uuidutils
31import sqlalchemy as sa
32
33 33
34# A simple model of the networks table with only the fields needed for 34# A simple model of the networks table with only the fields needed for
35# the migration. 35# the migration.
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py b/neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py
index 55ad8d1..623bb64 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/contract/5498d17be016_drop_legacy_ovs_and_lb.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
16"""Drop legacy OVS and LB plugin tables 18"""Drop legacy OVS and LB plugin tables
17 19
18Revision ID: 5498d17be016 20Revision ID: 5498d17be016
@@ -25,8 +27,6 @@ Create Date: 2015-06-25 14:08:30.984419
25revision = '5498d17be016' 27revision = '5498d17be016'
26down_revision = '4ffceebfada' 28down_revision = '4ffceebfada'
27 29
28from alembic import op
29
30 30
31def upgrade(): 31def upgrade():
32 op.drop_table('ovs_network_bindings') 32 op.drop_table('ovs_network_bindings')
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py
index f1ffdaf..e3a2159 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/1b4c6e320f79_address_scope_support_in_subnetpool.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""address scope support in subnetpool 19"""address scope support in subnetpool
17 20
18Revision ID: 1b4c6e320f79 21Revision ID: 1b4c6e320f79
@@ -25,9 +28,6 @@ Create Date: 2015-07-03 09:48:39.491058
25revision = '1b4c6e320f79' 28revision = '1b4c6e320f79'
26down_revision = '1c844d1677f7' 29down_revision = '1c844d1677f7'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.add_column('subnetpools', 33 op.add_column('subnetpools',
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py
index e1781ed..e7a922c 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/1c844d1677f7_dns_nameservers_order.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add order to dnsnameservers 19"""add order to dnsnameservers
17 20
18Revision ID: 1c844d1677f7 21Revision ID: 1c844d1677f7
@@ -25,9 +28,6 @@ Create Date: 2015-07-21 22:59:03.383850
25revision = '1c844d1677f7' 28revision = '1c844d1677f7'
26down_revision = '26c371498592' 29down_revision = '26c371498592'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.add_column('dnsnameservers', 33 op.add_column('dnsnameservers',
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py
index 5bff7c8..9a806eb 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/26c371498592_subnetpool_hash.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""subnetpool hash 19"""subnetpool hash
17 20
18Revision ID: 26c371498592 21Revision ID: 26c371498592
@@ -25,9 +28,6 @@ Create Date: 2015-06-02 21:18:19.942076
25revision = '26c371498592' 28revision = '26c371498592'
26down_revision = '45f955889773' 29down_revision = '45f955889773'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.add_column( 33 op.add_column(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py
index 4ac5ac8..aea3ab6 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/31337ec0ffee_flavors.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Flavor framework 19"""Flavor framework
17 20
18Revision ID: 313373c0ffee 21Revision ID: 313373c0ffee
@@ -24,9 +27,6 @@ Create Date: 2014-07-17 03:00:00.00
24revision = '313373c0ffee' 27revision = '313373c0ffee'
25down_revision = '52c5312f6baf' 28down_revision = '52c5312f6baf'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.create_table( 32 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py
index f9aa942..0018468 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/34af2b5c5a59_add_dns_name_to_port.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib.db import constants
18import sqlalchemy as sa
19
20from neutron.db import migration
21
16"""Add dns_name to Port 22"""Add dns_name to Port
17 23
18Revision ID: 34af2b5c5a59 24Revision ID: 34af2b5c5a59
@@ -21,12 +27,6 @@ Create Date: 2015-08-23 00:22:47.618593
21 27
22""" 28"""
23 29
24from alembic import op
25from neutron_lib.db import constants
26import sqlalchemy as sa
27
28from neutron.db import migration
29
30# revision identifiers, used by Alembic. 30# revision identifiers, used by Alembic.
31revision = '34af2b5c5a59' 31revision = '34af2b5c5a59'
32down_revision = '9859ac9c136' 32down_revision = '9859ac9c136'
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py
index e63b3f5..3b0361b 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/354db87e3225_nsxv_vdr_metadata.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
19from neutron.db.migration import cli
20
16"""nsxv_vdr_metadata.py 21"""nsxv_vdr_metadata.py
17 22
18Revision ID: 354db87e3225 23Revision ID: 354db87e3225
@@ -21,12 +26,6 @@ Create Date: 2015-04-19 14:59:15.102609
21 26
22""" 27"""
23 28
24from alembic import op
25import sqlalchemy as sa
26
27from neutron.db.migration import cli
28
29
30# revision identifiers, used by Alembic. 29# revision identifiers, used by Alembic.
31revision = '354db87e3225' 30revision = '354db87e3225'
32down_revision = 'kilo' 31down_revision = 'kilo'
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py
index e10edc9..349353b 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/45f955889773_quota_usage.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18from sqlalchemy import sql
19
16"""quota_usage 20"""quota_usage
17 21
18Revision ID: 45f955889773 22Revision ID: 45f955889773
@@ -25,10 +29,6 @@ Create Date: 2015-04-17 08:09:37.611546
25revision = '45f955889773' 29revision = '45f955889773'
26down_revision = '8675309a5c4f' 30down_revision = '8675309a5c4f'
27 31
28from alembic import op
29import sqlalchemy as sa
30from sqlalchemy import sql
31
32 32
33def upgrade(): 33def upgrade():
34 op.create_table( 34 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py
index 0fc9665..4a88aa9 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/48153cb5f051_qos_db_changes.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""qos db changes 19"""qos db changes
17 20
18Revision ID: 48153cb5f051 21Revision ID: 48153cb5f051
@@ -25,9 +28,6 @@ Create Date: 2015-06-24 17:03:34.965101
25revision = '48153cb5f051' 28revision = '48153cb5f051'
26down_revision = '1b4c6e320f79' 29down_revision = '1b4c6e320f79'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table( 33 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py
index 9fa1466..dd7b20a 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/52c5312f6baf_address_scopes.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Initial operations in support of address scopes 19"""Initial operations in support of address scopes
17 20
18""" 21"""
@@ -21,9 +24,6 @@
21revision = '52c5312f6baf' 24revision = '52c5312f6baf'
22down_revision = '599c6a226151' 25down_revision = '599c6a226151'
23 26
24from alembic import op
25import sqlalchemy as sa
26
27 27
28def upgrade(): 28def upgrade():
29 op.create_table( 29 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py
index cea591d..995cb47 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/599c6a226151_neutrodb_ipam.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""neutrodb_ipam 19"""neutrodb_ipam
17 20
18Revision ID: 599c6a226151 21Revision ID: 599c6a226151
@@ -25,9 +28,6 @@ Create Date: 2015-03-08 18:12:08.962378
25revision = '599c6a226151' 28revision = '599c6a226151'
26down_revision = '354db87e3225' 29down_revision = '354db87e3225'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table( 33 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py
index b2c7156..49f50e6 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/8675309a5c4f_rbac_network.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""network_rbac 19"""network_rbac
17 20
18Revision ID: 8675309a5c4f 21Revision ID: 8675309a5c4f
@@ -25,9 +28,6 @@ Create Date: 2015-06-14 13:12:04.012457
25revision = '8675309a5c4f' 28revision = '8675309a5c4f'
26down_revision = '313373c0ffee' 29down_revision = '313373c0ffee'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table( 33 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py b/neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py
index c8935a8..b9625ad 100644
--- a/neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py
+++ b/neutron/db/migration/alembic_migrations/versions/liberty/expand/9859ac9c136_quota_reservations.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""quota_reservations 19"""quota_reservations
17 20
18Revision ID: 9859ac9c136 21Revision ID: 9859ac9c136
@@ -25,9 +28,6 @@ Create Date: 2015-03-11 06:40:56.775075
25revision = '9859ac9c136' 28revision = '9859ac9c136'
26down_revision = '48153cb5f051' 29down_revision = '48153cb5f051'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table( 33 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py
index 68e6d25..01c90ae 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/1b294093239c_remove_embrane_plugin.py
@@ -11,6 +11,8 @@
11# under the License. 11# under the License.
12# 12#
13 13
14from alembic import op
15
14"""Drop embrane plugin table 16"""Drop embrane plugin table
15 17
16Revision ID: 1b294093239c 18Revision ID: 1b294093239c
@@ -23,8 +25,6 @@ Create Date: 2015-10-09 14:07:59.968597
23revision = '1b294093239c' 25revision = '1b294093239c'
24down_revision = '4af11ca47297' 26down_revision = '4af11ca47297'
25 27
26from alembic import op
27
28 28
29def upgrade(): 29def upgrade():
30 op.drop_table('embrane_pool_port') 30 op.drop_table('embrane_pool_port')
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py
index 0093bf9..a99c567 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/2b4c2465d44b_dvr_sheduling_refactoring.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""DVR sheduling refactoring 19"""DVR sheduling refactoring
17 20
18Revision ID: 2b4c2465d44b 21Revision ID: 2b4c2465d44b
@@ -25,9 +28,6 @@ Create Date: 2015-12-23 07:39:49.062767
25revision = '2b4c2465d44b' 28revision = '2b4c2465d44b'
26down_revision = '8a6d8bdae39' 29down_revision = '8a6d8bdae39'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32ROUTER_ATTR_TABLE = 'router_extra_attributes' 32ROUTER_ATTR_TABLE = 'router_extra_attributes'
33ROUTER_BINDING_TABLE = 'routerl3agentbindings' 33ROUTER_BINDING_TABLE = 'routerl3agentbindings'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py
index 43a0c06..e6e693c 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/4ffceebfcdc_standard_desc.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
19from neutron.db import migration
20
16"""standard_desc 21"""standard_desc
17 22
18Revision ID: 4ffceebfcdc 23Revision ID: 4ffceebfcdc
@@ -21,12 +26,6 @@ Create Date: 2016-02-10 23:12:04.012457
21 26
22""" 27"""
23 28
24from alembic import op
25import sqlalchemy as sa
26
27from neutron.db import migration
28
29
30# revision identifiers, used by Alembic. 29# revision identifiers, used by Alembic.
31revision = '4ffceebfcdc' 30revision = '4ffceebfcdc'
32down_revision = '5ffceebfada' 31down_revision = '5ffceebfada'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py
index 5b037e2..ee06062 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/5ffceebfada_rbac_network_external.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from oslo_utils import uuidutils
18import sqlalchemy as sa
19
16"""network_rbac_external 20"""network_rbac_external
17 21
18Revision ID: 5ffceebfada 22Revision ID: 5ffceebfada
@@ -26,10 +30,6 @@ revision = '5ffceebfada'
26down_revision = 'c6c112992c9' 30down_revision = 'c6c112992c9'
27depends_on = () 31depends_on = ()
28 32
29from alembic import op
30from oslo_utils import uuidutils
31import sqlalchemy as sa
32
33 33
34# A simple model of the external network table with only the fields needed for 34# A simple model of the external network table with only the fields needed for
35# the migration. 35# the migration.
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py
index 38e4bc4..b42d669 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/8a6d8bdae39_migrate_neutron_resources_table.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""standardattributes migration 18"""standardattributes migration
16 19
17Revision ID: 8a6d8bdae39 20Revision ID: 8a6d8bdae39
@@ -25,9 +28,6 @@ revision = '8a6d8bdae39'
25down_revision = '1b294093239c' 28down_revision = '1b294093239c'
26depends_on = ('32e5974ada25',) 29depends_on = ('32e5974ada25',)
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32# basic model of the tables with required field for migration 32# basic model of the tables with required field for migration
33TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups', 33TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py
index 92624a3..81053c6 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/c6c112992c9_rbac_qos_policy.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from oslo_utils import uuidutils
18import sqlalchemy as sa
19
20from neutron.db import rbac_db_models
21
16"""rbac_qos_policy 22"""rbac_qos_policy
17 23
18Revision ID: c6c112992c9 24Revision ID: c6c112992c9
@@ -21,12 +27,6 @@ Create Date: 2015-11-25 18:45:03.831359
21 27
22""" 28"""
23 29
24from alembic import op
25from oslo_utils import uuidutils
26import sqlalchemy as sa
27
28from neutron.db import rbac_db_models
29
30# revision identifiers, used by Alembic. 30# revision identifiers, used by Alembic.
31 31
32revision = 'c6c112992c9' 32revision = 'c6c112992c9'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py
index ca1c135..ea5b5c0 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/contract/e3278ee65050_drop_nec_plugin_tables.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
16"""Drop NEC plugin tables 18"""Drop NEC plugin tables
17 19
18Revision ID: e3278ee65050 20Revision ID: e3278ee65050
@@ -25,8 +27,6 @@ Create Date: 2016-02-15 18:50:56.870043
25revision = 'e3278ee65050' 27revision = 'e3278ee65050'
26down_revision = '2b4c2465d44b' 28down_revision = '2b4c2465d44b'
27 29
28from alembic import op
29
30 30
31def upgrade(): 31def upgrade():
32 op.drop_table('ofcnetworkmappings') 32 op.drop_table('ofcnetworkmappings')
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py
index 6a88120..c4b5be7 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/0e66c5227a8a_add_desc_to_standard_attr.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
19from neutron.db import migration
20
16"""Add desc to standard attr table 21"""Add desc to standard attr table
17 22
18Revision ID: 0e66c5227a8a 23Revision ID: 0e66c5227a8a
@@ -21,12 +26,6 @@ Create Date: 2016-02-02 10:50:34.238563
21 26
22""" 27"""
23 28
24from alembic import op
25import sqlalchemy as sa
26
27from neutron.db import migration
28
29
30# revision identifiers, used by Alembic. 29# revision identifiers, used by Alembic.
31revision = '0e66c5227a8a' 30revision = '0e66c5227a8a'
32down_revision = '3894bccad37f' 31down_revision = '3894bccad37f'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py
index 48c198e..941ba32 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/13cfb89f881a_add_is_default_to_subnetpool.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18from sqlalchemy import sql
19
16"""add is_default to subnetpool 20"""add is_default to subnetpool
17 21
18Revision ID: 13cfb89f881a 22Revision ID: 13cfb89f881a
@@ -25,10 +29,6 @@ Create Date: 2015-09-30 15:58:31.170153
25revision = '13cfb89f881a' 29revision = '13cfb89f881a'
26down_revision = '59cb5b6cf4d' 30down_revision = '59cb5b6cf4d'
27 31
28from alembic import op
29import sqlalchemy as sa
30from sqlalchemy import sql
31
32 32
33def upgrade(): 33def upgrade():
34 op.add_column('subnetpools', 34 op.add_column('subnetpools',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py
index 3525731..eedd9db 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15be73214821_add_bgp_model_data.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add dynamic routing model data 19"""add dynamic routing model data
17 20
18Revision ID: 15be73214821 21Revision ID: 15be73214821
@@ -24,9 +27,6 @@ Create Date: 2015-07-29 13:16:08.604175
24revision = '15be73214821' 27revision = '15be73214821'
25down_revision = '19f26505c74f' 28down_revision = '19f26505c74f'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 32
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py
index 5f5052c..e213bc5 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/15e43b934f81_rbac_qos_policy.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""rbac_qos_policy 19"""rbac_qos_policy
17 20
18Revision ID: 15e43b934f81 21Revision ID: 15e43b934f81
@@ -21,9 +24,6 @@ Create Date: 2015-11-25 18:45:03.819115
21 24
22""" 25"""
23 26
24from alembic import op
25import sqlalchemy as sa
26
27# revision identifiers, used by Alembic. 27# revision identifiers, used by Alembic.
28revision = '15e43b934f81' 28revision = '15e43b934f81'
29down_revision = 'b4caf27aae4' 29down_revision = 'b4caf27aae4'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py
index 3fb9635..d9b056c 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/19f26505c74f_auto_allocated_topology.py
@@ -14,6 +14,10 @@
14# under the License. 14# under the License.
15# 15#
16 16
17from alembic import op
18import sqlalchemy as sa
19from sqlalchemy import sql
20
17""" Auto Allocated Topology - aka Get-Me-A-Network 21""" Auto Allocated Topology - aka Get-Me-A-Network
18 22
19Revision ID: 19f26505c74f 23Revision ID: 19f26505c74f
@@ -22,10 +26,6 @@ Create Date: 2015-11-20 11:27:53.419742
22 26
23""" 27"""
24 28
25from alembic import op
26import sqlalchemy as sa
27from sqlalchemy import sql
28
29# revision identifiers, used by Alembic. 29# revision identifiers, used by Alembic.
30revision = '19f26505c74f' 30revision = '19f26505c74f'
31down_revision = '1df244e556f5' 31down_revision = '1df244e556f5'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py
index c636fcf..1fe3ee6 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/1df244e556f5_add_unique_ha_router_agent_port_bindings.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import exceptions
18import sqlalchemy as sa
19
20from neutron._i18n import _
21
16"""add_unique_ha_router_agent_port_bindings 22"""add_unique_ha_router_agent_port_bindings
17 23
18Revision ID: 1df244e556f5 24Revision ID: 1df244e556f5
@@ -25,12 +31,6 @@ Create Date: 2015-10-02 18:06:01.696742
25revision = '1df244e556f5' 31revision = '1df244e556f5'
26down_revision = '659bf3d90664' 32down_revision = '659bf3d90664'
27 33
28from alembic import op
29from neutron_lib import exceptions
30import sqlalchemy as sa
31
32from neutron._i18n import _
33
34 34
35UNIQUE_NAME = 'uniq_ha_router_agent_port_bindings0port_id0l3_agent_id' 35UNIQUE_NAME = 'uniq_ha_router_agent_port_bindings0port_id0l3_agent_id'
36TABLE_NAME = 'ha_router_agent_port_bindings' 36TABLE_NAME = 'ha_router_agent_port_bindings'
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py
index 820c621..8e40172 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/2f9e956e7532_tag_support.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""tag support 18"""tag support
16 19
17Revision ID: 2f9e956e7532 20Revision ID: 2f9e956e7532
@@ -24,9 +27,6 @@ Create Date: 2016-01-21 08:11:49.604182
24revision = '2f9e956e7532' 27revision = '2f9e956e7532'
25down_revision = '31ed664953e6' 28down_revision = '31ed664953e6'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.create_table( 32 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py
index 1463948..6be7543 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add resource_versions row to agent table 19"""Add resource_versions row to agent table
17 20
18Revision ID: 31ed664953e6 21Revision ID: 31ed664953e6
@@ -25,9 +28,6 @@ Create Date: 2016-01-15 13:41:30.016915
25revision = '31ed664953e6' 28revision = '31ed664953e6'
26down_revision = '15e43b934f81' 29down_revision = '15e43b934f81'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.add_column('agents', 33 op.add_column('agents',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py
index 39e2104..bc4851c 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/32e5974ada25_add_neutron_resources_table.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""Add standard attribute table 18"""Add standard attribute table
16 19
17Revision ID: 32e5974ada25 20Revision ID: 32e5974ada25
@@ -24,9 +27,6 @@ Create Date: 2015-09-10 00:22:47.618593
24revision = '32e5974ada25' 27revision = '32e5974ada25'
25down_revision = '13cfb89f881a' 28down_revision = '13cfb89f881a'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups', 31TABLES = ('ports', 'networks', 'subnets', 'subnetpools', 'securitygroups',
32 'floatingips', 'routers', 'securitygrouprules') 32 'floatingips', 'routers', 'securitygrouprules')
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py
index ca52ba0..7ff8fbb 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/3894bccad37f_add_timestamp_to_base_resources.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add_timestamp_to_base_resources 19"""add_timestamp_to_base_resources
17 20
18Revision ID: 3894bccad37f 21Revision ID: 3894bccad37f
@@ -25,9 +28,6 @@ Create Date: 2016-03-01 04:19:58.852612
25revision = '3894bccad37f' 28revision = '3894bccad37f'
26down_revision = '2f9e956e7532' 29down_revision = '2f9e956e7532'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 for column_name in ['created_at', 'updated_at']: 33 for column_name in ['created_at', 'updated_at']:
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py
index d2c5482..faf531b 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/59cb5b6cf4d_availability_zone.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""Add availability zone 18"""Add availability zone
16 19
17Revision ID: 59cb5b6cf4d 20Revision ID: 59cb5b6cf4d
@@ -24,9 +27,6 @@ Create Date: 2015-01-20 14:38:47.156574
24revision = '59cb5b6cf4d' 27revision = '59cb5b6cf4d'
25down_revision = '34af2b5c5a59' 28down_revision = '34af2b5c5a59'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.add_column('agents', 32 op.add_column('agents',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py
index 4889935..8565fbc4 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/659bf3d90664_add_attributes_to_support_external_dns_integration.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib.db import constants
18import sqlalchemy as sa
19
16"""Add tables and attributes to support external DNS integration 20"""Add tables and attributes to support external DNS integration
17 21
18Revision ID: 659bf3d90664 22Revision ID: 659bf3d90664
@@ -25,10 +29,6 @@ Create Date: 2015-09-11 00:22:47.618593
25revision = '659bf3d90664' 29revision = '659bf3d90664'
26down_revision = 'c3a73f615e4' 30down_revision = 'c3a73f615e4'
27 31
28from alembic import op
29from neutron_lib.db import constants
30import sqlalchemy as sa
31
32 32
33def upgrade(): 33def upgrade():
34 op.create_table('networkdnsdomains', 34 op.create_table('networkdnsdomains',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py
index 0959b52..d579016 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/b4caf27aae4_add_bgp_dragent_model_data.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add_bgp_dragent_model_data 19"""add_bgp_dragent_model_data
17 20
18Revision ID: b4caf27aae4 21Revision ID: b4caf27aae4
@@ -25,9 +28,6 @@ Create Date: 2015-08-20 17:05:31.038704
25revision = 'b4caf27aae4' 28revision = 'b4caf27aae4'
26down_revision = '15be73214821' 29down_revision = '15be73214821'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 33
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py
index e039f70..0f2df57 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/c3a73f615e4_add_ip_version_to_address_scope.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""Add ip_version to AddressScope 18"""Add ip_version to AddressScope
16 19
17Revision ID: c3a73f615e4 20Revision ID: c3a73f615e4
@@ -24,9 +27,6 @@ Create Date: 2015-10-08 17:34:32.231256
24revision = 'c3a73f615e4' 27revision = 'c3a73f615e4'
25down_revision = 'dce3ec7a25c9' 28down_revision = 'dce3ec7a25c9'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.add_column('address_scopes', 32 op.add_column('address_scopes',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py
index 62af98a..50624eb 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/dce3ec7a25c9_router_az.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""Add router availability zone 18"""Add router availability zone
16 19
17Revision ID: dce3ec7a25c9 20Revision ID: dce3ec7a25c9
@@ -24,9 +27,6 @@ Create Date: 2015-09-17 09:36:17.468901
24revision = 'dce3ec7a25c9' 27revision = 'dce3ec7a25c9'
25down_revision = 'ec7fcfbf72ee' 28down_revision = 'ec7fcfbf72ee'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.add_column('router_extra_attributes', 32 op.add_column('router_extra_attributes',
diff --git a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py
index e6582d4..d060440 100644
--- a/neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py
+++ b/neutron/db/migration/alembic_migrations/versions/mitaka/expand/ec7fcfbf72ee_network_az.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""Add network availability zone 18"""Add network availability zone
16 19
17Revision ID: ec7fcfbf72ee 20Revision ID: ec7fcfbf72ee
@@ -24,9 +27,6 @@ Create Date: 2015-09-17 09:21:51.257579
24revision = 'ec7fcfbf72ee' 27revision = 'ec7fcfbf72ee'
25down_revision = '32e5974ada25' 28down_revision = '32e5974ada25'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.add_column('networks', 32 op.add_column('networks',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py
index 16961cd..2fb6fb6 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/2e0d7a8a1586_add_binding_index_to_routerl3agentbinding.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from collections import defaultdict
17
18from alembic import op
19import sqlalchemy as sa
20
16"""Add binding index to RouterL3AgentBinding 21"""Add binding index to RouterL3AgentBinding
17 22
18Revision ID: 2e0d7a8a1586 23Revision ID: 2e0d7a8a1586
@@ -25,11 +30,6 @@ Create Date: 2016-09-01 14:01:57.263289
25revision = '2e0d7a8a1586' 30revision = '2e0d7a8a1586'
26down_revision = '97c25b0d2353' 31down_revision = '97c25b0d2353'
27 32
28from collections import defaultdict
29
30from alembic import op
31import sqlalchemy as sa
32
33 33
34ROUTER_L3_AGENT_BINDING = 'routerl3agentbindings' 34ROUTER_L3_AGENT_BINDING = 'routerl3agentbindings'
35 35
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py
index 512d3ac..03dd64b 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/3b935b28e7a0_migrate_to_pluggable_ipam.py
@@ -13,17 +13,18 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from oslo_utils import uuidutils
18import sqlalchemy as sa
19
20from neutron.common import constants as const
21
16"""migrate to pluggable ipam """ 22"""migrate to pluggable ipam """
17 23
18# revision identifiers, used by Alembic. 24# revision identifiers, used by Alembic.
19revision = '3b935b28e7a0' 25revision = '3b935b28e7a0'
20down_revision = 'a8b517cff8ab' 26down_revision = 'a8b517cff8ab'
21 27
22from alembic import op
23from oslo_utils import uuidutils
24import sqlalchemy as sa
25
26from neutron.common import constants as const
27 28
28# A simple models for tables with only the fields needed for the migration. 29# A simple models for tables with only the fields needed for the migration.
29neutron_subnet = sa.Table('subnets', sa.MetaData(), 30neutron_subnet = sa.Table('subnets', sa.MetaData(),
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py
index 7e46588..97fc624 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/4bcd4df1f426_rename_ml2_dvr_port_bindings.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
16"""Rename ml2_dvr_port_bindings 18"""Rename ml2_dvr_port_bindings
17 19
18Revision ID: 4bcd4df1f426 20Revision ID: 4bcd4df1f426
@@ -25,8 +27,6 @@ Create Date: 2016-06-02 14:06:04.112998
25revision = '4bcd4df1f426' 27revision = '4bcd4df1f426'
26down_revision = '8fd3918ef6f4' 28down_revision = '8fd3918ef6f4'
27 29
28from alembic import op
29
30 30
31OLD_REFERRED_TABLE_NAME = 'ml2_dvr_port_bindings' 31OLD_REFERRED_TABLE_NAME = 'ml2_dvr_port_bindings'
32NEW_REFERRED_TABLE_NAME = 'ml2_distributed_port_bindings' 32NEW_REFERRED_TABLE_NAME = 'ml2_distributed_port_bindings'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py
index 9f8c1a4..e47f1c1 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/5c85685d616d_remove_availability_ranges.py
@@ -11,12 +11,12 @@
11# under the License. 11# under the License.
12# 12#
13 13
14"""Remove availability ranges."""
15
16from alembic import op 14from alembic import op
17 15
18from neutron.db import migration 16from neutron.db import migration
19 17
18"""Remove availability ranges."""
19
20 20
21revision = '5c85685d616d' 21revision = '5c85685d616d'
22down_revision = '2e0d7a8a1586' 22down_revision = '2e0d7a8a1586'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py
index 0b35706..09a8cee 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/7bbb25278f53_device_owner_ha_replicate_int.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import constants
18import sqlalchemy as sa
19
16"""device_owner_ha_replicate_int 20"""device_owner_ha_replicate_int
17 21
18Revision ID: 7bbb25278f53 22Revision ID: 7bbb25278f53
@@ -25,10 +29,6 @@ Create Date: 2016-03-22 10:00:43.245503
25revision = '7bbb25278f53' 29revision = '7bbb25278f53'
26down_revision = '4ffceebfcdc' 30down_revision = '4ffceebfcdc'
27 31
28from alembic import op
29from neutron_lib import constants
30import sqlalchemy as sa
31
32 32
33ROUTER_ATTR_TABLE = 'router_extra_attributes' 33ROUTER_ATTR_TABLE = 'router_extra_attributes'
34ROUTER_PORTS_TABLE = 'routerports' 34ROUTER_PORTS_TABLE = 'routerports'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py
index 298fa25..c6f7bd6 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/7d9d8eeec6ad_rename_tenant_to_project.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""rename tenant to project 19"""rename tenant to project
17 20
18Revision ID: 7d9d8eeec6ad 21Revision ID: 7d9d8eeec6ad
@@ -25,9 +28,6 @@ revision = '7d9d8eeec6ad'
25down_revision = 'a84ccf28f06a' 28down_revision = 'a84ccf28f06a'
26depends_on = ('5abc0278ca73',) 29depends_on = ('5abc0278ca73',)
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32_INSPECTOR = None 32_INSPECTOR = None
33 33
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py
index cb82d65..e7c0d3c 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/89ab9a816d70_rename_ml2_network_segments.py
@@ -10,6 +10,9 @@
10# License for the specific language governing permissions and limitations 10# License for the specific language governing permissions and limitations
11# under the License. 11# under the License.
12 12
13from alembic import op
14from sqlalchemy.engine import reflection
15
13"""Rename ml2_network_segments table 16"""Rename ml2_network_segments table
14 17
15Revision ID: 89ab9a816d70 18Revision ID: 89ab9a816d70
@@ -22,9 +25,6 @@ Create Date: 2016-03-22 00:22:47.618593
22revision = '89ab9a816d70' 25revision = '89ab9a816d70'
23down_revision = '7bbb25278f53' 26down_revision = '7bbb25278f53'
24 27
25from alembic import op
26from sqlalchemy.engine import reflection
27
28 28
29TABLE_NAME = 'ml2_port_binding_levels' 29TABLE_NAME = 'ml2_port_binding_levels'
30OLD_REFERRED_TABLE_NAME = 'ml2_network_segments' 30OLD_REFERRED_TABLE_NAME = 'ml2_network_segments'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py
index f0c28a2..9b61f40 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/8fd3918ef6f4_add_segment_host_mapping.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add segment_host_mapping table. 19"""Add segment_host_mapping table.
17 20
18Revision ID: 8fd3918ef6f4 21Revision ID: 8fd3918ef6f4
@@ -25,9 +28,6 @@ Create Date: 2016-02-25 00:22:47.618593
25revision = '8fd3918ef6f4' 28revision = '8fd3918ef6f4'
26down_revision = 'c879c5e1ee90' 29down_revision = 'c879c5e1ee90'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table('segmenthostmappings', 33 op.create_table('segmenthostmappings',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py
index adf0a49..bbaf574 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/97c25b0d2353_add_name_desc.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add Name and Description to the networksegments table """ 19"""Add Name and Description to the networksegments table """
17 20
18# revision identifiers, used by Alembic. 21# revision identifiers, used by Alembic.
@@ -27,9 +30,6 @@ depends_on = ('89ab9a816d70',)
27# refer <https://docs.openstack.org/neutron/latest/contributor/ 30# refer <https://docs.openstack.org/neutron/latest/contributor/
28# alembic_migrations.html#expand-and-contract-scripts> 31# alembic_migrations.html#expand-and-contract-scripts>
29 32
30from alembic import op
31import sqlalchemy as sa
32
33TBL = 'networksegments' 33TBL = 'networksegments'
34 34
35TBL_MODEL = sa.Table(TBL, sa.MetaData(), 35TBL_MODEL = sa.Table(TBL, sa.MetaData(),
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py
index df6adf4..4fddbff 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/a84ccf28f06a_migrate_dns_name_from_port.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib.db import constants
18import sqlalchemy as sa
19
16"""migrate dns name from port""" 20"""migrate dns name from port"""
17 21
18# revision identifiers, used by Alembic. 22# revision identifiers, used by Alembic.
@@ -20,10 +24,6 @@ revision = 'a84ccf28f06a'
20down_revision = 'b67e765a3524' 24down_revision = 'b67e765a3524'
21depends_on = ('a963b38d82f4',) 25depends_on = ('a963b38d82f4',)
22 26
23from alembic import op
24from neutron_lib.db import constants
25import sqlalchemy as sa
26
27 27
28ports = sa.Table( 28ports = sa.Table(
29 'ports', sa.MetaData(), 29 'ports', sa.MetaData(),
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py
index eed0fdf..ec9e805 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/a8b517cff8ab_add_routerport_bindings_for_ha.py
@@ -10,6 +10,12 @@
10# License for the specific language governing permissions and limitations 10# License for the specific language governing permissions and limitations
11# under the License. 11# under the License.
12 12
13from alembic import op
14from neutron_lib import constants as lib_const
15import sqlalchemy as sa
16
17from neutron.common import constants
18
13"""Add routerport bindings for L3 HA 19"""Add routerport bindings for L3 HA
14 20
15Revision ID: a8b517cff8ab 21Revision ID: a8b517cff8ab
@@ -22,12 +28,6 @@ Create Date: 2016-07-18 14:31:45.725516
22revision = 'a8b517cff8ab' 28revision = 'a8b517cff8ab'
23down_revision = '7d9d8eeec6ad' 29down_revision = '7d9d8eeec6ad'
24 30
25from alembic import op
26from neutron_lib import constants as lib_const
27import sqlalchemy as sa
28
29from neutron.common import constants
30
31 31
32HA_AGENT_BINDINGS = 'ha_router_agent_port_bindings' 32HA_AGENT_BINDINGS = 'ha_router_agent_port_bindings'
33ROUTER_PORTS = 'routerports' 33ROUTER_PORTS = 'routerports'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py
index 5af5995..3c01c1f 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/b12a3ef66e62_add_standardattr_to_qos_policies.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""add standardattr to qos policies 18"""add standardattr to qos policies
16 19
17Revision ID: b12a3ef66e62 20Revision ID: b12a3ef66e62
@@ -25,9 +28,6 @@ revision = 'b12a3ef66e62'
25down_revision = '3b935b28e7a0' 28down_revision = '3b935b28e7a0'
26depends_on = ('67daae611b6e',) 29depends_on = ('67daae611b6e',)
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32# basic model of the tables with required field for migration 32# basic model of the tables with required field for migration
33TABLE = 'qos_policies' 33TABLE = 'qos_policies'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py
index 9948f4a..64b87b2 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/b67e765a3524_remove_mtu_column_from_networks.py
@@ -11,6 +11,8 @@
11# under the License. 11# under the License.
12# 12#
13 13
14from alembic import op
15
14"""Remove mtu column from networks. 16"""Remove mtu column from networks.
15 17
16Revision ID: b67e765a3524 18Revision ID: b67e765a3524
@@ -23,8 +25,6 @@ Create Date: 2016-07-17 02:07:36.625196
23revision = 'b67e765a3524' 25revision = 'b67e765a3524'
24down_revision = '4bcd4df1f426' 26down_revision = '4bcd4df1f426'
25 27
26from alembic import op
27
28 28
29def upgrade(): 29def upgrade():
30 op.drop_column('networks', 'mtu') 30 op.drop_column('networks', 'mtu')
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py b/neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py
index 03e57d8..aac93c0 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/contract/c879c5e1ee90_add_segment_id_to_subnet.py
@@ -13,15 +13,15 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add segment_id to subnet """ 19"""Add segment_id to subnet """
17 20
18# revision identifiers, used by Alembic. 21# revision identifiers, used by Alembic.
19revision = 'c879c5e1ee90' 22revision = 'c879c5e1ee90'
20down_revision = '89ab9a816d70' 23down_revision = '89ab9a816d70'
21 24
22from alembic import op
23import sqlalchemy as sa
24
25 25
26def upgrade(): 26def upgrade():
27 op.add_column('subnets', 27 op.add_column('subnets',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py
index c6751db..427abfe 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/030a959ceafa_uniq_routerports0port_id.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import exceptions
18import sqlalchemy as sa
19
20from neutron._i18n import _
21
16"""uniq_routerports0port_id 22"""uniq_routerports0port_id
17 23
18Revision ID: 030a959ceafa 24Revision ID: 030a959ceafa
@@ -25,12 +31,6 @@ Create Date: 2016-06-21 11:33:13.043879
25revision = '030a959ceafa' 31revision = '030a959ceafa'
26down_revision = '3d0e74aa7d37' 32down_revision = '3d0e74aa7d37'
27 33
28from alembic import op
29from neutron_lib import exceptions
30import sqlalchemy as sa
31
32from neutron._i18n import _
33
34routerports = sa.Table( 34routerports = sa.Table(
35 'routerports', sa.MetaData(), 35 'routerports', sa.MetaData(),
36 sa.Column('router_id', sa.String(36)), 36 sa.Column('router_id', sa.String(36)),
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py
index 452b929..d00d84d 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/0f5bef0f87d4_add_qos_minimum_bandwidth_rules.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import constants
18import sqlalchemy as sa
19
16"""add_qos_minimum_bandwidth_rules 20"""add_qos_minimum_bandwidth_rules
17 21
18Revision ID: 0f5bef0f87d4 22Revision ID: 0f5bef0f87d4
@@ -25,10 +29,6 @@ Create Date: 2016-07-29 14:33:37.243487
25revision = '0f5bef0f87d4' 29revision = '0f5bef0f87d4'
26down_revision = 'a5648cfeeadf' 30down_revision = 'a5648cfeeadf'
27 31
28from alembic import op
29from neutron_lib import constants
30import sqlalchemy as sa
31
32 32
33def upgrade(): 33def upgrade():
34 op.create_table( 34 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py
index 01d56f3..e09a4fd 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/30107ab6a3ee_provisioning_blocks.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""provisioning_blocks.py 19"""provisioning_blocks.py
17 20
18Revision ID: 30107ab6a3ee 21Revision ID: 30107ab6a3ee
@@ -24,8 +27,6 @@ Create Date: 2016-04-15 05:59:59.000001
24# revision identifiers, used by Alembic. 27# revision identifiers, used by Alembic.
25revision = '30107ab6a3ee' 28revision = '30107ab6a3ee'
26down_revision = 'd3435b514502' 29down_revision = 'd3435b514502'
27from alembic import op
28import sqlalchemy as sa
29 30
30 31
31def upgrade(): 32def upgrade():
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
index 8b48d23..9f7f4c1 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add flavor_id to Router 19"""Add flavor_id to Router
17 20
18Revision ID: 3d0e74aa7d37 21Revision ID: 3d0e74aa7d37
@@ -21,10 +24,6 @@ Create Date: 2016-05-05 00:22:47.618593
21 24
22""" 25"""
23 26
24from alembic import op
25import sqlalchemy as sa
26
27
28# revision identifiers, used by Alembic. 27# revision identifiers, used by Alembic.
29revision = '3d0e74aa7d37' 28revision = '3d0e74aa7d37'
30down_revision = 'a963b38d82f4' 29down_revision = 'a963b38d82f4'
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py
index 48f2217..9efddf5 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/45f8dd33480b_qos_dscp_db_addition.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""qos dscp db addition 19"""qos dscp db addition
17 20
18Revision ID: 45f8dd33480b 21Revision ID: 45f8dd33480b
@@ -25,9 +28,6 @@ Create Date: 2015-12-03 07:16:24.742290
25revision = '45f8dd33480b' 28revision = '45f8dd33480b'
26down_revision = '0e66c5227a8a' 29down_revision = '0e66c5227a8a'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 33
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py
index cff6a84..76fe4b4 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/5abc0278ca73_add_support_for_vlan_trunking.py
@@ -11,15 +11,15 @@
11# under the License. 11# under the License.
12# 12#
13 13
14from alembic import op
15import sqlalchemy as sa
16from sqlalchemy import sql
17
14"""Add support for VLAN trunking""" 18"""Add support for VLAN trunking"""
15 19
16revision = '5abc0278ca73' 20revision = '5abc0278ca73'
17down_revision = '45f8dd33480b' 21down_revision = '45f8dd33480b'
18 22
19from alembic import op
20import sqlalchemy as sa
21from sqlalchemy import sql
22
23 23
24def upgrade(): 24def upgrade():
25 op.create_table('trunks', 25 op.create_table('trunks',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py
index e265cd5..58cad34 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/5cd92597d11d_add_ip_allocation_to_port.py
@@ -11,18 +11,18 @@
11# under the License. 11# under the License.
12# 12#
13 13
14"""Add ip_allocation to port """
15
16from alembic import op 14from alembic import op
17import sqlalchemy as sa 15import sqlalchemy as sa
18 16
19from neutron.db import migration 17from neutron.db import migration
20 18
19"""Add ip_allocation to port """
21 20
22# revision identifiers, used by Alembic. 21# revision identifiers, used by Alembic.
23revision = '5cd92597d11d' 22revision = '5cd92597d11d'
24down_revision = '6b461a21bcfc' 23down_revision = '6b461a21bcfc'
25 24
25
26# milestone identifier, used by neutron-db-manage 26# milestone identifier, used by neutron-db-manage
27neutron_milestone = [migration.NEWTON] 27neutron_milestone = [migration.NEWTON]
28 28
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py
index cbfc0db..64cc039 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/67daae611b6e_add_standard_attr_to_qos_policies.py
@@ -12,6 +12,9 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
15"""add standardattr to qos policies 18"""add standardattr to qos policies
16 19
17Revision ID: 67daae611b6e 20Revision ID: 67daae611b6e
@@ -23,9 +26,6 @@ Create Date: 2016-08-18 14:10:30.021015
23revision = '67daae611b6e' 26revision = '67daae611b6e'
24down_revision = '0f5bef0f87d4' 27down_revision = '0f5bef0f87d4'
25 28
26from alembic import op
27import sqlalchemy as sa
28
29 29
30TABLE = 'qos_policies' 30TABLE = 'qos_policies'
31 31
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py
index 8d674cd..e9990b2 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/6b461a21bcfc_uniq_floatingips0floating_network_.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import exceptions
18import sqlalchemy as sa
19
20from neutron._i18n import _
21
16"""uniq_floatingips0floating_network_id0fixed_port_id0fixed_ip_addr 22"""uniq_floatingips0floating_network_id0fixed_port_id0fixed_ip_addr
17 23
18Revision ID: 6b461a21bcfc 24Revision ID: 6b461a21bcfc
@@ -25,12 +31,6 @@ Create Date: 2016-06-03 16:00:38.273324
25revision = '6b461a21bcfc' 31revision = '6b461a21bcfc'
26down_revision = '67daae611b6e' 32down_revision = '67daae611b6e'
27 33
28from alembic import op
29from neutron_lib import exceptions
30import sqlalchemy as sa
31
32from neutron._i18n import _
33
34 34
35floatingips = sa.Table( 35floatingips = sa.Table(
36 'floatingips', sa.MetaData(), 36 'floatingips', sa.MetaData(),
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py
index bcbfd87..62b1845 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/a5648cfeeadf_add_subnet_service_types.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add support for Subnet Service Types 19"""Add support for Subnet Service Types
17 20
18Revision ID: a5648cfeeadf 21Revision ID: a5648cfeeadf
@@ -25,9 +28,6 @@ Create Date: 2016-03-15 18:00:00.190173
25revision = 'a5648cfeeadf' 28revision = 'a5648cfeeadf'
26down_revision = '030a959ceafa' 29down_revision = '030a959ceafa'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table('subnet_service_types', 33 op.create_table('subnet_service_types',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py
index 3984e73..c37e95a 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/a963b38d82f4_add_dns_name_to_portdnses.py
@@ -13,15 +13,15 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add dns name to portdnses""" 19"""add dns name to portdnses"""
17 20
18# revision identifiers, used by Alembic. 21# revision identifiers, used by Alembic.
19revision = 'a963b38d82f4' 22revision = 'a963b38d82f4'
20down_revision = 'c415aab1c048' 23down_revision = 'c415aab1c048'
21 24
22from alembic import op
23import sqlalchemy as sa
24
25 25
26def upgrade(): 26def upgrade():
27 op.add_column('portdnses', 27 op.add_column('portdnses',
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py
index f94be8e..0ecc28d 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/c415aab1c048_add_revisions_column.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add revisions table 19"""add revisions table
17 20
18Revision ID: c415aab1c048 21Revision ID: c415aab1c048
@@ -24,9 +27,6 @@ Create Date: 2016-04-11 03:16:24.742290
24revision = 'c415aab1c048' 27revision = 'c415aab1c048'
25down_revision = '30107ab6a3ee' 28down_revision = '30107ab6a3ee'
26 29
27from alembic import op
28import sqlalchemy as sa
29
30 30
31def upgrade(): 31def upgrade():
32 op.add_column( 32 op.add_column(
diff --git a/neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py b/neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py
index d55748e..4ff99f1 100644
--- a/neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py
+++ b/neutron/db/migration/alembic_migrations/versions/newton/expand/d3435b514502_add_device_id_index_to_port.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17
16"""Add device_id index to Port 18"""Add device_id index to Port
17 19
18Revision ID: d3435b514502 20Revision ID: d3435b514502
@@ -25,8 +27,6 @@ Create Date: 2016-04-25 22:13:16.676761
25revision = 'd3435b514502' 27revision = 'd3435b514502'
26down_revision = '5abc0278ca73' 28down_revision = '5abc0278ca73'
27 29
28from alembic import op
29
30 30
31def upgrade(): 31def upgrade():
32 op.create_index('ix_ports_device_id', 'ports', ['device_id'], unique=False) 32 op.create_index('ix_ports_device_id', 'ports', ['device_id'], unique=False)
diff --git a/neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py b/neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py
index adf943b..b3c65f6 100644
--- a/neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/ocata/expand/929c968efe70_add_pk_version_table.py
@@ -13,6 +13,8 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from neutron.db import migration
17
16"""add_pk_version_table 18"""add_pk_version_table
17 19
18Revision ID: 929c968efe70 20Revision ID: 929c968efe70
@@ -26,8 +28,5 @@ revision = '929c968efe70'
26down_revision = '5cd92597d11d' 28down_revision = '5cd92597d11d'
27 29
28 30
29from neutron.db import migration
30
31
32def upgrade(): 31def upgrade():
33 migration.pk_on_alembic_version_table() 32 migration.pk_on_alembic_version_table()
diff --git a/neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py b/neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py
index 887fe76..5cbe6e2 100644
--- a/neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py
+++ b/neutron/db/migration/alembic_migrations/versions/ocata/expand/a9c43481023c_extend_ml2_port_bindings.py
@@ -13,6 +13,13 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import constants
18import sqlalchemy as sa
19from sqlalchemy.engine.reflection import Inspector as insp
20
21from neutron.db import migration
22
16"""extend_pk_with_host_and_add_status_to_ml2_port_binding 23"""extend_pk_with_host_and_add_status_to_ml2_port_binding
17 24
18Revision ID: a9c43481023c 25Revision ID: a9c43481023c
@@ -25,13 +32,6 @@ Create Date: 2016-11-22 11:48:43.479552
25revision = 'a9c43481023c' 32revision = 'a9c43481023c'
26down_revision = '929c968efe70' 33down_revision = '929c968efe70'
27 34
28from alembic import op
29from neutron_lib import constants
30import sqlalchemy as sa
31from sqlalchemy.engine.reflection import Inspector as insp
32
33from neutron.db import migration
34
35MYSQL_ENGINE = 'mysql' 35MYSQL_ENGINE = 'mysql'
36ML2_PORT_BINDING = 'ml2_port_bindings' 36ML2_PORT_BINDING = 'ml2_port_bindings'
37neutron_milestone = [migration.OCATA] 37neutron_milestone = [migration.OCATA]
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py
index 16850e1..bcbb1ed 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/2b42d90729da_qos_add_direction_to_bw_limit_rule_table.py
@@ -13,6 +13,12 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib import constants
18import sqlalchemy as sa
19
20from neutron.db import migration
21
16"""qos add direction to bw_limit_rule table 22"""qos add direction to bw_limit_rule table
17 23
18Revision ID: 2b42d90729da 24Revision ID: 2b42d90729da
@@ -25,12 +31,6 @@ Create Date: 2017-04-03 20:56:00.169599
25revision = '2b42d90729da' 31revision = '2b42d90729da'
26down_revision = '804a3c76314c' 32down_revision = '804a3c76314c'
27 33
28from alembic import op
29from neutron_lib import constants
30import sqlalchemy as sa
31
32from neutron.db import migration
33
34 34
35policies_table_name = "qos_policies" 35policies_table_name = "qos_policies"
36bw_limit_table_name = "qos_bandwidth_limit_rules" 36bw_limit_table_name = "qos_bandwidth_limit_rules"
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py
index 02c7461..ab919d1 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/349b6fd605a6_add_dns_domain_to_portdnses.py
@@ -13,6 +13,10 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17from neutron_lib.db import constants
18import sqlalchemy as sa
19
16"""Add dns_domain to portdnses 20"""Add dns_domain to portdnses
17 21
18Revision ID: 349b6fd605a6 22Revision ID: 349b6fd605a6
@@ -25,10 +29,6 @@ Create Date: 2017-04-15 00:22:47.618593
25revision = '349b6fd605a6' 29revision = '349b6fd605a6'
26down_revision = 'c8c222d42aa9' 30down_revision = 'c8c222d42aa9'
27 31
28from alembic import op
29from neutron_lib.db import constants
30import sqlalchemy as sa
31
32 32
33def upgrade(): 33def upgrade():
34 op.add_column('portdnses', 34 op.add_column('portdnses',
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py
index 557ac77..65d3500 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/62c781cb6192_add_qos_policies_default_table.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""add is default to qos policies 19"""add is default to qos policies
17 20
18Revision ID: 62c781cb6192 21Revision ID: 62c781cb6192
@@ -25,9 +28,6 @@ Create Date: 2017-02-07 13:28:35.894357
25revision = '62c781cb6192' 28revision = '62c781cb6192'
26down_revision = '2b42d90729da' 29down_revision = '2b42d90729da'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table( 33 op.create_table(
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py
index 2b46811..e6076b6 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/7d32f979895f_add_mtu_for_networks.py
@@ -11,6 +11,11 @@
11# under the License. 11# under the License.
12# 12#
13 13
14from alembic import op
15import sqlalchemy as sa
16
17from neutron.db import migration
18
14"""add mtu for networks 19"""add mtu for networks
15 20
16Revision ID: 7d32f979895f 21Revision ID: 7d32f979895f
@@ -19,12 +24,6 @@ Create Date: 2017-07-13 19:25:29.204547
19 24
20""" 25"""
21 26
22from alembic import op
23import sqlalchemy as sa
24
25from neutron.db import migration
26
27
28# revision identifiers, used by Alembic. 27# revision identifiers, used by Alembic.
29revision = '7d32f979895f' 28revision = '7d32f979895f'
30down_revision = '349b6fd605a6' 29down_revision = '349b6fd605a6'
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py
index bd4d147..0a1804e 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/804a3c76314c_add_data_plane_status_to_port.py
@@ -13,6 +13,9 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
16"""Add data_plane_status to Port 19"""Add data_plane_status to Port
17 20
18Revision ID: 804a3c76314c 21Revision ID: 804a3c76314c
@@ -25,9 +28,6 @@ Create Date: 2017-01-17 13:51:45.737987
25revision = '804a3c76314c' 28revision = '804a3c76314c'
26down_revision = 'a9c43481023c' 29down_revision = 'a9c43481023c'
27 30
28from alembic import op
29import sqlalchemy as sa
30
31 31
32def upgrade(): 32def upgrade():
33 op.create_table('portdataplanestatuses', 33 op.create_table('portdataplanestatuses',
diff --git a/neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py b/neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py
index 4c41a1f..7a6c75c 100644
--- a/neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py
+++ b/neutron/db/migration/alembic_migrations/versions/pike/expand/c8c222d42aa9_logging_api.py
@@ -13,6 +13,11 @@
13# under the License. 13# under the License.
14# 14#
15 15
16from alembic import op
17import sqlalchemy as sa
18
19from neutron_lib.db import constants as db_const
20
16"""logging api 21"""logging api
17 22
18Revision ID: c8c222d42aa9 23Revision ID: c8c222d42aa9
@@ -25,11 +30,6 @@ Create Date: 2017-05-30 11:51:08.173604
25revision = 'c8c222d42aa9' 30revision = 'c8c222d42aa9'
26down_revision = '62c781cb6192' 31down_revision = '62c781cb6192'
27 32
28from alembic import op
29import sqlalchemy as sa
30
31from neutron_lib.db import constants as db_const
32
33 33
34def upgrade(): 34def upgrade():
35 35
diff --git a/neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py b/neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py
index 65182a4..0157a7d 100644
--- a/neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py
+++ b/neutron/db/migration/alembic_migrations/versions/queens/expand/594422d373ee_fip_qos.py
@@ -12,6 +12,13 @@
12# under the License. 12# under the License.
13# 13#
14 14
15from alembic import op
16import sqlalchemy as sa
17
18from neutron_lib.db import constants as db_const
19
20from neutron.db import migration
21
15"""fip qos 22"""fip qos
16 23
17Revision ID: 594422d373ee 24Revision ID: 594422d373ee
@@ -24,13 +31,6 @@ Create Date: 2016-04-26 17:16:10.323756
24revision = '594422d373ee' 31revision = '594422d373ee'
25down_revision = '7d32f979895f' 32down_revision = '7d32f979895f'
26 33
27from alembic import op
28import sqlalchemy as sa
29
30from neutron_lib.db import constants as db_const
31
32from neutron.db import migration
33
34# milestone identifier, used by neutron-db-manage 34# milestone identifier, used by neutron-db-manage
35neutron_milestone = [migration.QUEENS] 35neutron_milestone = [migration.QUEENS]
36 36
diff --git a/neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py b/neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py
index ce87463..dbf8251 100644
--- a/neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py
+++ b/neutron/db/migration/alembic_migrations/versions/rocky/expand/61663558142c_add_ha_router_state.py
@@ -12,6 +12,12 @@
12# License for the specific language governing permissions and limitations 12# License for the specific language governing permissions and limitations
13# under the License. 13# under the License.
14# 14#
15
16import sqlalchemy as sa
17
18from neutron.common import constants
19from neutron.db import migration
20
15"""Add unknown state to HA router 21"""Add unknown state to HA router
16 22
17Revision ID: 61663558142c 23Revision ID: 61663558142c
@@ -23,11 +29,6 @@ Create Date: 2017-05-18 14:31:45.725516
23revision = '61663558142c' 29revision = '61663558142c'
24down_revision = '594422d373ee' 30down_revision = '594422d373ee'
25 31
26import sqlalchemy as sa
27
28from neutron.common import constants
29from neutron.db import migration
30
31 32
32ha_port_bindings_table_name = "ha_router_agent_port_bindings" 33ha_port_bindings_table_name = "ha_router_agent_port_bindings"
33new_enum = sa.Enum( 34new_enum = sa.Enum(
diff --git a/tox.ini b/tox.ini
index 9e603bb..235720a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -146,9 +146,8 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
146# N534 Untranslated exception message 146# N534 Untranslated exception message
147# N536 Use assertIsNone rather than assertEqual to check for None values 147# N536 Use assertIsNone rather than assertEqual to check for None values
148# TODO(amotoki) check the following new rules should be fixed or ignored 148# TODO(amotoki) check the following new rules should be fixed or ignored
149# E402 module level import not at top of file
150# E731 do not assign a lambda expression, use a def 149# E731 do not assign a lambda expression, use a def
151ignore = E125,E126,E128,E129,E265,E402,E731,H404,H405,N530,N534,N536 150ignore = E125,E126,E128,E129,E265,E731,H404,H405,N530,N534,N536
152# H106: Don't put vim configuration in source files 151# H106: Don't put vim configuration in source files
153# H203: Use assertIs(Not)None to check for None 152# H203: Use assertIs(Not)None to check for None
154# H204: Use assert(Not)Equal to check for equality 153# H204: Use assert(Not)Equal to check for equality