from neutron.db import migration
+nvp_network_bindings_binding_type = sa.Enum(
+ 'flat', 'vlan', 'stt', 'gre', name='nvp_network_bindings_binding_type')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
op.create_table(
'nvp_network_bindings',
sa.Column('network_id', sa.String(length=36), nullable=False),
- sa.Column('binding_type',
- sa.Enum('flat', 'vlan', 'stt', 'gre',
- name='nvp_network_bindings_binding_type'),
+ sa.Column('binding_type', nvp_network_bindings_binding_type,
nullable=False),
sa.Column('tz_uuid', sa.String(length=36), nullable=True),
sa.Column('vlan_id', sa.Integer(), nullable=True),
return
op.drop_table('nvp_network_bindings')
+ nvp_network_bindings_binding_type.drop(op.get_bind(), checkfirst=False)
from neutron.db import migration
+net_conn_seg_type = sa.Enum('flat', 'vlan', name="net_conn_seg_type")
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
nullable=True),
sa.Column('network_id', sa.String(length=36),
nullable=True),
- sa.Column('segmentation_type',
- sa.Enum('flat', 'vlan',
- name="net_conn_seg_type"),
+ sa.Column('segmentation_type', net_conn_seg_type,
nullable=True),
sa.Column('segmentation_id', sa.Integer(),
nullable=True),
return
op.drop_table('networkconnections')
+ net_conn_seg_type.drop(op.get_bind(), checkfirst=False)
op.drop_table('networkgatewaydevices')
op.drop_table('networkgateways')
from neutron.db import migration
+firewallrules_action = sa.Enum('allow', 'deny', name='firewallrules_action')
+
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.drop_table('firewall_rules')
+ firewallrules_action.drop(op.get_bind(), checkfirst=False)
op.drop_table('firewalls')
op.drop_table('firewall_policies')
sa.Column('source_port_range_max', sa.Integer(), nullable=True),
sa.Column('destination_port_range_min', sa.Integer(), nullable=True),
sa.Column('destination_port_range_max', sa.Integer(), nullable=True),
- sa.Column('action',
- sa.Enum('allow', 'deny', name='firewallrules_action'),
- nullable=True),
+ sa.Column('action', firewallrules_action, nullable=True),
sa.Column('enabled', sa.Boolean(), autoincrement=False,
nullable=True),
sa.Column('position', sa.Integer(), autoincrement=False,
from alembic import op
import sqlalchemy as sa
+from sqlalchemy.dialects import postgresql
from neutron.db import migration
+def get_enum():
+ engine = op.get_bind().engine
+ # In PostgreSQL types created separately, so if type was already created in
+ # 1341ed32cc1e_nvp_netbinding_update it should be created one time.
+ # Use parameter create_type=False for that.
+ if engine.name == 'postgresql':
+ return postgresql.ENUM('flat', 'vlan', 'stt', 'gre', 'l3_ext',
+ name='nvp_network_bindings_binding_type',
+ create_type=False)
+ else:
+ return sa.Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
+ name='nvp_network_bindings_binding_type')
+
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.create_table('rename_nvp_network_bindings',
sa.Column('network_id', sa.String(length=36),
primary_key=True),
- sa.Column('binding_type',
- sa.Enum(
- 'flat', 'vlan', 'stt', 'gre', 'l3_ext',
- name=(
- 'nvp_network_bindings_binding_type')),
+ sa.Column('binding_type', get_enum(),
nullable=False, primary_key=True),
sa.Column('phy_uuid', sa.String(36), primary_key=True,
nullable=True),
# Delete the multi_provider_network entries from nvp_network_bindings
op.execute("DELETE from nvp_network_bindings WHERE network_id IN "
"(SELECT network_id from nvp_multi_provider_networks)")
-
# create table with previous contains
- op.create_table(
- 'rename_nvp_network_bindings',
- sa.Column('network_id', sa.String(length=36), primary_key=True),
- sa.Column('binding_type',
- sa.Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
- name=('nvp_network_bindings_binding_type')),
- nullable=False),
- sa.Column('phy_uuid', sa.String(36), nullable=True),
- sa.Column('vlan_id', sa.Integer, nullable=True, autoincrement=False))
+ op.create_table('rename_nvp_network_bindings',
+ sa.Column('network_id', sa.String(length=36),
+ primary_key=True),
+ sa.Column('binding_type',
+ get_enum(),
+ nullable=False),
+ sa.Column('phy_uuid', sa.String(36),
+ nullable=True),
+ sa.Column('vlan_id', sa.Integer,
+ nullable=True, autoincrement=False))
# copy data from nvp_network_bindings into rename_nvp_network_bindings
op.execute("INSERT INTO rename_nvp_network_bindings SELECT network_id, "
from neutron.db import migration
+securitygrouprules_direction = sa.Enum('ingress', 'egress',
+ name='securitygrouprules_direction')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('security_group_id', sa.String(length=36), nullable=False),
sa.Column('remote_group_id', sa.String(length=36), nullable=True),
- sa.Column('direction',
- sa.Enum('ingress', 'egress',
- name='securitygrouprules_direction'),
- nullable=True),
+ sa.Column('direction', securitygrouprules_direction, nullable=True),
sa.Column('ethertype', sa.String(length=40), nullable=True),
sa.Column('protocol', sa.String(length=40), nullable=True),
sa.Column('port_range_min', sa.Integer(), nullable=True),
### commands auto generated by Alembic - please adjust! ###
op.drop_table('securitygroupportbindings')
op.drop_table('securitygrouprules')
+ securitygrouprules_direction.drop(op.get_bind(), checkfirst=False)
op.drop_table('securitygroups')
### end Alembic commands ###
from neutron.db import migration
+securitygrouprules_direction = sa.Enum('ingress', 'egress',
+ name='securitygrouprules_direction')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('security_group_id', sa.String(length=36), nullable=False),
sa.Column('remote_group_id', sa.String(length=36), nullable=True),
- sa.Column('direction',
- sa.Enum('ingress', 'egress',
- name='securitygrouprules_direction'),
+ sa.Column('direction', securitygrouprules_direction,
nullable=True),
sa.Column('ethertype', sa.String(length=40), nullable=True),
sa.Column('protocol', sa.String(length=40), nullable=True),
op.drop_column('routers', 'enable_snat')
op.drop_table('port_profile')
op.drop_table('securitygrouprules')
+ securitygrouprules_direction.drop(op.get_bind(), checkfirst=False)
op.drop_table('networkdhcpagentbindings')
op.drop_table('mlnx_network_bindings')
op.drop_table('quotas')
from neutron.db import migration
+qosqueues_qos_marking = sa.Enum('untrusted', 'trusted',
+ name='qosqueues_qos_marking')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column('default', sa.Boolean(), nullable=True),
sa.Column('min', sa.Integer(), nullable=False),
sa.Column('max', sa.Integer(), nullable=True),
- sa.Column('qos_marking', sa.Enum('untrusted', 'trusted',
- name='qosqueues_qos_marking'),
- nullable=True),
+ sa.Column('qos_marking', qosqueues_qos_marking, nullable=True),
sa.Column('dscp', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.drop_table('portqueuemappings')
op.drop_table('networkqueuemappings')
op.drop_table('qosqueues')
+ qosqueues_qos_marking.drop(op.get_bind(), checkfirst=False)
### end Alembic commands ###
from neutron.db import migration
+securitygrouprules_direction = sa.Enum('ingress', 'egress',
+ name='securitygrouprules_direction')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('security_group_id', sa.String(length=36), nullable=False),
sa.Column('remote_group_id', sa.String(length=36), nullable=True),
- sa.Column('direction',
- sa.Enum('ingress', 'egress',
- name='securitygrouprules_direction'),
+ sa.Column('direction', securitygrouprules_direction,
nullable=True),
sa.Column('ethertype', sa.String(length=40), nullable=True),
sa.Column('protocol', sa.String(length=40), nullable=True),
### commands auto generated by Alembic - please adjust! ###
op.drop_table('securitygroupportbindings')
op.drop_table('securitygrouprules')
+ securitygrouprules_direction.drop(op.get_bind(), checkfirst=False)
op.drop_table('securitygroups')
### end Alembic commands ###
import sqlalchemy as sa
from neutron.db import migration
+vpn_auth_algorithms = sa.Enum('sha1', name='vpn_auth_algorithms')
+vpn_encrypt_algorithms = sa.Enum('3des', 'aes-128', 'aes-256', 'aes-192',
+ name='vpn_encrypt_algorithms')
+ike_phase1_mode = sa.Enum('main', name='ike_phase1_mode')
+vpn_lifetime_units = sa.Enum('seconds', 'kilobytes', name='vpn_lifetime_units')
+ike_versions = sa.Enum('v1', 'v2', name='ike_versions')
+vpn_pfs = sa.Enum('group2', 'group5', 'group14', name='vpn_pfs')
+ipsec_transform_protocols = sa.Enum('esp', 'ah', 'ah-esp',
+ name='ipsec_transform_protocols')
+ipsec_encapsulations = sa.Enum('tunnel', 'transport',
+ name='ipsec_encapsulations')
+vpn_dpd_actions = sa.Enum('hold', 'clear', 'restart', 'disabled',
+ 'restart-by-peer', name='vpn_dpd_actions')
+vpn_initiators = sa.Enum('bi-directional', 'response-only',
+ name='vpn_initiators')
def upgrade(active_plugins=None, options=None):
sa.Column('name', sa.String(length=255), nullable=True),
sa.Column('description', sa.String(length=255), nullable=True),
sa.Column(
- 'auth_algorithm',
- sa.Enum('sha1', name='vpn_auth_algorithms'), nullable=False),
+ 'auth_algorithm', vpn_auth_algorithms, nullable=False),
sa.Column(
- 'encryption_algorithm',
- sa.Enum('3des', 'aes-128', 'aes-256', 'aes-192',
- name='vpn_encrypt_algorithms'), nullable=False),
+ 'encryption_algorithm', vpn_encrypt_algorithms, nullable=False),
sa.Column(
- 'phase1_negotiation_mode',
- sa.Enum('main', name='ike_phase1_mode'), nullable=False),
+ 'phase1_negotiation_mode', ike_phase1_mode, nullable=False),
sa.Column(
- 'lifetime_units',
- sa.Enum('seconds', 'kilobytes', name='vpn_lifetime_units'),
- nullable=False),
+ 'lifetime_units', vpn_lifetime_units, nullable=False),
sa.Column('lifetime_value', sa.Integer(), nullable=False),
- sa.Column(
- 'ike_version',
- sa.Enum('v1', 'v2', name='ike_versions'), nullable=False),
- sa.Column(
- 'pfs',
- sa.Enum('group2', 'group5', 'group14', name='vpn_pfs'),
- nullable=False),
+ sa.Column('ike_version', ike_versions, nullable=False),
+ sa.Column('pfs', vpn_pfs, nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table(
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('name', sa.String(length=255), nullable=True),
sa.Column('description', sa.String(length=255), nullable=True),
+ sa.Column('transform_protocol', ipsec_transform_protocols,
+ nullable=False),
+ sa.Column('auth_algorithm', vpn_auth_algorithms, nullable=False),
+ sa.Column('encryption_algorithm', vpn_encrypt_algorithms,
+ nullable=False),
sa.Column(
- 'transform_protocol',
- sa.Enum('esp', 'ah', 'ah-esp', name='ipsec_transform_protocols'),
- nullable=False),
- sa.Column(
- 'auth_algorithm',
- sa.Enum('sha1', name='vpn_auth_algorithms'), nullable=False),
- sa.Column(
- 'encryption_algorithm',
- sa.Enum(
- '3des', 'aes-128',
- 'aes-256', 'aes-192', name='vpn_encrypt_algorithms'),
- nullable=False),
- sa.Column(
- 'encapsulation_mode',
- sa.Enum('tunnel', 'transport', name='ipsec_encapsulations'),
- nullable=False),
+ 'encapsulation_mode', ipsec_encapsulations, nullable=False),
sa.Column(
- 'lifetime_units',
- sa.Enum(
- 'seconds', 'kilobytes',
- name='vpn_lifetime_units'), nullable=False),
+ 'lifetime_units', vpn_lifetime_units, nullable=False),
sa.Column(
'lifetime_value', sa.Integer(), nullable=False),
- sa.Column(
- 'pfs',
- sa.Enum(
- 'group2', 'group5', 'group14', name='vpn_pfs'),
- nullable=False),
+ sa.Column('pfs', vpn_pfs, nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_table(
sa.Column('route_mode', sa.String(length=8), nullable=False),
sa.Column('mtu', sa.Integer(), nullable=False),
sa.Column(
- 'initiator',
- sa.Enum(
- 'bi-directional', 'response-only', name='vpn_initiators'),
- nullable=False),
+ 'initiator', vpn_initiators, nullable=False),
sa.Column('auth_mode', sa.String(length=16), nullable=False),
sa.Column('psk', sa.String(length=255), nullable=False),
sa.Column(
- 'dpd_action',
- sa.Enum(
- 'hold', 'clear', 'restart',
- 'disabled', 'restart-by-peer', name='vpn_dpd_actions'),
- nullable=False),
+ 'dpd_action', vpn_dpd_actions, nullable=False),
sa.Column('dpd_interval', sa.Integer(), nullable=False),
sa.Column('dpd_timeout', sa.Integer(), nullable=False),
sa.Column('status', sa.String(length=16), nullable=False),
op.drop_table('ipsecpeercidrs')
op.drop_table('ipsec_site_connections')
+ vpn_dpd_actions.drop(op.get_bind(), checkfirst=False)
+ vpn_initiators.drop(op.get_bind(), checkfirst=False)
op.drop_table('vpnservices')
op.drop_table('ipsecpolicies')
+ ipsec_transform_protocols.drop(op.get_bind(), checkfirst=False)
+ ipsec_encapsulations.drop(op.get_bind(), checkfirst=False)
op.drop_table('ikepolicies')
+ vpn_auth_algorithms.drop(op.get_bind(), checkfirst=False)
+ vpn_encrypt_algorithms.drop(op.get_bind(), checkfirst=False)
+ ike_phase1_mode.drop(op.get_bind(), checkfirst=False)
+ vpn_lifetime_units.drop(op.get_bind(), checkfirst=False)
+ ike_versions.drop(op.get_bind(), checkfirst=False)
+ vpn_pfs.drop(op.get_bind(), checkfirst=False)
from neutron.db import migration
+lb_protocols = sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols")
+sesssionpersistences_type = sa.Enum("SOURCE_IP", "HTTP_COOKIE", "APP_COOKIE",
+ name="sesssionpersistences_type")
+pools_lb_method = sa.Enum("ROUND_ROBIN", "LEAST_CONNECTIONS", "SOURCE_IP",
+ name="pools_lb_method")
+healthmontiors_type = sa.Enum("PING", "TCP", "HTTP", "HTTPS",
+ name="healthmontiors_type")
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column(u'description', sa.String(255), nullable=True),
sa.Column(u'port_id', sa.String(36), nullable=True),
sa.Column(u'protocol_port', sa.Integer(), nullable=False),
- sa.Column(u'protocol',
- sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols"),
- nullable=False),
+ sa.Column(u'protocol', lb_protocols, nullable=False),
sa.Column(u'pool_id', sa.String(36), nullable=False),
sa.Column(u'status', sa.String(16), nullable=False),
sa.Column(u'admin_state_up', sa.Boolean(), nullable=False),
op.create_table(
u'sessionpersistences',
sa.Column(u'vip_id', sa.String(36), nullable=False),
- sa.Column(u'type',
- sa.Enum("SOURCE_IP",
- "HTTP_COOKIE",
- "APP_COOKIE",
- name="sesssionpersistences_type"),
- nullable=False),
+ sa.Column(u'type', sesssionpersistences_type, nullable=False),
sa.Column(u'cookie_name', sa.String(1024), nullable=True),
sa.ForeignKeyConstraint(['vip_id'], [u'vips.id'], ),
sa.PrimaryKeyConstraint(u'vip_id')
sa.Column(u'name', sa.String(255), nullable=True),
sa.Column(u'description', sa.String(255), nullable=True),
sa.Column(u'subnet_id', sa.String(36), nullable=False),
- sa.Column(u'protocol',
- sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols"),
- nullable=False),
- sa.Column(u'lb_method',
- sa.Enum("ROUND_ROBIN",
- "LEAST_CONNECTIONS",
- "SOURCE_IP",
- name="pools_lb_method"),
- nullable=False),
+ sa.Column(u'protocol', lb_protocols, nullable=False),
+
+ sa.Column(u'lb_method', pools_lb_method, nullable=False),
sa.Column(u'status', sa.String(16), nullable=False),
sa.Column(u'admin_state_up', sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(['vip_id'], [u'vips.id'], ),
u'healthmonitors',
sa.Column(u'tenant_id', sa.String(255), nullable=True),
sa.Column(u'id', sa.String(36), nullable=False),
- sa.Column(u'type',
- sa.Enum("PING",
- "TCP",
- "HTTP",
- "HTTPS",
- name="healthmontiors_type"),
- nullable=False),
+ sa.Column(u'type', healthmontiors_type, nullable=False),
sa.Column(u'delay', sa.Integer(), nullable=False),
sa.Column(u'timeout', sa.Integer(), nullable=False),
sa.Column(u'max_retries', sa.Integer(), nullable=False),
op.drop_table(u'poolstatisticss')
op.drop_table(u'members')
op.drop_table(u'healthmonitors')
+ healthmontiors_type.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'pools')
+ lb_protocols.drop(op.get_bind(), checkfirst=False)
+ pools_lb_method.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'sessionpersistences')
+ sesssionpersistences_type.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'poolmonitorassociations')
op.drop_table(u'vips')
+ lb_protocols.drop(op.get_bind(), checkfirst=False)
from neutron.db import migration
+meteringlabels_direction = sa.Enum('ingress', 'egress',
+ name='meteringlabels_direction')
+
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
op.drop_table('meteringlabelrules')
+ meteringlabels_direction.drop(op.get_bind(), checkfirst=False)
op.drop_table('meteringlabels')
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('name', sa.String(length=255),
nullable=True),
- sa.Column('description', sa.String(length=255),
+ sa.Column('description', sa.String(length=1024),
nullable=True),
sa.PrimaryKeyConstraint('id'))
op.create_table('meteringlabelrules',
sa.Column('id', sa.String(length=36), nullable=False),
- sa.Column('direction',
- sa.Enum('ingress', 'egress',
- name='meteringlabels_direction'),
+ sa.Column('direction', meteringlabels_direction,
nullable=True),
sa.Column('remote_ip_prefix', sa.String(length=64),
nullable=True),
from neutron.db import migration
+securitygrouprules_direction = sa.Enum('ingress', 'egress',
+ name='securitygrouprules_direction')
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('security_group_id', sa.String(length=36), nullable=False),
sa.Column('remote_group_id', sa.String(length=36), nullable=True),
- sa.Column('direction',
- sa.Enum('ingress', 'egress',
- name='securitygrouprules_direction'),
- nullable=True),
+ sa.Column('direction', securitygrouprules_direction, nullable=True),
sa.Column('ethertype', sa.String(length=40), nullable=True),
sa.Column('protocol', sa.String(length=40), nullable=True),
sa.Column('port_range_min', sa.Integer(), nullable=True),
### commands auto generated by Alembic - please adjust! ###
op.drop_table('securitygroupportbindings')
op.drop_table('securitygrouprules')
+ securitygrouprules_direction.drop(op.get_bind(), checkfirst=False)
op.drop_table('securitygroups')
### end Alembic commands ###
from neutron.db import migration
+lb_protocols = sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols")
+
+sesssionpersistences_type = sa.Enum("SOURCE_IP", "HTTP_COOKIE", "APP_COOKIE",
+ name="sesssionpersistences_type")
+pools_lb_method = sa.Enum("ROUND_ROBIN", "LEAST_CONNECTIONS", "SOURCE_IP",
+ name="pools_lb_method")
+healthmonitors_type = sa.Enum("PING", "TCP", "HTTP", "HTTPS",
+ name="healthmontiors_type")
+
def upgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
sa.Column(u'description', sa.String(255), nullable=True),
sa.Column(u'port_id', sa.String(36), nullable=True),
sa.Column(u'protocol_port', sa.Integer(), nullable=False),
- sa.Column(u'protocol',
- sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols"),
- nullable=False),
+ sa.Column(u'protocol', lb_protocols, nullable=False),
sa.Column(u'pool_id', sa.String(36), nullable=False),
sa.Column(u'status', sa.String(16), nullable=False),
sa.Column(u'admin_state_up', sa.Boolean(), nullable=False),
op.create_table(
u'sessionpersistences',
sa.Column(u'vip_id', sa.String(36), nullable=False),
- sa.Column(u'type',
- sa.Enum("SOURCE_IP",
- "HTTP_COOKIE",
- "APP_COOKIE",
- name="sesssionpersistences_type"),
- nullable=False),
+ sa.Column(u'type', sesssionpersistences_type, nullable=False),
sa.Column(u'cookie_name', sa.String(1024), nullable=True),
sa.ForeignKeyConstraint(['vip_id'], [u'vips.id'], ),
sa.PrimaryKeyConstraint(u'vip_id')
sa.Column(u'name', sa.String(255), nullable=True),
sa.Column(u'description', sa.String(255), nullable=True),
sa.Column(u'subnet_id', sa.String(36), nullable=False),
- sa.Column(u'protocol',
- sa.Enum("HTTP", "HTTPS", "TCP", name="lb_protocols"),
- nullable=False),
- sa.Column(u'lb_method',
- sa.Enum("ROUND_ROBIN",
- "LEAST_CONNECTIONS",
- "SOURCE_IP",
- name="pools_lb_method"),
- nullable=False),
+ sa.Column(u'protocol', lb_protocols, nullable=False),
+ sa.Column(u'lb_method', pools_lb_method, nullable=False),
sa.Column(u'status', sa.String(16), nullable=False),
sa.Column(u'admin_state_up', sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(['vip_id'], [u'vips.id'], ),
u'healthmonitors',
sa.Column(u'tenant_id', sa.String(255), nullable=True),
sa.Column(u'id', sa.String(36), nullable=False),
- sa.Column(u'type',
- sa.Enum("PING",
- "TCP",
- "HTTP",
- "HTTPS",
- name="healthmontiors_type"),
- nullable=False),
+ sa.Column(u'type', healthmonitors_type, nullable=False),
sa.Column(u'delay', sa.Integer(), nullable=False),
sa.Column(u'timeout', sa.Integer(), nullable=False),
sa.Column(u'max_retries', sa.Integer(), nullable=False),
def downgrade(active_plugins=None, options=None):
if not migration.should_run(active_plugins, migration_for_plugins):
return
-
op.drop_table(u'poolstatisticss')
op.drop_table(u'members')
op.drop_table(u'poolmonitorassociations')
op.drop_table(u'healthmonitors')
+ healthmonitors_type.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'pools')
+ pools_lb_method.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'sessionpersistences')
+ sesssionpersistences_type.drop(op.get_bind(), checkfirst=False)
op.drop_table(u'vips')
+ lb_protocols.drop(op.get_bind(), checkfirst=False)