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
This commit is contained in:
Brian Haley 2018-04-12 16:30:07 -04:00 committed by Brian Haley
parent fc8511cd54
commit de243a3513
82 changed files with 303 additions and 310 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
"""add_qos_minimum_bandwidth_rules
Revision ID: 0f5bef0f87d4
@ -25,10 +29,6 @@ Create Date: 2016-07-29 14:33:37.243487
revision = '0f5bef0f87d4'
down_revision = 'a5648cfeeadf'
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
def upgrade():
op.create_table(

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""provisioning_blocks.py
Revision ID: 30107ab6a3ee
@ -24,8 +27,6 @@ Create Date: 2016-04-15 05:59:59.000001
# revision identifiers, used by Alembic.
revision = '30107ab6a3ee'
down_revision = 'd3435b514502'
from alembic import op
import sqlalchemy as sa
def upgrade():

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add flavor_id to Router
Revision ID: 3d0e74aa7d37
@ -21,10 +24,6 @@ Create Date: 2016-05-05 00:22:47.618593
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3d0e74aa7d37'
down_revision = 'a963b38d82f4'

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""qos dscp db addition
Revision ID: 45f8dd33480b
@ -25,9 +28,6 @@ Create Date: 2015-12-03 07:16:24.742290
revision = '45f8dd33480b'
down_revision = '0e66c5227a8a'
from alembic import op
import sqlalchemy as sa
def upgrade():

View File

@ -11,15 +11,15 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
"""Add support for VLAN trunking"""
revision = '5abc0278ca73'
down_revision = '45f8dd33480b'
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
def upgrade():
op.create_table('trunks',

View File

@ -11,18 +11,18 @@
# under the License.
#
"""Add ip_allocation to port """
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
"""Add ip_allocation to port """
# revision identifiers, used by Alembic.
revision = '5cd92597d11d'
down_revision = '6b461a21bcfc'
# milestone identifier, used by neutron-db-manage
neutron_milestone = [migration.NEWTON]

View File

@ -12,6 +12,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add standardattr to qos policies
Revision ID: 67daae611b6e
@ -23,9 +26,6 @@ Create Date: 2016-08-18 14:10:30.021015
revision = '67daae611b6e'
down_revision = '0f5bef0f87d4'
from alembic import op
import sqlalchemy as sa
TABLE = 'qos_policies'

View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
"""uniq_floatingips0floating_network_id0fixed_port_id0fixed_ip_addr
Revision ID: 6b461a21bcfc
@ -25,12 +31,6 @@ Create Date: 2016-06-03 16:00:38.273324
revision = '6b461a21bcfc'
down_revision = '67daae611b6e'
from alembic import op
from neutron_lib import exceptions
import sqlalchemy as sa
from neutron._i18n import _
floatingips = sa.Table(
'floatingips', sa.MetaData(),

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add support for Subnet Service Types
Revision ID: a5648cfeeadf
@ -25,9 +28,6 @@ Create Date: 2016-03-15 18:00:00.190173
revision = 'a5648cfeeadf'
down_revision = '030a959ceafa'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('subnet_service_types',

View File

@ -13,15 +13,15 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add dns name to portdnses"""
# revision identifiers, used by Alembic.
revision = 'a963b38d82f4'
down_revision = 'c415aab1c048'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('portdnses',

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add revisions table
Revision ID: c415aab1c048
@ -24,9 +27,6 @@ Create Date: 2016-04-11 03:16:24.742290
revision = 'c415aab1c048'
down_revision = '30107ab6a3ee'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column(

View File

@ -13,6 +13,8 @@
# under the License.
#
from alembic import op
"""Add device_id index to Port
Revision ID: d3435b514502
@ -25,8 +27,6 @@ Create Date: 2016-04-25 22:13:16.676761
revision = 'd3435b514502'
down_revision = '5abc0278ca73'
from alembic import op
def upgrade():
op.create_index('ix_ports_device_id', 'ports', ['device_id'], unique=False)

View File

@ -13,6 +13,8 @@
# under the License.
#
from neutron.db import migration
"""add_pk_version_table
Revision ID: 929c968efe70
@ -26,8 +28,5 @@ revision = '929c968efe70'
down_revision = '5cd92597d11d'
from neutron.db import migration
def upgrade():
migration.pk_on_alembic_version_table()

View File

@ -13,6 +13,13 @@
# under the License.
#
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
from sqlalchemy.engine.reflection import Inspector as insp
from neutron.db import migration
"""extend_pk_with_host_and_add_status_to_ml2_port_binding
Revision ID: a9c43481023c
@ -25,13 +32,6 @@ Create Date: 2016-11-22 11:48:43.479552
revision = 'a9c43481023c'
down_revision = '929c968efe70'
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
from sqlalchemy.engine.reflection import Inspector as insp
from neutron.db import migration
MYSQL_ENGINE = 'mysql'
ML2_PORT_BINDING = 'ml2_port_bindings'
neutron_milestone = [migration.OCATA]

View File

@ -13,6 +13,12 @@
# under the License.
#
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
from neutron.db import migration
"""qos add direction to bw_limit_rule table
Revision ID: 2b42d90729da
@ -25,12 +31,6 @@ Create Date: 2017-04-03 20:56:00.169599
revision = '2b42d90729da'
down_revision = '804a3c76314c'
from alembic import op
from neutron_lib import constants
import sqlalchemy as sa
from neutron.db import migration
policies_table_name = "qos_policies"
bw_limit_table_name = "qos_bandwidth_limit_rules"

View File

@ -13,6 +13,10 @@
# under the License.
#
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
"""Add dns_domain to portdnses
Revision ID: 349b6fd605a6
@ -25,10 +29,6 @@ Create Date: 2017-04-15 00:22:47.618593
revision = '349b6fd605a6'
down_revision = 'c8c222d42aa9'
from alembic import op
from neutron_lib.db import constants
import sqlalchemy as sa
def upgrade():
op.add_column('portdnses',

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""add is default to qos policies
Revision ID: 62c781cb6192
@ -25,9 +28,6 @@ Create Date: 2017-02-07 13:28:35.894357
revision = '62c781cb6192'
down_revision = '2b42d90729da'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(

View File

@ -11,6 +11,11 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
"""add mtu for networks
Revision ID: 7d32f979895f
@ -19,12 +24,6 @@ Create Date: 2017-07-13 19:25:29.204547
"""
from alembic import op
import sqlalchemy as sa
from neutron.db import migration
# revision identifiers, used by Alembic.
revision = '7d32f979895f'
down_revision = '349b6fd605a6'

View File

@ -13,6 +13,9 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
"""Add data_plane_status to Port
Revision ID: 804a3c76314c
@ -25,9 +28,6 @@ Create Date: 2017-01-17 13:51:45.737987
revision = '804a3c76314c'
down_revision = 'a9c43481023c'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('portdataplanestatuses',

View File

@ -13,6 +13,11 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron_lib.db import constants as db_const
"""logging api
Revision ID: c8c222d42aa9
@ -25,11 +30,6 @@ Create Date: 2017-05-30 11:51:08.173604
revision = 'c8c222d42aa9'
down_revision = '62c781cb6192'
from alembic import op
import sqlalchemy as sa
from neutron_lib.db import constants as db_const
def upgrade():

View File

@ -12,6 +12,13 @@
# under the License.
#
from alembic import op
import sqlalchemy as sa
from neutron_lib.db import constants as db_const
from neutron.db import migration
"""fip qos
Revision ID: 594422d373ee
@ -24,13 +31,6 @@ Create Date: 2016-04-26 17:16:10.323756
revision = '594422d373ee'
down_revision = '7d32f979895f'
from alembic import op
import sqlalchemy as sa
from neutron_lib.db import constants as db_const
from neutron.db import migration
# milestone identifier, used by neutron-db-manage
neutron_milestone = [migration.QUEENS]

View File

@ -12,6 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
#
import sqlalchemy as sa
from neutron.common import constants
from neutron.db import migration
"""Add unknown state to HA router
Revision ID: 61663558142c
@ -23,11 +29,6 @@ Create Date: 2017-05-18 14:31:45.725516
revision = '61663558142c'
down_revision = '594422d373ee'
import sqlalchemy as sa
from neutron.common import constants
from neutron.db import migration
ha_port_bindings_table_name = "ha_router_agent_port_bindings"
new_enum = sa.Enum(

View File

@ -146,9 +146,8 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
# N534 Untranslated exception message
# N536 Use assertIsNone rather than assertEqual to check for None values
# TODO(amotoki) check the following new rules should be fixed or ignored
# E402 module level import not at top of file
# E731 do not assign a lambda expression, use a def
ignore = E125,E126,E128,E129,E265,E402,E731,H404,H405,N530,N534,N536
ignore = E125,E126,E128,E129,E265,E731,H404,H405,N530,N534,N536
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality