¡@

Home 

OpenStack Study: 33dd0a9fa487_embrane_lbaas_driver.py

OpenStack Index

**** CubicPower OpenStack Study ****

def upgrade(active_plugins=None, options=None):

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.create_table(

        u'embrane_pool_port',

        sa.Column(u'pool_id', sa.String(length=36), nullable=False),

        sa.Column(u'port_id', sa.String(length=36), nullable=False),

        sa.ForeignKeyConstraint(['pool_id'], [u'pools.id'],

                                name=u'embrane_pool_port_ibfk_1'),

        sa.ForeignKeyConstraint(['port_id'], [u'ports.id'],

                                name=u'embrane_pool_port_ibfk_2'),

        sa.PrimaryKeyConstraint(u'pool_id'))

**** CubicPower OpenStack Study ****

def downgrade(active_plugins=None, options=None):

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_table(u'embrane_pool_port')