¡@

Home 

OpenStack Study: 24c7ea5160d7_cisco_csr_vpnaas.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(

        'cisco_csr_identifier_map',

        sa.Column('tenant_id', sa.String(length=255), nullable=True),

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

                  primary_key=True),

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

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

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

        sa.ForeignKeyConstraint(['ipsec_site_conn_id'],

                                ['ipsec_site_connections.id'],

                                ondelete='CASCADE')

    )

**** CubicPower OpenStack Study ****

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

    if not migration.should_run(active_plugins, migration_for_plugins):

        return

    op.drop_table('cisco_csr_identifier_map')