¡@

Home 

OpenStack Study: 11c6e18605c8_pool_monitor_status_.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.add_column('poolmonitorassociations', sa.Column('status',

                                                       sa.String(16),

                                                       nullable=False))

    op.add_column('poolmonitorassociations', sa.Column('status_description',

                                                       sa.String(255)))

    # Set status to ACTIVE for existing associations

    op.execute("UPDATE poolmonitorassociations SET status='ACTIVE'")

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_column('poolmonitorassociations', 'status')

    op.drop_column('poolmonitorassociations', 'status_description')