¡@

Home 

OpenStack Study: 263772d65691_cisco_db_cleanup_2.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.rename_table('credentials', 'cisco_credentials')

    op.rename_table('nexusport_bindings', 'cisco_nexusport_bindings')

    op.rename_table('qoss', 'cisco_qos_policies')

    op.drop_table('cisco_vlan_ids')

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.create_table(

        'cisco_vlan_ids',

        sa.Column('vlan_id', sa.Integer, nullable=False),

        sa.Column('vlan_used', sa.Boolean),

        sa.PrimaryKeyConstraint('vlan_id'),

    )

    op.rename_table('cisco_credentials', 'credentials')

    op.rename_table('cisco_nexusport_bindings', 'nexusport_bindings')

    op.rename_table('cisco_qos_policies', 'qoss')