¡@

Home 

OpenStack Study: 52c5e4a18807_lbaas_pool_scheduler.py

OpenStack Index

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    ### commands auto generated by Alembic - please adjust! ###

    op.create_table(

        'poolloadbalanceragentbindings',

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

        sa.Column('agent_id', sa.String(length=36),

                  nullable=False),

        sa.ForeignKeyConstraint(['agent_id'], ['agents.id'],

                                ondelete='CASCADE'),

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

                                ondelete='CASCADE'),

        sa.PrimaryKeyConstraint('pool_id')

    )

    ### end Alembic commands ###

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    ### commands auto generated by Alembic - please adjust! ###

    op.drop_table('poolloadbalanceragentbindings')

    ### end Alembic commands ###