¡@

Home 

OpenStack Study: 20ae61555e95_ml2_gre_type_driver.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.create_table(

        'ml2_gre_allocations',

        sa.Column('gre_id', sa.Integer, nullable=False,

                  autoincrement=False),

        sa.Column('allocated', sa.Boolean, nullable=False),

        sa.PrimaryKeyConstraint('gre_id')

    )

    op.create_table(

        'ml2_gre_endpoints',

        sa.Column('ip_address', sa.String(length=64)),

        sa.PrimaryKeyConstraint('ip_address')

    )

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_table('ml2_gre_allocations')

    op.drop_table('ml2_gre_endpoints')