Exemplo n.º 1
0
def upgrade(active_plugins=None, options=None):
    # general model
    upgrade_base()

    if migration.should_run(active_plugins, L3_CAPABLE):
        common_ext_ops.upgrade_l3()

    if migration.should_run(active_plugins, FOLSOM_QUOTA):
        common_ext_ops.upgrade_quota()

    if PLUGINS['lbr'] in active_plugins:
        upgrade_linuxbridge()
    elif PLUGINS['ovs'] in active_plugins:
        upgrade_ovs()
    elif PLUGINS['cisco'] in active_plugins:
        upgrade_cisco()
        # Cisco plugin imports OVS models too
        upgrade_ovs()
    elif PLUGINS['meta'] in active_plugins:
        upgrade_meta()
    elif PLUGINS['nec'] in active_plugins:
        upgrade_nec()
    elif PLUGINS['ryu'] in active_plugins:
        upgrade_ryu()
    elif PLUGINS['brocade'] in active_plugins:
        upgrade_brocade()
        # Brocade plugin imports linux bridge models too
        upgrade_linuxbridge()
Exemplo n.º 2
0
def upgrade(active_plugins=None, options=None):
    # general model
    upgrade_base()

    if migration.should_run(active_plugins, L3_CAPABLE):
        common_ext_ops.upgrade_l3()

    if migration.should_run(active_plugins, FOLSOM_QUOTA):
        common_ext_ops.upgrade_quota(options)

    if PLUGINS['lbr'] in active_plugins:
        upgrade_linuxbridge()
    elif PLUGINS['ovs'] in active_plugins:
        upgrade_ovs()
    elif PLUGINS['cisco'] in active_plugins:
        upgrade_cisco()
        # Cisco plugin imports OVS models too
        upgrade_ovs()
    elif PLUGINS['meta'] in active_plugins:
        upgrade_meta()
    elif PLUGINS['nec'] in active_plugins:
        upgrade_nec()
    elif PLUGINS['ryu'] in active_plugins:
        upgrade_ryu()
    elif PLUGINS['brocade'] in active_plugins:
        upgrade_brocade()
        # Brocade plugin imports linux bridge models too
        upgrade_linuxbridge()
def upgrade(active_plugin=None, options=None):
    # general model
    upgrade_base()

    if active_plugin in L3_CAPABLE:
        common_ext_ops.upgrade_l3()

    if active_plugin in FOLSOM_QUOTA:
        common_ext_ops.upgrade_quota(options)

    if active_plugin == PLUGINS['lbr'] or active_plugin == PLUGINS['niblick']:
        upgrade_linuxbridge()
    elif active_plugin == PLUGINS['ovs']:
        upgrade_ovs()
    elif active_plugin == PLUGINS['cisco']:
        upgrade_cisco()
        # Cisco plugin imports OVS models too
        upgrade_ovs()
    elif active_plugin == PLUGINS['meta']:
        upgrade_meta()
    elif active_plugin == PLUGINS['nec']:
        upgrade_nec()
    elif active_plugin == PLUGINS['ryu']:
        upgrade_ryu()
Exemplo n.º 4
0
def upgrade(active_plugin=None, options=None):
    # general model
    upgrade_base()

    if active_plugin in L3_CAPABLE:
        common_ext_ops.upgrade_l3()

    if active_plugin in FOLSOM_QUOTA:
        common_ext_ops.upgrade_quota(options)

    if active_plugin == PLUGINS['lbr']:
        upgrade_linuxbridge()
    elif active_plugin == PLUGINS['ovs']:
        upgrade_ovs()
    elif active_plugin == PLUGINS['cisco']:
        upgrade_cisco()
        # Cisco plugin imports OVS models too
        upgrade_ovs()
    elif active_plugin == PLUGINS['meta']:
        upgrade_meta()
    elif active_plugin == PLUGINS['nec']:
        upgrade_nec()
    elif active_plugin == PLUGINS['ryu']:
        upgrade_ryu()
