Merge "pyupgrade changes for Python3.8+ (5)"
This commit is contained in:
commit
ce29065796
@ -143,29 +143,29 @@ class OctaviaBase(models.ModelBase):
|
||||
return f"{self.__class__.__name__}({params})"
|
||||
|
||||
|
||||
class LookupTableMixin(object):
|
||||
class LookupTableMixin:
|
||||
"""Mixin to add to classes that are lookup tables."""
|
||||
name = sa.Column(sa.String(255), primary_key=True, nullable=False)
|
||||
description = sa.Column(sa.String(255), nullable=True)
|
||||
|
||||
|
||||
class IdMixin(object):
|
||||
class IdMixin:
|
||||
"""Id mixin, add to subclasses that have an id."""
|
||||
id = sa.Column(sa.String(36), primary_key=True,
|
||||
default=uuidutils.generate_uuid)
|
||||
|
||||
|
||||
class ProjectMixin(object):
|
||||
class ProjectMixin:
|
||||
"""Tenant mixin, add to subclasses that have a project."""
|
||||
project_id = sa.Column(sa.String(36))
|
||||
|
||||
|
||||
class NameMixin(object):
|
||||
class NameMixin:
|
||||
"""Name mixin to add to classes which need a name."""
|
||||
name = sa.Column(sa.String(255), nullable=True)
|
||||
|
||||
|
||||
class TagMixin(object):
|
||||
class TagMixin:
|
||||
"""Tags mixin to add to classes which need tags.
|
||||
|
||||
The class must realize the specified db relationship as well.
|
||||
|
@ -30,6 +30,6 @@ down_revision = '10d38216ad34'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'image_id', sa.String(36), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('image_id', sa.String(36), nullable=True)
|
||||
)
|
||||
|
@ -33,33 +33,33 @@ down_revision = 'fac584114642'
|
||||
def upgrade():
|
||||
# Add timing data
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'created_at', sa.DateTime(), nullable=True)
|
||||
'l7policy',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'updated_at', sa.DateTime(), nullable=True)
|
||||
'l7policy',
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
||||
# Add project_id
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'project_id', sa.String(36), nullable=True)
|
||||
'l7policy',
|
||||
sa.Column('project_id', sa.String(36), nullable=True)
|
||||
)
|
||||
|
||||
# Add new operating_status column, setting existing rows to ONLINE
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'operating_status', sa.String(16),
|
||||
'l7policy',
|
||||
sa.Column('operating_status', sa.String(16),
|
||||
nullable=False, server_default=constants.ONLINE)
|
||||
)
|
||||
# Remove the default, as we don't actually want one
|
||||
op.alter_column(u'l7policy', u'operating_status',
|
||||
op.alter_column('l7policy', 'operating_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
# Add the foreign key for operating_status_name
|
||||
op.create_foreign_key(
|
||||
u'fk_l7policy_operating_status_name', u'l7policy',
|
||||
u'operating_status', [u'operating_status'], [u'name']
|
||||
'fk_l7policy_operating_status_name', 'l7policy',
|
||||
'operating_status', ['operating_status'], ['name']
|
||||
)
|
||||
|
||||
op.drop_constraint('fk_health_monitor_provisioning_status_name',
|
||||
@ -83,59 +83,59 @@ def upgrade():
|
||||
type_='foreignkey')
|
||||
|
||||
# provisioning_status was mistakenly added as nullable, the fix is similar
|
||||
op.alter_column(u'l7policy', u'provisioning_status', nullable=False,
|
||||
op.alter_column('l7policy', 'provisioning_status', nullable=False,
|
||||
existing_type=sa.String(16),
|
||||
server_default=constants.ACTIVE)
|
||||
op.alter_column(u'l7policy', u'provisioning_status',
|
||||
op.alter_column('l7policy', 'provisioning_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
# Fix the rest of these that were also mistakenly set as nullable in:
|
||||
# 9b5473976d6d_add_provisioning_status_to_objects.py
|
||||
op.alter_column(u'health_monitor', u'provisioning_status', nullable=False,
|
||||
op.alter_column('health_monitor', 'provisioning_status', nullable=False,
|
||||
existing_type=sa.String(16),
|
||||
server_default=constants.ACTIVE)
|
||||
op.alter_column(u'health_monitor', u'provisioning_status',
|
||||
op.alter_column('health_monitor', 'provisioning_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
op.alter_column(u'member', u'provisioning_status', nullable=False,
|
||||
op.alter_column('member', 'provisioning_status', nullable=False,
|
||||
existing_type=sa.String(16),
|
||||
server_default=constants.ACTIVE)
|
||||
op.alter_column(u'member', u'provisioning_status',
|
||||
op.alter_column('member', 'provisioning_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
op.alter_column(u'pool', u'provisioning_status', nullable=False,
|
||||
op.alter_column('pool', 'provisioning_status', nullable=False,
|
||||
existing_type=sa.String(16),
|
||||
server_default=constants.ACTIVE)
|
||||
op.alter_column(u'pool', u'provisioning_status',
|
||||
op.alter_column('pool', 'provisioning_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
op.alter_column(u'l7rule', u'provisioning_status', nullable=False,
|
||||
op.alter_column('l7rule', 'provisioning_status', nullable=False,
|
||||
existing_type=sa.String(16),
|
||||
server_default=constants.ACTIVE)
|
||||
op.alter_column(u'l7rule', u'provisioning_status',
|
||||
op.alter_column('l7rule', 'provisioning_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_health_monitor_provisioning_status_name', u'health_monitor',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_health_monitor_provisioning_status_name', 'health_monitor',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_l7policy_provisioning_status_name', u'l7policy',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_l7policy_provisioning_status_name', 'l7policy',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_l7rule_provisioning_status_name', u'l7rule',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_l7rule_provisioning_status_name', 'l7rule',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_member_provisioning_status_name', u'member',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_member_provisioning_status_name', 'member',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_pool_provisioning_status_name', u'pool',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_pool_provisioning_status_name', 'pool',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
@ -30,8 +30,8 @@ down_revision = '0fd2c131923f'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'load_balancer',
|
||||
sa.Column(u'provider', sa.String(64), nullable=True)
|
||||
'load_balancer',
|
||||
sa.Column('provider', sa.String(64), nullable=True)
|
||||
)
|
||||
op.execute("UPDATE load_balancer set provider='amphora' where provider "
|
||||
"is null")
|
||||
|
@ -30,10 +30,10 @@ down_revision = '0aee2b450512'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'created_at', sa.DateTime(), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'updated_at', sa.DateTime(), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
@ -27,4 +27,4 @@ down_revision = '211982b05afc'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'vip', u'ip_address', type_=sa.String(64))
|
||||
op.alter_column('vip', 'ip_address', type_=sa.String(64))
|
||||
|
@ -29,15 +29,15 @@ down_revision = '4c094013699a'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'provisioning_status', u'name',
|
||||
op.alter_column('provisioning_status', 'name',
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'operating_status', u'name',
|
||||
op.alter_column('operating_status', 'name',
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'health_monitor_type', u'name',
|
||||
op.alter_column('health_monitor_type', 'name',
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'protocol', u'name',
|
||||
op.alter_column('protocol', 'name',
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'algorithm', u'name',
|
||||
op.alter_column('algorithm', 'name',
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'session_persistence_type', u'name',
|
||||
op.alter_column('session_persistence_type', 'name',
|
||||
existing_type=sa.String(255))
|
||||
|
@ -29,10 +29,10 @@ down_revision = '3a1e1cdb7b27'
|
||||
|
||||
|
||||
def upgrade():
|
||||
with op.batch_alter_table(u'vip') as batch_op:
|
||||
batch_op.alter_column(u'subnet_id', new_column_name=u'network_id',
|
||||
with op.batch_alter_table('vip') as batch_op:
|
||||
batch_op.alter_column('subnet_id', new_column_name='network_id',
|
||||
existing_type=sa.String(36))
|
||||
batch_op.alter_column(u'net_port_id', new_column_name=u'port_id',
|
||||
batch_op.alter_column('net_port_id', new_column_name='port_id',
|
||||
existing_type=sa.String(36))
|
||||
batch_op.drop_column(u'floating_ip_id')
|
||||
batch_op.drop_column(u'floating_ip_network_id')
|
||||
batch_op.drop_column('floating_ip_id')
|
||||
batch_op.drop_column('floating_ip_network_id')
|
||||
|
@ -30,5 +30,5 @@ down_revision = '458c9ee2a011'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'load_balancer', sa.Column(u'server_group_id',
|
||||
sa.String(36), nullable=True))
|
||||
op.add_column('load_balancer', sa.Column('server_group_id',
|
||||
sa.String(36), nullable=True))
|
||||
|
@ -36,9 +36,9 @@ new_fields = ['SSL_CONN_HAS_CERT', 'SSL_VERIFY_RESULT', 'SSL_DN_FIELD']
|
||||
def upgrade():
|
||||
|
||||
insert_table = sql.table(
|
||||
u'l7rule_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'l7rule_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
cows = [{'name': field} for field in new_fields]
|
||||
op.bulk_insert(insert_table, cows)
|
||||
|
@ -30,15 +30,15 @@ down_revision = '5a3ee5472c31'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'vrrp_auth_method',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'vrrp_auth_method',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'vrrp_auth_method',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'vrrp_auth_method',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -50,36 +50,36 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'vrrp_group',
|
||||
sa.Column(u'load_balancer_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'vrrp_group_name', sa.String(36), nullable=True),
|
||||
sa.Column(u'vrrp_auth_type', sa.String(16), nullable=True),
|
||||
sa.Column(u'vrrp_auth_pass', sa.String(36), nullable=True),
|
||||
sa.Column(u'advert_int', sa.Integer(), nullable=True),
|
||||
sa.PrimaryKeyConstraint(u'load_balancer_id'),
|
||||
sa.ForeignKeyConstraint([u'load_balancer_id'], [u'load_balancer.id'],
|
||||
name=u'fk_vrrp_group_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint([u'vrrp_auth_type'],
|
||||
[u'vrrp_auth_method.name'],
|
||||
name=u'fk_load_balancer_vrrp_auth_method_name')
|
||||
'vrrp_group',
|
||||
sa.Column('load_balancer_id', sa.String(36), nullable=False),
|
||||
sa.Column('vrrp_group_name', sa.String(36), nullable=True),
|
||||
sa.Column('vrrp_auth_type', sa.String(16), nullable=True),
|
||||
sa.Column('vrrp_auth_pass', sa.String(36), nullable=True),
|
||||
sa.Column('advert_int', sa.Integer(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('load_balancer_id'),
|
||||
sa.ForeignKeyConstraint(['load_balancer_id'], ['load_balancer.id'],
|
||||
name='fk_vrrp_group_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint(['vrrp_auth_type'],
|
||||
['vrrp_auth_method.name'],
|
||||
name='fk_load_balancer_vrrp_auth_method_name')
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'listener',
|
||||
sa.Column(u'peer_port', sa.Integer(), nullable=True)
|
||||
'listener',
|
||||
sa.Column('peer_port', sa.Integer(), nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'vrrp_interface', sa.String(16), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('vrrp_interface', sa.String(16), nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'vrrp_id', sa.Integer(), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('vrrp_id', sa.Integer(), nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'vrrp_priority', sa.Integer(), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('vrrp_priority', sa.Integer(), nullable=True)
|
||||
)
|
||||
|
@ -33,9 +33,9 @@ new_protocol = 'TERMINATED_HTTPS'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'protocol',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'protocol',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -44,5 +44,5 @@ def upgrade():
|
||||
{'name': new_protocol}
|
||||
]
|
||||
)
|
||||
op.alter_column(u'listener', u'tls_certificate_id',
|
||||
op.alter_column('listener', 'tls_certificate_id',
|
||||
existing_type=sa.String(255), nullable=True)
|
||||
|
@ -29,5 +29,5 @@ down_revision = '14892634e228'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora', sa.Column(u'lb_network_ip', sa.String(64),
|
||||
nullable=True))
|
||||
op.add_column('amphora', sa.Column('lb_network_ip', sa.String(64),
|
||||
nullable=True))
|
||||
|
@ -30,13 +30,13 @@ down_revision = '5309960964f8'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'member',
|
||||
sa.Column(u'monitor_address',
|
||||
op.add_column('member',
|
||||
sa.Column('monitor_address',
|
||||
sa.String(64),
|
||||
nullable=True)
|
||||
)
|
||||
op.add_column(u'member',
|
||||
sa.Column(u'monitor_port',
|
||||
op.add_column('member',
|
||||
sa.Column('monitor_port',
|
||||
sa.Integer(),
|
||||
nullable=True)
|
||||
)
|
||||
|
@ -29,7 +29,7 @@ down_revision = '4fe8240425b4'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora',
|
||||
sa.Column(u'vrrp_port_id', sa.String(36), nullable=True))
|
||||
op.add_column(u'amphora',
|
||||
sa.Column(u'ha_port_id', sa.String(36), nullable=True))
|
||||
op.add_column('amphora',
|
||||
sa.Column('vrrp_port_id', sa.String(36), nullable=True))
|
||||
op.add_column('amphora',
|
||||
sa.Column('ha_port_id', sa.String(36), nullable=True))
|
||||
|
@ -49,7 +49,7 @@ def upgrade():
|
||||
op.create_foreign_key('fk_listener_pool_id', 'listener',
|
||||
'pool', ['default_pool_id'], ['id'])
|
||||
|
||||
op.add_column(u'pool',
|
||||
op.add_column('pool',
|
||||
sa.Column('load_balancer_id', sa.String(36),
|
||||
sa.ForeignKey('load_balancer.id'), nullable=True))
|
||||
|
||||
|
@ -31,7 +31,7 @@ down_revision = '11e4bb2bb8ef'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'listener',
|
||||
sa.Column(u'client_ca_tls_certificate_id', sa.String(255),
|
||||
'listener',
|
||||
sa.Column('client_ca_tls_certificate_id', sa.String(255),
|
||||
nullable=True)
|
||||
)
|
||||
|
@ -30,15 +30,15 @@ down_revision = '6ac558d7fc21'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'additional_vip',
|
||||
sa.Column(u'load_balancer_id', sa.String(36), nullable=False,
|
||||
'additional_vip',
|
||||
sa.Column('load_balancer_id', sa.String(36), nullable=False,
|
||||
index=True),
|
||||
sa.Column(u'ip_address', sa.String(64), nullable=True),
|
||||
sa.Column(u'port_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'network_id', sa.String(36), nullable=True),
|
||||
sa.ForeignKeyConstraint([u'load_balancer_id'], [u'load_balancer.id'],
|
||||
name=u'fk_add_vip_load_balancer_id'),
|
||||
sa.PrimaryKeyConstraint(u'load_balancer_id', u'subnet_id',
|
||||
name=u'pk_add_vip_load_balancer_subnet'),
|
||||
sa.Column('ip_address', sa.String(64), nullable=True),
|
||||
sa.Column('port_id', sa.String(36), nullable=True),
|
||||
sa.Column('subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column('network_id', sa.String(36), nullable=True),
|
||||
sa.ForeignKeyConstraint(['load_balancer_id'], ['load_balancer.id'],
|
||||
name='fk_add_vip_load_balancer_id'),
|
||||
sa.PrimaryKeyConstraint('load_balancer_id', 'subnet_id',
|
||||
name='pk_add_vip_load_balancer_subnet'),
|
||||
)
|
||||
|
@ -30,11 +30,11 @@ down_revision = 'd3c8a090f3de'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'quotas',
|
||||
op.add_column('quotas',
|
||||
sa.Column('l7policy', sa.Integer(), nullable=True))
|
||||
op.add_column(u'quotas',
|
||||
op.add_column('quotas',
|
||||
sa.Column('l7rule', sa.Integer(), nullable=True))
|
||||
op.add_column(u'quotas',
|
||||
op.add_column('quotas',
|
||||
sa.Column('in_use_l7policy', sa.Integer(), nullable=True))
|
||||
op.add_column(u'quotas',
|
||||
op.add_column('quotas',
|
||||
sa.Column('in_use_l7rule', sa.Integer(), nullable=True))
|
||||
|
@ -32,15 +32,15 @@ down_revision = '298eac0640a7'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'lb_topology',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'lb_topology',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'lb_topology',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'lb_topology',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -52,15 +52,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'amphora_roles',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'amphora_roles',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'amphora_roles',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'amphora_roles',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -73,17 +73,17 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'load_balancer',
|
||||
sa.Column(u'topology', sa.String(36),
|
||||
sa.ForeignKey(u'lb_topology.name',
|
||||
name=u'fk_lb_topology_name'),
|
||||
'load_balancer',
|
||||
sa.Column('topology', sa.String(36),
|
||||
sa.ForeignKey('lb_topology.name',
|
||||
name='fk_lb_topology_name'),
|
||||
nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'role', sa.String(36),
|
||||
sa.ForeignKey(u'amphora_roles.name',
|
||||
name=u'fk_amphora_roles_name'),
|
||||
'amphora',
|
||||
sa.Column('role', sa.String(36),
|
||||
sa.ForeignKey('amphora_roles.name',
|
||||
name='fk_amphora_roles_name'),
|
||||
nullable=True)
|
||||
)
|
||||
|
@ -32,16 +32,16 @@ down_revision = None
|
||||
def upgrade():
|
||||
# Create lookup tables
|
||||
op.create_table(
|
||||
u'health_monitor_type',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'health_monitor_type',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
# Create temporary table for table data seeding
|
||||
insert_table = sql.table(
|
||||
u'health_monitor_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'health_monitor_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -54,15 +54,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'protocol',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'protocol',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'protocol',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'protocol',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -75,15 +75,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'algorithm',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'algorithm',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'algorithm',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'algorithm',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -96,15 +96,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'session_persistence_type',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'session_persistence_type',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'session_persistence_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'session_persistence_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -117,15 +117,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'provisioning_status',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'provisioning_status',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'provisioning_status',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'provisioning_status',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -141,15 +141,15 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'operating_status',
|
||||
sa.Column(u'name', sa.String(30), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'operating_status',
|
||||
sa.Column('name', sa.String(30), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'operating_status',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'operating_status',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -163,190 +163,190 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'pool',
|
||||
sa.Column(u'tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'protocol', sa.String(16), nullable=False),
|
||||
sa.Column(u'lb_algorithm', sa.String(16), nullable=False),
|
||||
sa.Column(u'operating_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.ForeignKeyConstraint([u'protocol'],
|
||||
[u'protocol.name'],
|
||||
name=u'fk_pool_protocol_name'),
|
||||
sa.ForeignKeyConstraint([u'lb_algorithm'],
|
||||
[u'algorithm.name'],
|
||||
name=u'fk_pool_algorithm_name'),
|
||||
sa.ForeignKeyConstraint([u'operating_status'],
|
||||
[u'operating_status.name'],
|
||||
name=u'fk_pool_operating_status_name')
|
||||
'pool',
|
||||
sa.Column('tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=True),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('protocol', sa.String(16), nullable=False),
|
||||
sa.Column('lb_algorithm', sa.String(16), nullable=False),
|
||||
sa.Column('operating_status', sa.String(16), nullable=False),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(['protocol'],
|
||||
['protocol.name'],
|
||||
name='fk_pool_protocol_name'),
|
||||
sa.ForeignKeyConstraint(['lb_algorithm'],
|
||||
['algorithm.name'],
|
||||
name='fk_pool_algorithm_name'),
|
||||
sa.ForeignKeyConstraint(['operating_status'],
|
||||
['operating_status.name'],
|
||||
name='fk_pool_operating_status_name')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'health_monitor',
|
||||
sa.Column(u'pool_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'type', sa.String(36), nullable=False),
|
||||
sa.Column(u'delay', sa.Integer(), nullable=False),
|
||||
sa.Column(u'timeout', sa.Integer(), nullable=False),
|
||||
sa.Column(u'fall_threshold', sa.Integer(), nullable=False),
|
||||
sa.Column(u'rise_threshold', sa.Integer(), nullable=False),
|
||||
sa.Column(u'http_method', sa.String(16), nullable=True),
|
||||
sa.Column(u'url_path', sa.String(255), nullable=True),
|
||||
sa.Column(u'expected_codes', sa.String(64), nullable=True),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'pool_id'),
|
||||
sa.ForeignKeyConstraint([u'pool_id'], [u'pool.id'],
|
||||
name=u'fk_health_monitor_pool_id'),
|
||||
'health_monitor',
|
||||
sa.Column('pool_id', sa.String(36), nullable=False),
|
||||
sa.Column('type', sa.String(36), nullable=False),
|
||||
sa.Column('delay', sa.Integer(), nullable=False),
|
||||
sa.Column('timeout', sa.Integer(), nullable=False),
|
||||
sa.Column('fall_threshold', sa.Integer(), nullable=False),
|
||||
sa.Column('rise_threshold', sa.Integer(), nullable=False),
|
||||
sa.Column('http_method', sa.String(16), nullable=True),
|
||||
sa.Column('url_path', sa.String(255), nullable=True),
|
||||
sa.Column('expected_codes', sa.String(64), nullable=True),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('pool_id'),
|
||||
sa.ForeignKeyConstraint(['pool_id'], ['pool.id'],
|
||||
name='fk_health_monitor_pool_id'),
|
||||
sa.ForeignKeyConstraint(
|
||||
[u'type'], [u'health_monitor_type.name'],
|
||||
name=u'fk_health_monitor_health_monitor_type_name')
|
||||
['type'], ['health_monitor_type.name'],
|
||||
name='fk_health_monitor_health_monitor_type_name')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'session_persistence',
|
||||
sa.Column(u'pool_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'type', sa.String(16), nullable=False),
|
||||
sa.Column(u'cookie_name', sa.String(255), nullable=True),
|
||||
'session_persistence',
|
||||
sa.Column('pool_id', sa.String(36), nullable=False),
|
||||
sa.Column('type', sa.String(16), nullable=False),
|
||||
sa.Column('cookie_name', sa.String(255), nullable=True),
|
||||
sa.ForeignKeyConstraint(
|
||||
[u'type'], [u'session_persistence_type.name'],
|
||||
name=u'fk_session_persistence_session_persistence_type_name'),
|
||||
sa.ForeignKeyConstraint([u'pool_id'], [u'pool.id'],
|
||||
name=u'fk_session_persistence_pool_id'),
|
||||
sa.PrimaryKeyConstraint(u'pool_id')
|
||||
['type'], ['session_persistence_type.name'],
|
||||
name='fk_session_persistence_session_persistence_type_name'),
|
||||
sa.ForeignKeyConstraint(['pool_id'], ['pool.id'],
|
||||
name='fk_session_persistence_pool_id'),
|
||||
sa.PrimaryKeyConstraint('pool_id')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'member',
|
||||
sa.Column(u'tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'pool_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'address', sa.String(64), nullable=False),
|
||||
sa.Column(u'protocol_port', sa.Integer(), nullable=False),
|
||||
sa.Column(u'weight', sa.Integer(), nullable=True),
|
||||
sa.Column(u'operating_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.ForeignKeyConstraint([u'pool_id'], [u'pool.id'],
|
||||
name=u'fk_member_pool_id'),
|
||||
sa.ForeignKeyConstraint([u'operating_status'],
|
||||
[u'operating_status.name'],
|
||||
name=u'fk_member_operating_status_name'),
|
||||
sa.UniqueConstraint(u'pool_id', u'address', u'protocol_port',
|
||||
name=u'uq_member_pool_id_address_protocol_port')
|
||||
'member',
|
||||
sa.Column('tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('pool_id', sa.String(36), nullable=False),
|
||||
sa.Column('subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column('address', sa.String(64), nullable=False),
|
||||
sa.Column('protocol_port', sa.Integer(), nullable=False),
|
||||
sa.Column('weight', sa.Integer(), nullable=True),
|
||||
sa.Column('operating_status', sa.String(16), nullable=False),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(['pool_id'], ['pool.id'],
|
||||
name='fk_member_pool_id'),
|
||||
sa.ForeignKeyConstraint(['operating_status'],
|
||||
['operating_status.name'],
|
||||
name='fk_member_operating_status_name'),
|
||||
sa.UniqueConstraint('pool_id', 'address', 'protocol_port',
|
||||
name='uq_member_pool_id_address_protocol_port')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'load_balancer',
|
||||
sa.Column(u'tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'provisioning_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'operating_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
'load_balancer',
|
||||
sa.Column('tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=True),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('provisioning_status', sa.String(16), nullable=False),
|
||||
sa.Column('operating_status', sa.String(16), nullable=False),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(
|
||||
[u'provisioning_status'], [u'provisioning_status.name'],
|
||||
name=u'fk_load_balancer_provisioning_status_name'),
|
||||
sa.ForeignKeyConstraint([u'operating_status'],
|
||||
[u'operating_status.name'],
|
||||
name=u'fk_load_balancer_operating_status_name')
|
||||
['provisioning_status'], ['provisioning_status.name'],
|
||||
name='fk_load_balancer_provisioning_status_name'),
|
||||
sa.ForeignKeyConstraint(['operating_status'],
|
||||
['operating_status.name'],
|
||||
name='fk_load_balancer_operating_status_name')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'vip',
|
||||
sa.Column(u'load_balancer_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'ip_address', sa.String(36), nullable=True),
|
||||
sa.Column(u'net_port_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'floating_ip_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'floating_ip_network_id', sa.String(36), nullable=True),
|
||||
sa.PrimaryKeyConstraint(u'load_balancer_id'),
|
||||
sa.ForeignKeyConstraint([u'load_balancer_id'], [u'load_balancer.id'],
|
||||
name=u'fk_vip_load_balancer_id')
|
||||
'vip',
|
||||
sa.Column('load_balancer_id', sa.String(36), nullable=False),
|
||||
sa.Column('ip_address', sa.String(36), nullable=True),
|
||||
sa.Column('net_port_id', sa.String(36), nullable=True),
|
||||
sa.Column('subnet_id', sa.String(36), nullable=True),
|
||||
sa.Column('floating_ip_id', sa.String(36), nullable=True),
|
||||
sa.Column('floating_ip_network_id', sa.String(36), nullable=True),
|
||||
sa.PrimaryKeyConstraint('load_balancer_id'),
|
||||
sa.ForeignKeyConstraint(['load_balancer_id'], ['load_balancer.id'],
|
||||
name='fk_vip_load_balancer_id')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'listener',
|
||||
sa.Column(u'tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'protocol', sa.String(16), nullable=False),
|
||||
sa.Column(u'protocol_port', sa.Integer(), nullable=False),
|
||||
sa.Column(u'connection_limit', sa.Integer(), nullable=True),
|
||||
sa.Column(u'load_balancer_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'tls_certificate_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'default_pool_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'provisioning_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'operating_status', sa.String(16), nullable=False),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.ForeignKeyConstraint([u'load_balancer_id'], [u'load_balancer.id'],
|
||||
name=u'fk_listener_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint([u'default_pool_id'], [u'pool.id'],
|
||||
name=u'fk_listener_pool_id'),
|
||||
sa.ForeignKeyConstraint([u'protocol'], [u'protocol.name'],
|
||||
name=u'fk_listener_protocol_name'),
|
||||
sa.ForeignKeyConstraint([u'provisioning_status'],
|
||||
[u'provisioning_status.name'],
|
||||
name=u'fk_listener_provisioning_status_name'),
|
||||
sa.ForeignKeyConstraint([u'operating_status'],
|
||||
[u'operating_status.name'],
|
||||
name=u'fk_listener_operating_status_name'),
|
||||
sa.UniqueConstraint(u'default_pool_id',
|
||||
name=u'uq_listener_default_pool_id'),
|
||||
'listener',
|
||||
sa.Column('tenant_id', sa.String(255), nullable=True),
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=True),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('protocol', sa.String(16), nullable=False),
|
||||
sa.Column('protocol_port', sa.Integer(), nullable=False),
|
||||
sa.Column('connection_limit', sa.Integer(), nullable=True),
|
||||
sa.Column('load_balancer_id', sa.String(36), nullable=True),
|
||||
sa.Column('tls_certificate_id', sa.String(36), nullable=True),
|
||||
sa.Column('default_pool_id', sa.String(36), nullable=True),
|
||||
sa.Column('provisioning_status', sa.String(16), nullable=False),
|
||||
sa.Column('operating_status', sa.String(16), nullable=False),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['load_balancer_id'], ['load_balancer.id'],
|
||||
name='fk_listener_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint(['default_pool_id'], ['pool.id'],
|
||||
name='fk_listener_pool_id'),
|
||||
sa.ForeignKeyConstraint(['protocol'], ['protocol.name'],
|
||||
name='fk_listener_protocol_name'),
|
||||
sa.ForeignKeyConstraint(['provisioning_status'],
|
||||
['provisioning_status.name'],
|
||||
name='fk_listener_provisioning_status_name'),
|
||||
sa.ForeignKeyConstraint(['operating_status'],
|
||||
['operating_status.name'],
|
||||
name='fk_listener_operating_status_name'),
|
||||
sa.UniqueConstraint('default_pool_id',
|
||||
name='uq_listener_default_pool_id'),
|
||||
sa.UniqueConstraint(
|
||||
u'load_balancer_id', u'protocol_port',
|
||||
name=u'uq_listener_load_balancer_id_protocol_port'),
|
||||
sa.PrimaryKeyConstraint(u'id')
|
||||
'load_balancer_id', 'protocol_port',
|
||||
name='uq_listener_load_balancer_id_protocol_port'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'sni',
|
||||
sa.Column(u'listener_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'tls_container_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'position', sa.Integer, nullable=True),
|
||||
sa.ForeignKeyConstraint([u'listener_id'], [u'listener.id'],
|
||||
name=u'fk_sni_listener_id'),
|
||||
sa.PrimaryKeyConstraint(u'listener_id', u'tls_container_id')
|
||||
'sni',
|
||||
sa.Column('listener_id', sa.String(36), nullable=False),
|
||||
sa.Column('tls_container_id', sa.String(36), nullable=False),
|
||||
sa.Column('position', sa.Integer, nullable=True),
|
||||
sa.ForeignKeyConstraint(['listener_id'], ['listener.id'],
|
||||
name='fk_sni_listener_id'),
|
||||
sa.PrimaryKeyConstraint('listener_id', 'tls_container_id')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'listener_statistics',
|
||||
sa.Column(u'listener_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'bytes_in', sa.BigInteger(), nullable=False),
|
||||
sa.Column(u'bytes_out', sa.BigInteger(), nullable=False),
|
||||
sa.Column(u'active_connections', sa.Integer(), nullable=False),
|
||||
sa.Column(u'total_connections', sa.BigInteger(), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'listener_id'),
|
||||
sa.ForeignKeyConstraint([u'listener_id'], [u'listener.id'],
|
||||
name=u'fk_listener_statistics_listener_id')
|
||||
'listener_statistics',
|
||||
sa.Column('listener_id', sa.String(36), nullable=False),
|
||||
sa.Column('bytes_in', sa.BigInteger(), nullable=False),
|
||||
sa.Column('bytes_out', sa.BigInteger(), nullable=False),
|
||||
sa.Column('active_connections', sa.Integer(), nullable=False),
|
||||
sa.Column('total_connections', sa.BigInteger(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('listener_id'),
|
||||
sa.ForeignKeyConstraint(['listener_id'], ['listener.id'],
|
||||
name='fk_listener_statistics_listener_id')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'amphora',
|
||||
'amphora',
|
||||
# id should come from the service providing the amphora (i.e. nova)
|
||||
sa.Column(u'id', sa.String(36), nullable=False, autoincrement=False),
|
||||
sa.Column(u'host_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'status', sa.String(36), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.Column('id', sa.String(36), nullable=False, autoincrement=False),
|
||||
sa.Column('host_id', sa.String(36), nullable=False),
|
||||
sa.Column('status', sa.String(36), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(
|
||||
[u'status'], [u'provisioning_status.name'],
|
||||
name=u'fk_container_provisioning_status_name')
|
||||
['status'], ['provisioning_status.name'],
|
||||
name='fk_container_provisioning_status_name')
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'load_balancer_amphora',
|
||||
sa.Column(u'amphora_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'load_balancer_id', sa.String(36), nullable=False),
|
||||
'load_balancer_amphora',
|
||||
sa.Column('amphora_id', sa.String(36), nullable=False),
|
||||
sa.Column('load_balancer_id', sa.String(36), nullable=False),
|
||||
sa.ForeignKeyConstraint(
|
||||
[u'load_balancer_id'], [u'load_balancer.id'],
|
||||
name=u'fk_load_balancer_amphora_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint([u'amphora_id'],
|
||||
[u'amphora.id'],
|
||||
name=u'fk_load_balancer_amphora_id'),
|
||||
sa.PrimaryKeyConstraint(u'amphora_id', u'load_balancer_id')
|
||||
['load_balancer_id'], ['load_balancer.id'],
|
||||
name='fk_load_balancer_amphora_load_balancer_id'),
|
||||
sa.ForeignKeyConstraint(['amphora_id'],
|
||||
['amphora.id'],
|
||||
name='fk_load_balancer_amphora_id'),
|
||||
sa.PrimaryKeyConstraint('amphora_id', 'load_balancer_id')
|
||||
)
|
||||
|
@ -34,9 +34,9 @@ def upgrade():
|
||||
for table in tables:
|
||||
op.add_column(
|
||||
table,
|
||||
sa.Column(u'created_at', sa.DateTime(), nullable=True)
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
table,
|
||||
sa.Column(u'updated_at', sa.DateTime(), nullable=True)
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ def upgrade():
|
||||
pk = inspector.get_pk_constraint('spares_pool')
|
||||
if not pk['constrained_columns']:
|
||||
op.create_primary_key(
|
||||
u'pk_spares_pool', u'spares_pool', [u'updated_at'])
|
||||
'pk_spares_pool', 'spares_pool', ['updated_at'])
|
||||
else:
|
||||
# Revision '46d914b2a5e5' has been updated to create the
|
||||
# missing PK. Depending whether the env is already deployed or
|
||||
|
@ -29,5 +29,5 @@ down_revision = '4faaa983e7a9'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'amphora', u'host_id', new_column_name='compute_id',
|
||||
op.alter_column('amphora', 'host_id', new_column_name='compute_id',
|
||||
existing_type=sa.String(36), nullable=True)
|
||||
|
@ -29,7 +29,7 @@ down_revision = '92fe9857279'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora',
|
||||
sa.Column(u'vrrp_ip', sa.String(64), nullable=True))
|
||||
op.add_column(u'amphora',
|
||||
sa.Column(u'ha_ip', sa.String(64), nullable=True))
|
||||
op.add_column('amphora',
|
||||
sa.Column('vrrp_ip', sa.String(64), nullable=True))
|
||||
op.add_column('amphora',
|
||||
sa.Column('ha_ip', sa.String(64), nullable=True))
|
||||
|
@ -29,17 +29,17 @@ down_revision = '44a2414dd683'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'quotas',
|
||||
sa.Column(u'project_id', sa.String(36), primary_key=True,
|
||||
'quotas',
|
||||
sa.Column('project_id', sa.String(36), primary_key=True,
|
||||
nullable=False),
|
||||
sa.Column(u'health_monitor', sa.Integer(), nullable=True),
|
||||
sa.Column(u'load_balancer', sa.Integer(), nullable=True),
|
||||
sa.Column(u'listener', sa.Integer(), nullable=True),
|
||||
sa.Column(u'member', sa.Integer(), nullable=True),
|
||||
sa.Column(u'pool', sa.Integer(), nullable=True),
|
||||
sa.Column(u'in_use_health_monitor', sa.Integer(), nullable=True),
|
||||
sa.Column(u'in_use_load_balancer', sa.Integer(), nullable=True),
|
||||
sa.Column(u'in_use_listener', sa.Integer(), nullable=True),
|
||||
sa.Column(u'in_use_member', sa.Integer(), nullable=True),
|
||||
sa.Column(u'in_use_pool', sa.Integer(), nullable=True),
|
||||
sa.Column('health_monitor', sa.Integer(), nullable=True),
|
||||
sa.Column('load_balancer', sa.Integer(), nullable=True),
|
||||
sa.Column('listener', sa.Integer(), nullable=True),
|
||||
sa.Column('member', sa.Integer(), nullable=True),
|
||||
sa.Column('pool', sa.Integer(), nullable=True),
|
||||
sa.Column('in_use_health_monitor', sa.Integer(), nullable=True),
|
||||
sa.Column('in_use_load_balancer', sa.Integer(), nullable=True),
|
||||
sa.Column('in_use_listener', sa.Integer(), nullable=True),
|
||||
sa.Column('in_use_member', sa.Integer(), nullable=True),
|
||||
sa.Column('in_use_pool', sa.Integer(), nullable=True),
|
||||
)
|
||||
|
@ -30,14 +30,14 @@ down_revision = '6abb04f24c5'
|
||||
|
||||
def upgrade():
|
||||
op.drop_constraint(
|
||||
u'fk_pool_algorithm_name', u'pool',
|
||||
type_=u'foreignkey'
|
||||
'fk_pool_algorithm_name', 'pool',
|
||||
type_='foreignkey'
|
||||
)
|
||||
op.alter_column(u'algorithm', u'name', nullable=False,
|
||||
op.alter_column('algorithm', 'name', nullable=False,
|
||||
existing_type=sa.String(255))
|
||||
op.alter_column(u'pool', u'lb_algorithm', nullable=False,
|
||||
op.alter_column('pool', 'lb_algorithm', nullable=False,
|
||||
existing_type=sa.String(255))
|
||||
op.create_foreign_key(
|
||||
u'fk_pool_algorithm_name', u'pool',
|
||||
u'algorithm', [u'lb_algorithm'], [u'name']
|
||||
'fk_pool_algorithm_name', 'pool',
|
||||
'algorithm', ['lb_algorithm'], ['name']
|
||||
)
|
||||
|
@ -28,5 +28,5 @@ down_revision = '3f8ff3be828e'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'vip',
|
||||
sa.Column(u'network_id', sa.String(36), nullable=True))
|
||||
op.add_column('vip',
|
||||
sa.Column('network_id', sa.String(36), nullable=True))
|
||||
|
@ -35,5 +35,5 @@ def upgrade():
|
||||
for table in tables:
|
||||
op.add_column(
|
||||
table,
|
||||
sa.Column(u'name', sa.String(255), nullable=True)
|
||||
sa.Column('name', sa.String(255), nullable=True)
|
||||
)
|
||||
|
@ -32,16 +32,16 @@ down_revision = '29ff921a6eb'
|
||||
def upgrade():
|
||||
# L7 Rule Types
|
||||
op.create_table(
|
||||
u'l7rule_type',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'l7rule_type',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
# Create temporary table for table data seeding
|
||||
insert_table = sql.table(
|
||||
u'l7rule_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'l7rule_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -57,15 +57,15 @@ def upgrade():
|
||||
|
||||
# L7 Rule Compare Types
|
||||
op.create_table(
|
||||
u'l7rule_compare_type',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'l7rule_compare_type',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'l7rule_compare_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'l7rule_compare_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -81,15 +81,15 @@ def upgrade():
|
||||
|
||||
# L7 Policy Actions
|
||||
op.create_table(
|
||||
u'l7policy_action',
|
||||
sa.Column(u'name', sa.String(36), primary_key=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True)
|
||||
'l7policy_action',
|
||||
sa.Column('name', sa.String(36), primary_key=True),
|
||||
sa.Column('description', sa.String(255), nullable=True)
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'l7policy_action',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'l7policy_action',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -103,47 +103,47 @@ def upgrade():
|
||||
|
||||
# L7 Policies
|
||||
op.create_table(
|
||||
u'l7policy',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=True),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'listener_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'action', sa.String(36), nullable=False),
|
||||
sa.Column(u'redirect_pool_id', sa.String(36), nullable=True),
|
||||
sa.Column(u'redirect_url', sa.String(255), nullable=True),
|
||||
sa.Column(u'position', sa.Integer, nullable=False),
|
||||
sa.Column(u'enabled', sa.Boolean(), default=True, nullable=False),
|
||||
'l7policy',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=True),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('listener_id', sa.String(36), nullable=False),
|
||||
sa.Column('action', sa.String(36), nullable=False),
|
||||
sa.Column('redirect_pool_id', sa.String(36), nullable=True),
|
||||
sa.Column('redirect_url', sa.String(255), nullable=True),
|
||||
sa.Column('position', sa.Integer, nullable=False),
|
||||
sa.Column('enabled', sa.Boolean(), default=True, nullable=False),
|
||||
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.ForeignKeyConstraint([u'listener_id'],
|
||||
[u'listener.id'],
|
||||
name=u'fk_l7policy_listener_id'),
|
||||
sa.ForeignKeyConstraint([u'redirect_pool_id'],
|
||||
[u'pool.id'],
|
||||
name=u'fk_l7policy_pool_id'),
|
||||
sa.ForeignKeyConstraint([u'action'],
|
||||
[u'l7policy_action.name'],
|
||||
name=u'fk_l7policy_l7policy_action_name')
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(['listener_id'],
|
||||
['listener.id'],
|
||||
name='fk_l7policy_listener_id'),
|
||||
sa.ForeignKeyConstraint(['redirect_pool_id'],
|
||||
['pool.id'],
|
||||
name='fk_l7policy_pool_id'),
|
||||
sa.ForeignKeyConstraint(['action'],
|
||||
['l7policy_action.name'],
|
||||
name='fk_l7policy_l7policy_action_name')
|
||||
)
|
||||
|
||||
# L7 Rules
|
||||
op.create_table(
|
||||
u'l7rule',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'l7policy_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'type', sa.String(36), nullable=False),
|
||||
sa.Column(u'compare_type', sa.String(36), nullable=False),
|
||||
sa.Column(u'key', sa.String(255), nullable=True),
|
||||
sa.Column(u'value', sa.String(255), nullable=False),
|
||||
sa.Column(u'invert', sa.Boolean(), default=False, nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.ForeignKeyConstraint([u'l7policy_id'],
|
||||
[u'l7policy.id'],
|
||||
name=u'fk_l7rule_l7policy_id'),
|
||||
sa.ForeignKeyConstraint([u'type'],
|
||||
[u'l7rule_type.name'],
|
||||
name=u'fk_l7rule_l7rule_type_name'),
|
||||
sa.ForeignKeyConstraint([u'compare_type'],
|
||||
[u'l7rule_compare_type.name'],
|
||||
name=u'fk_l7rule_l7rule_compare_type_name')
|
||||
'l7rule',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('l7policy_id', sa.String(36), nullable=False),
|
||||
sa.Column('type', sa.String(36), nullable=False),
|
||||
sa.Column('compare_type', sa.String(36), nullable=False),
|
||||
sa.Column('key', sa.String(255), nullable=True),
|
||||
sa.Column('value', sa.String(255), nullable=False),
|
||||
sa.Column('invert', sa.Boolean(), default=False, nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.ForeignKeyConstraint(['l7policy_id'],
|
||||
['l7policy.id'],
|
||||
name='fk_l7rule_l7policy_id'),
|
||||
sa.ForeignKeyConstraint(['type'],
|
||||
['l7rule_type.name'],
|
||||
name='fk_l7rule_l7rule_type_name'),
|
||||
sa.ForeignKeyConstraint(['compare_type'],
|
||||
['l7rule_compare_type.name'],
|
||||
name='fk_l7rule_l7rule_compare_type_name')
|
||||
)
|
||||
|
@ -34,8 +34,8 @@ down_revision = '6ffc710674ef'
|
||||
def upgrade():
|
||||
# Create temporary table for table data seeding
|
||||
insert_table = sa.table(
|
||||
u'spares_pool',
|
||||
sa.column(u'updated_at', sa.DateTime),
|
||||
'spares_pool',
|
||||
sa.column('updated_at', sa.DateTime),
|
||||
)
|
||||
|
||||
# Note: The date/time doesn't matter, we just need to seed the table.
|
||||
|
@ -32,9 +32,9 @@ down_revision = '3e5b37a0bdb9'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'provisioning_status',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'provisioning_status',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -30,18 +30,18 @@ down_revision = '35dee79d5865'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'load_balancer_id', sa.String(36),
|
||||
sa.ForeignKey(u'load_balancer.id',
|
||||
name=u'fk_amphora_load_balancer_id'),
|
||||
'amphora',
|
||||
sa.Column('load_balancer_id', sa.String(36),
|
||||
sa.ForeignKey('load_balancer.id',
|
||||
name='fk_amphora_load_balancer_id'),
|
||||
nullable=True)
|
||||
)
|
||||
op.drop_table(u'load_balancer_amphora')
|
||||
op.drop_table('load_balancer_amphora')
|
||||
op.drop_constraint(
|
||||
u'fk_container_provisioning_status_name', u'amphora',
|
||||
type_=u'foreignkey'
|
||||
'fk_container_provisioning_status_name', 'amphora',
|
||||
type_='foreignkey'
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_amphora_provisioning_status_name', u'amphora',
|
||||
u'provisioning_status', [u'status'], [u'name']
|
||||
'fk_amphora_provisioning_status_name', 'amphora',
|
||||
'provisioning_status', ['status'], ['name']
|
||||
)
|
||||
|
@ -31,6 +31,6 @@ down_revision = '80dba23a159f'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'amphora',
|
||||
sa.Column(u'compute_flavor', sa.String(255), nullable=True)
|
||||
'amphora',
|
||||
sa.Column('compute_flavor', sa.String(255), nullable=True)
|
||||
)
|
||||
|
@ -29,5 +29,5 @@ down_revision = '13500e2e978d'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'member', u'address', new_column_name=u'ip_address',
|
||||
op.alter_column('member', 'address', new_column_name='ip_address',
|
||||
existing_type=sa.String(64))
|
||||
|
@ -28,6 +28,6 @@ down_revision = '48660b6643f0'
|
||||
|
||||
|
||||
def upgrade():
|
||||
with op.batch_alter_table(u'vip') as batch_op:
|
||||
batch_op.alter_column(u'network_id', new_column_name=u'subnet_id',
|
||||
with op.batch_alter_table('vip') as batch_op:
|
||||
batch_op.alter_column('network_id', new_column_name='subnet_id',
|
||||
existing_type=sa.String(36))
|
||||
|
@ -32,24 +32,24 @@ down_revision = 'd85ca7258d21'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'health_monitor',
|
||||
sa.Column(u'created_at', sa.DateTime(), nullable=True)
|
||||
'health_monitor',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
u'health_monitor',
|
||||
sa.Column(u'updated_at', sa.DateTime(), nullable=True)
|
||||
'health_monitor',
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(u'health_monitor',
|
||||
sa.Column(u'operating_status',
|
||||
op.add_column('health_monitor',
|
||||
sa.Column('operating_status',
|
||||
sa.String(16),
|
||||
nullable=False,
|
||||
server_default=constants.ONLINE)
|
||||
)
|
||||
op.alter_column(u'health_monitor', u'operating_status',
|
||||
op.alter_column('health_monitor', 'operating_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_health_monitor_operating_status_name', u'health_monitor',
|
||||
u'operating_status', [u'operating_status'], [u'name']
|
||||
'fk_health_monitor_operating_status_name', 'health_monitor',
|
||||
'operating_status', ['operating_status'], ['name']
|
||||
)
|
||||
|
@ -33,9 +33,9 @@ new_protocol = 'PROXY'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'protocol',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'protocol',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -28,5 +28,5 @@ down_revision = '2351ea316465'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora_health',
|
||||
sa.Column(u'busy', sa.Boolean(), nullable=False))
|
||||
op.add_column('amphora_health',
|
||||
sa.Column('busy', sa.Boolean(), nullable=False))
|
||||
|
@ -32,13 +32,13 @@ down_revision = '76aacf2e176c'
|
||||
def upgrade():
|
||||
# Add column redirect_prefix
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'redirect_prefix', sa.String(255), nullable=True)
|
||||
'l7policy',
|
||||
sa.Column('redirect_prefix', sa.String(255), nullable=True)
|
||||
)
|
||||
insert_table = sql.table(
|
||||
u'l7policy_action',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'l7policy_action',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -28,10 +28,10 @@ down_revision = '3b199c848b96'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora',
|
||||
sa.Column(u'cert_expiration', sa.DateTime(timezone=True),
|
||||
op.add_column('amphora',
|
||||
sa.Column('cert_expiration', sa.DateTime(timezone=True),
|
||||
nullable=True)
|
||||
)
|
||||
|
||||
op.add_column(u'amphora', sa.Column(u'cert_busy', sa.Boolean(),
|
||||
nullable=False, default=False))
|
||||
op.add_column('amphora', sa.Column('cert_busy', sa.Boolean(),
|
||||
nullable=False, default=False))
|
||||
|
@ -29,5 +29,5 @@ down_revision = '36b94648fef8'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'sni', u'tls_container_id', type_=sa.String(128),
|
||||
op.alter_column('sni', 'tls_container_id', type_=sa.String(128),
|
||||
existing_type=sa.String(36), nullable=False)
|
||||
|
@ -31,6 +31,6 @@ down_revision = 'a7f187cd221f'
|
||||
def upgrade():
|
||||
# Add column redirect_prefix
|
||||
op.add_column(
|
||||
u'l7policy',
|
||||
sa.Column(u'redirect_http_code', sa.Integer(), nullable=True)
|
||||
'l7policy',
|
||||
sa.Column('redirect_http_code', sa.Integer(), nullable=True)
|
||||
)
|
||||
|
@ -32,9 +32,9 @@ new_protocol = 'PROMETHEUS'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'protocol',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'protocol',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -30,6 +30,6 @@ down_revision = '7432f1d4ea83'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'spares_pool',
|
||||
sa.Column(u'updated_at', sa.DateTime(), primary_key=True,
|
||||
'spares_pool',
|
||||
sa.Column('updated_at', sa.DateTime(), primary_key=True,
|
||||
server_default=sa.func.current_timestamp()))
|
||||
|
@ -30,10 +30,10 @@ down_revision = '6742ca1b27c2'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'health_monitor',
|
||||
sa.Column(u'http_version', sa.Float(), nullable=True)
|
||||
'health_monitor',
|
||||
sa.Column('http_version', sa.Float(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
u'health_monitor',
|
||||
sa.Column(u'domain_name', sa.String(255), nullable=True)
|
||||
'health_monitor',
|
||||
sa.Column('domain_name', sa.String(255), nullable=True)
|
||||
)
|
||||
|
@ -30,7 +30,7 @@ down_revision = 'a1f689aecc1d'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'pool', sa.Column(u'ca_tls_certificate_id', sa.String(255),
|
||||
nullable=True))
|
||||
op.add_column(u'pool', sa.Column(u'crl_container_id', sa.String(255),
|
||||
nullable=True))
|
||||
op.add_column('pool', sa.Column('ca_tls_certificate_id', sa.String(255),
|
||||
nullable=True))
|
||||
op.add_column('pool', sa.Column('crl_container_id', sa.String(255),
|
||||
nullable=True))
|
||||
|
@ -30,7 +30,7 @@ from sqlalchemy import sql
|
||||
revision = '76aacf2e176c'
|
||||
down_revision = 'ebbcc72b4e5e'
|
||||
|
||||
tables = [u'protocol', u'health_monitor_type']
|
||||
tables = ['protocol', 'health_monitor_type']
|
||||
new_fields = ['UDP', 'UDP-CONNECT']
|
||||
|
||||
|
||||
@ -40,8 +40,8 @@ def upgrade():
|
||||
for table, new_field in zip(tables, new_fields):
|
||||
insert_table = sql.table(
|
||||
table,
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -29,9 +29,9 @@ down_revision = '55874a4ceed6'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'tags',
|
||||
sa.Column(u'resource_id', sa.String(36), primary_key=True,
|
||||
'tags',
|
||||
sa.Column('resource_id', sa.String(36), primary_key=True,
|
||||
nullable=False),
|
||||
sa.Column(u'tag', sa.String(255), primary_key=True, nullable=False,
|
||||
sa.Column('tag', sa.String(255), primary_key=True, nullable=False,
|
||||
index=True),
|
||||
)
|
||||
|
@ -29,5 +29,5 @@ down_revision = '4a6ec0ab7284'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'vip', u'ip_address',
|
||||
op.alter_column('vip', 'ip_address',
|
||||
existing_type=sa.String(64))
|
||||
|
@ -29,13 +29,13 @@ down_revision = 'c761c8a71579'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'load_balancer',
|
||||
sa.Column(u'availability_zone',
|
||||
op.add_column('load_balancer',
|
||||
sa.Column('availability_zone',
|
||||
sa.String(255),
|
||||
nullable=True)
|
||||
)
|
||||
|
||||
op.create_foreign_key(
|
||||
u'fk_load_balancer_availability_zone_name', u'load_balancer',
|
||||
u'availability_zone', [u'availability_zone'], [u'name']
|
||||
'fk_load_balancer_availability_zone_name', 'load_balancer',
|
||||
'availability_zone', ['availability_zone'], ['name']
|
||||
)
|
||||
|
@ -34,8 +34,8 @@ def upgrade():
|
||||
for table in ['protocol', 'health_monitor_type']:
|
||||
insert_table = sql.table(
|
||||
table,
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -29,5 +29,5 @@ down_revision = '186509101b9b'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.alter_column(u'sni', u'tls_container_id', type_=sa.String(128),
|
||||
op.alter_column('sni', 'tls_container_id', type_=sa.String(128),
|
||||
existing_type=sa.String(36), nullable=False)
|
||||
|
@ -29,10 +29,10 @@ down_revision = '256852d5ff7c'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'amphora_health',
|
||||
sa.Column(u'amphora_id', sa.String(36), nullable=False,
|
||||
'amphora_health',
|
||||
sa.Column('amphora_id', sa.String(36), nullable=False,
|
||||
primary_key=True),
|
||||
sa.Column(u'last_update', sa.DateTime(timezone=True),
|
||||
sa.Column('last_update', sa.DateTime(timezone=True),
|
||||
nullable=False)
|
||||
|
||||
)
|
||||
|
@ -36,8 +36,8 @@ def upgrade():
|
||||
nullable=True)
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_health_monitor_provisioning_status_name', u'health_monitor',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_health_monitor_provisioning_status_name', 'health_monitor',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.add_column('l7policy',
|
||||
@ -46,8 +46,8 @@ def upgrade():
|
||||
nullable=True)
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_l7policy_provisioning_status_name', u'l7policy',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_l7policy_provisioning_status_name', 'l7policy',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.add_column('l7rule',
|
||||
@ -56,8 +56,8 @@ def upgrade():
|
||||
nullable=True)
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_l7rule_provisioning_status_name', u'l7rule',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_l7rule_provisioning_status_name', 'l7rule',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.add_column('member',
|
||||
@ -66,8 +66,8 @@ def upgrade():
|
||||
nullable=True)
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_member_provisioning_status_name', u'member',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_member_provisioning_status_name', 'member',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
||||
op.add_column('pool',
|
||||
@ -76,6 +76,6 @@ def upgrade():
|
||||
nullable=True)
|
||||
)
|
||||
op.create_foreign_key(
|
||||
u'fk_pool_provisioning_status_name', u'pool',
|
||||
u'provisioning_status', [u'provisioning_status'], [u'name']
|
||||
'fk_pool_provisioning_status_name', 'pool',
|
||||
'provisioning_status', ['provisioning_status'], ['name']
|
||||
)
|
||||
|
@ -31,5 +31,5 @@ down_revision = '1afc932f1ca2'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'pool', sa.Column(u'tls_certificate_id', sa.String(255),
|
||||
nullable=True))
|
||||
op.add_column('pool', sa.Column('tls_certificate_id', sa.String(255),
|
||||
nullable=True))
|
||||
|
@ -31,7 +31,7 @@ down_revision = '74aae261694c'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'pool',
|
||||
sa.Column(u'tls_enabled', sa.Boolean(),
|
||||
op.add_column('pool',
|
||||
sa.Column('tls_enabled', sa.Boolean(),
|
||||
server_default=sa.sql.expression.false(),
|
||||
nullable=False))
|
||||
|
@ -31,23 +31,23 @@ down_revision = '4f65b4f91c39'
|
||||
def upgrade():
|
||||
|
||||
op.create_table(
|
||||
u'flavor_profile',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'provider_name', sa.String(255), nullable=False),
|
||||
sa.Column(u'flavor_data', sa.String(4096), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'))
|
||||
'flavor_profile',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('provider_name', sa.String(255), nullable=False),
|
||||
sa.Column('flavor_data', sa.String(4096), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'))
|
||||
|
||||
op.create_table(
|
||||
u'flavor',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column(u'flavor_profile_id', sa.String(36), nullable=False),
|
||||
sa.ForeignKeyConstraint([u'flavor_profile_id'],
|
||||
[u'flavor_profile.id'],
|
||||
name=u'fk_flavor_flavor_profile_id'),
|
||||
sa.PrimaryKeyConstraint(u'id'),
|
||||
sa.UniqueConstraint(u'name',
|
||||
name=u'uq_flavor_name'),)
|
||||
'flavor',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column('flavor_profile_id', sa.String(36), nullable=False),
|
||||
sa.ForeignKeyConstraint(['flavor_profile_id'],
|
||||
['flavor_profile.id'],
|
||||
name='fk_flavor_flavor_profile_id'),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('name',
|
||||
name='uq_flavor_name'),)
|
||||
|
@ -30,5 +30,5 @@ down_revision = '034756a182a2'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'member', sa.Column(u'backup', sa.Boolean(),
|
||||
nullable=False, default=False))
|
||||
op.add_column('member', sa.Column('backup', sa.Boolean(),
|
||||
nullable=False, default=False))
|
||||
|
@ -29,5 +29,5 @@ down_revision = '4aeb9e23ad43'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'amphora', sa.Column(u'cached_zone', sa.String(255),
|
||||
nullable=True))
|
||||
op.add_column('amphora', sa.Column('cached_zone', sa.String(255),
|
||||
nullable=True))
|
||||
|
@ -32,12 +32,12 @@ down_revision = 'e37941b010db'
|
||||
|
||||
def upgrade():
|
||||
azp_table = op.create_table(
|
||||
u'availability_zone_profile',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'provider_name', sa.String(255), nullable=False),
|
||||
sa.Column(u'availability_zone_data', sa.String(4096), nullable=False),
|
||||
sa.PrimaryKeyConstraint(u'id'))
|
||||
'availability_zone_profile',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('provider_name', sa.String(255), nullable=False),
|
||||
sa.Column('availability_zone_data', sa.String(4096), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id'))
|
||||
|
||||
op.bulk_insert(
|
||||
azp_table,
|
||||
@ -48,16 +48,16 @@ def upgrade():
|
||||
)
|
||||
|
||||
az_table = op.create_table(
|
||||
u'availability_zone',
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column(u'availability_zone_profile_id', sa.String(36),
|
||||
'availability_zone',
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column('availability_zone_profile_id', sa.String(36),
|
||||
nullable=False),
|
||||
sa.ForeignKeyConstraint([u'availability_zone_profile_id'],
|
||||
[u'availability_zone_profile.id'],
|
||||
name=u'fk_az_az_profile_id'),
|
||||
sa.PrimaryKeyConstraint(u'name'),)
|
||||
sa.ForeignKeyConstraint(['availability_zone_profile_id'],
|
||||
['availability_zone_profile.id'],
|
||||
name='fk_az_az_profile_id'),
|
||||
sa.PrimaryKeyConstraint('name'),)
|
||||
|
||||
op.bulk_insert(
|
||||
az_table,
|
||||
|
@ -33,39 +33,39 @@ down_revision = '034b2dc2f3e0'
|
||||
def upgrade():
|
||||
# Add timing data
|
||||
op.add_column(
|
||||
u'l7rule',
|
||||
sa.Column(u'created_at', sa.DateTime(), nullable=True)
|
||||
'l7rule',
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
op.add_column(
|
||||
u'l7rule',
|
||||
sa.Column(u'updated_at', sa.DateTime(), nullable=True)
|
||||
'l7rule',
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True)
|
||||
)
|
||||
|
||||
# Add project_id
|
||||
op.add_column(
|
||||
u'l7rule',
|
||||
sa.Column(u'project_id', sa.String(36), nullable=True)
|
||||
'l7rule',
|
||||
sa.Column('project_id', sa.String(36), nullable=True)
|
||||
)
|
||||
|
||||
# Add enabled
|
||||
op.add_column(
|
||||
u'l7rule',
|
||||
sa.Column(u'enabled', sa.Boolean(),
|
||||
'l7rule',
|
||||
sa.Column('enabled', sa.Boolean(),
|
||||
server_default=sa.sql.expression.true(),
|
||||
nullable=False)
|
||||
)
|
||||
|
||||
# Add new operating_status column, setting existing rows to ONLINE
|
||||
op.add_column(
|
||||
u'l7rule',
|
||||
sa.Column(u'operating_status', sa.String(16),
|
||||
'l7rule',
|
||||
sa.Column('operating_status', sa.String(16),
|
||||
nullable=False, server_default=constants.ONLINE)
|
||||
)
|
||||
# Remove the default, as we don't actually want one
|
||||
op.alter_column(u'l7rule', u'operating_status',
|
||||
op.alter_column('l7rule', 'operating_status',
|
||||
existing_type=sa.String(16), server_default=None)
|
||||
# Add the foreign key for operating_status_name
|
||||
op.create_foreign_key(
|
||||
u'fk_l7rule_operating_status_name', u'l7rule',
|
||||
u'operating_status', [u'operating_status'], [u'name']
|
||||
'fk_l7rule_operating_status_name', 'l7rule',
|
||||
'operating_status', ['operating_status'], ['name']
|
||||
)
|
||||
|
@ -29,12 +29,12 @@ down_revision = 'a5762a99609a'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'listener_cidr',
|
||||
sa.Column(u'listener_id', sa.String(36), nullable=False),
|
||||
sa.Column(u'cidr', sa.String(64), nullable=False),
|
||||
'listener_cidr',
|
||||
sa.Column('listener_id', sa.String(36), nullable=False),
|
||||
sa.Column('cidr', sa.String(64), nullable=False),
|
||||
|
||||
sa.ForeignKeyConstraint([u'listener_id'],
|
||||
[u'listener.id'],
|
||||
name=u'fk_listener_cidr_listener_id'),
|
||||
sa.PrimaryKeyConstraint(u'listener_id', u'cidr')
|
||||
sa.ForeignKeyConstraint(['listener_id'],
|
||||
['listener.id'],
|
||||
name='fk_listener_cidr_listener_id'),
|
||||
sa.PrimaryKeyConstraint('listener_id', 'cidr')
|
||||
)
|
||||
|
@ -55,8 +55,8 @@ def migrate_pools():
|
||||
|
||||
def upgrade():
|
||||
insert_table = sa.table(
|
||||
u'algorithm',
|
||||
sa.column(u'name', sa.String(255)),
|
||||
'algorithm',
|
||||
sa.column('name', sa.String(255)),
|
||||
)
|
||||
op.bulk_insert(
|
||||
insert_table,
|
||||
|
@ -32,11 +32,11 @@ down_revision = 'dcf88e59aae4'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'flavor_profile',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'provider_name', sa.String(255), nullable=False),
|
||||
sa.Column(u'flavor_data', sa.String(4096), nullable=False),
|
||||
'flavor_profile',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('provider_name', sa.String(255), nullable=False),
|
||||
sa.Column('flavor_data', sa.String(4096), nullable=False),
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -48,12 +48,12 @@ def upgrade():
|
||||
)
|
||||
|
||||
insert_table = sql.table(
|
||||
u'flavor',
|
||||
sa.Column(u'id', sa.String(36), nullable=False),
|
||||
sa.Column(u'name', sa.String(255), nullable=False),
|
||||
sa.Column(u'description', sa.String(255), nullable=True),
|
||||
sa.Column(u'enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column(u'flavor_profile_id', sa.String(36), nullable=False),
|
||||
'flavor',
|
||||
sa.Column('id', sa.String(36), nullable=False),
|
||||
sa.Column('name', sa.String(255), nullable=False),
|
||||
sa.Column('description', sa.String(255), nullable=True),
|
||||
sa.Column('enabled', sa.Boolean(), nullable=False),
|
||||
sa.Column('flavor_profile_id', sa.String(36), nullable=False),
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -31,9 +31,9 @@ down_revision = '27e54d00c3cd'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'health_monitor_type',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'health_monitor_type',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -30,9 +30,9 @@ down_revision = '2ab994dd3ec2'
|
||||
|
||||
def upgrade():
|
||||
insert_table = sql.table(
|
||||
u'protocol',
|
||||
sql.column(u'name', sa.String),
|
||||
sql.column(u'description', sa.String)
|
||||
'protocol',
|
||||
sql.column('name', sa.String),
|
||||
sql.column('description', sa.String)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
|
@ -29,6 +29,6 @@ down_revision = '0f242cf02c74'
|
||||
|
||||
def upgrade():
|
||||
op.add_column(
|
||||
u'vip',
|
||||
sa.Column(u'octavia_owned', sa.Boolean(), nullable=True)
|
||||
'vip',
|
||||
sa.Column('octavia_owned', sa.Boolean(), nullable=True)
|
||||
)
|
||||
|
@ -34,14 +34,14 @@ down_revision = '2ad093f6353f'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'client_authentication_mode',
|
||||
sa.Column(u'name', sa.String(10), primary_key=True),
|
||||
'client_authentication_mode',
|
||||
sa.Column('name', sa.String(10), primary_key=True),
|
||||
)
|
||||
|
||||
# Create temporary table for table data seeding
|
||||
insert_table = sa.table(
|
||||
u'client_authentication_mode',
|
||||
sa.column(u'name', sa.String),
|
||||
'client_authentication_mode',
|
||||
sa.column('name', sa.String),
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -54,8 +54,8 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.add_column(
|
||||
u'listener',
|
||||
sa.Column(u'client_authentication', sa.String(10),
|
||||
'listener',
|
||||
sa.Column('client_authentication', sa.String(10),
|
||||
sa.ForeignKey('client_authentication_mode.name'),
|
||||
server_default=constants.CLIENT_AUTH_NONE, nullable=False)
|
||||
)
|
||||
|
@ -31,16 +31,16 @@ down_revision = '443fe6676637'
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
u'amphora_build_slots',
|
||||
sa.Column(u'id', sa.Integer(), primary_key=True),
|
||||
sa.Column(u'slots_used', sa.Integer(), default=0)
|
||||
'amphora_build_slots',
|
||||
sa.Column('id', sa.Integer(), primary_key=True),
|
||||
sa.Column('slots_used', sa.Integer(), default=0)
|
||||
)
|
||||
|
||||
# Create temporary table for table data seeding
|
||||
insert_table = sql.table(
|
||||
u'amphora_build_slots',
|
||||
sql.column(u'id', sa.Integer),
|
||||
sql.column(u'slots_used', sa.Integer)
|
||||
'amphora_build_slots',
|
||||
sql.column('id', sa.Integer),
|
||||
sql.column('slots_used', sa.Integer)
|
||||
)
|
||||
|
||||
op.bulk_insert(
|
||||
@ -51,12 +51,12 @@ def upgrade():
|
||||
)
|
||||
|
||||
op.create_table(
|
||||
u'amphora_build_request',
|
||||
sa.Column(u'amphora_id', sa.String(36), nullable=True,
|
||||
'amphora_build_request',
|
||||
sa.Column('amphora_id', sa.String(36), nullable=True,
|
||||
primary_key=True),
|
||||
sa.Column(u'priority', sa.Integer()),
|
||||
sa.Column(u'created_time', sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column(u'status', sa.String(16), default='WAITING', nullable=False)
|
||||
sa.Column('priority', sa.Integer()),
|
||||
sa.Column('created_time', sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column('status', sa.String(16), default='WAITING', nullable=False)
|
||||
)
|
||||
|
||||
|
||||
|
@ -31,6 +31,6 @@ down_revision = 'f21ae3f21adc'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column(u'listener',
|
||||
sa.Column(u'client_crl_container_id', sa.String(255),
|
||||
op.add_column('listener',
|
||||
sa.Column('client_crl_container_id', sa.String(255),
|
||||
nullable=True))
|
||||
|
@ -185,7 +185,7 @@ class ListenerStatistics(base_models.BASE):
|
||||
self.total_connections += other.total_connections
|
||||
else:
|
||||
raise TypeError( # noqa: O342
|
||||
"unsupported operand type(s) for +=: '{0}' and '{1}'".format(
|
||||
"unsupported operand type(s) for +=: '{}' and '{}'".format(
|
||||
type(self), type(other)))
|
||||
|
||||
return self
|
||||
|
@ -49,7 +49,7 @@ CONF = cfg.CONF
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class BaseRepository(object):
|
||||
class BaseRepository:
|
||||
model_class = None
|
||||
|
||||
def count(self, session, **filters):
|
||||
@ -209,7 +209,7 @@ class BaseRepository(object):
|
||||
return id_list
|
||||
|
||||
|
||||
class Repositories(object):
|
||||
class Repositories:
|
||||
def __init__(self):
|
||||
self.load_balancer = LoadBalancerRepository()
|
||||
self.vip = VipRepository()
|
||||
@ -1943,7 +1943,7 @@ class QuotasRepository(BaseRepository):
|
||||
session.flush()
|
||||
|
||||
|
||||
class _GetALLExceptDELETEDIdMixin(object):
|
||||
class _GetALLExceptDELETEDIdMixin:
|
||||
|
||||
def get_all(self, session, pagination_helper=None,
|
||||
query_options=None, **filters):
|
||||
|
Loading…
Reference in New Issue
Block a user