¡@

Home 

OpenStack Study: 49332180ca96_ryu_plugin_update.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.drop_table('ofp_server')

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.create_table(

        'ofp_server',

        sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),

        sa.Column('address', sa.String(length=255)),

        sa.Column('host_type', sa.String(length=255)),

        sa.PrimaryKeyConstraint(u'id')

    )