Exemplo n.º 5
0
def upgrade(active_plugins=None, options=None):
    # general model
    upgrade_base()

    if set(active_plugins) & set(L3_CAPABLE):
        common_ext_ops.upgrade_l3()

    if set(active_plugins) & set(FOLSOM_QUOTA):
        common_ext_ops.upgrade_quota(options)

    if PLUGINS['lbr'] in active_plugins:
        upgrade_linuxbridge()
    elif PLUGINS['ovs'] in active_plugins:
        upgrade_ovs()
    elif PLUGINS['cisco'] in active_plugins:
        upgrade_cisco()
        # Cisco plugin imports OVS models too
        upgrade_ovs()
    elif PLUGINS['meta'] in active_plugins:
        upgrade_meta()
    elif PLUGINS['nec'] in active_plugins:
        upgrade_nec()
    elif PLUGINS['ryu'] in active_plugins:
        upgrade_ryu()
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return

    common_ext_ops.upgrade_l3()

    op.create_table(
        'quotas',
        sa.Column('id', sa.String(length=36), nullable=False),
        sa.Column('tenant_id', sa.String(length=255), nullable=True),
        sa.Column('resource', sa.String(length=255), nullable=True),
        sa.Column('limit', sa.Integer(), nullable=True),
        sa.PrimaryKeyConstraint('id'),
    )
    op.create_table(
        'net_partitions',
        sa.Column('id', sa.String(length=36), nullable=False),
        sa.Column('name', sa.String(length=64), nullable=True),
        sa.Column('l3dom_tmplt_id', sa.String(length=36), nullable=True),
        sa.Column('l2dom_tmplt_id', sa.String(length=36), nullable=True),
        sa.PrimaryKeyConstraint('id'),
    )
    op.create_table(
        'port_mapping',
        sa.Column('port_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_vport_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_vif_id', sa.String(length=36), nullable=True),
        sa.Column('static_ip', sa.Boolean(), nullable=True),
        sa.ForeignKeyConstraint(['port_id'], ['ports.id'], ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('port_id'),
    )
    op.create_table(
        'subnet_l2dom_mapping',
        sa.Column('subnet_id', sa.String(length=36), nullable=False),
        sa.Column('net_partition_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_subnet_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_l2dom_tmplt_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_user_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_group_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                ondelete='CASCADE'),
        sa.ForeignKeyConstraint(['subnet_id'], ['subnets.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('subnet_id'),
    )
    op.create_table(
        'net_partition_router_mapping',
        sa.Column('net_partition_id', sa.String(length=36), nullable=False),
        sa.Column('router_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_router_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                ondelete='CASCADE'),
        sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('router_id'),
    )
    op.create_table(
        'router_zone_mapping',
        sa.Column('router_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_zone_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_user_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_group_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('router_id'),
    )
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return

    common_ext_ops.upgrade_l3()

    op.create_table(
        'quotas',
        sa.Column('id', sa.String(length=36), nullable=False),
        sa.Column('tenant_id', sa.String(length=255), nullable=True),
        sa.Column('resource', sa.String(length=255), nullable=True),
        sa.Column('limit', sa.Integer(), nullable=True),
        sa.PrimaryKeyConstraint('id'),
    )
    op.create_table(
        'net_partitions',
        sa.Column('id', sa.String(length=36), nullable=False),
        sa.Column('name', sa.String(length=64), nullable=True),
        sa.Column('l3dom_tmplt_id', sa.String(length=36), nullable=True),
        sa.Column('l2dom_tmplt_id', sa.String(length=36), nullable=True),
        sa.PrimaryKeyConstraint('id'),
    )
    op.create_table(
        'port_mapping',
        sa.Column('port_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_vport_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_vif_id', sa.String(length=36), nullable=True),
        sa.Column('static_ip', sa.Boolean(), nullable=True),
        sa.ForeignKeyConstraint(['port_id'], ['ports.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('port_id'),
    )
    op.create_table(
        'subnet_l2dom_mapping',
        sa.Column('subnet_id', sa.String(length=36), nullable=False),
        sa.Column('net_partition_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_subnet_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_l2dom_tmplt_id', sa.String(length=36),
                  nullable=True),
        sa.Column('nuage_user_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_group_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                ondelete='CASCADE'),
        sa.ForeignKeyConstraint(['subnet_id'], ['subnets.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('subnet_id'),
    )
    op.create_table(
        'net_partition_router_mapping',
        sa.Column('net_partition_id', sa.String(length=36), nullable=False),
        sa.Column('router_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_router_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                ondelete='CASCADE'),
        sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('router_id'),
    )
    op.create_table(
        'router_zone_mapping',
        sa.Column('router_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_zone_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_user_id', sa.String(length=36), nullable=True),
        sa.Column('nuage_group_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('router_id'),
    )
Exemplo n.º 8
0
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return
    common_ext_ops.upgrade_l3()
Exemplo n.º 9
0
def upgrade(active_plugins=None, options=None):
    if not migration.should_run(active_plugins, migration_for_plugins):
        return
    common_ext_ops.upgrade_l3()