¡@

Home 

OpenStack Study: 3a520dd165d0_cisco_nexus_multi_switch.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(

        'cisco_nexusport_bindings',

        sa.Column('instance_id', sa.String(length=255), nullable=False))

    op.add_column(

        'cisco_nexusport_bindings',

        sa.Column('switch_ip', sa.String(length=255), nullable=False))

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_column('cisco_nexusport_bindings', 'switch_ip')

    op.drop_column('cisco_nexusport_bindings', 'instance_id')