1
# Copyright 2015 OpenStack Foundation
3
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
# not use this file except in compliance with the License. You may obtain
5
# a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
# License for the specific language governing permissions and limitations
16
"""sync with cisco repo
18
Revision ID: 341ee8a4ccb5
20
Create Date: 2015-03-10 17:19:57.047080
24
# revision identifiers, used by Alembic.
25
revision = '341ee8a4ccb5'
26
down_revision = 'f15b1fb526dd'
28
from alembic import op
29
import sqlalchemy as sa
34
'ml2_nexus_vxlan_allocations',
35
sa.Column('vxlan_vni', sa.Integer(), nullable=False,
37
sa.Column('allocated', sa.Boolean(), nullable=False,
38
server_default=sa.sql.false()),
39
sa.PrimaryKeyConstraint('vxlan_vni')
43
'ml2_nexus_vxlan_mcast_groups',
44
sa.Column('id', sa.String(length=36), nullable=False),
45
sa.Column('mcast_group', sa.String(length=64), nullable=False),
46
sa.Column('associated_vni', sa.Integer(), nullable=False),
47
sa.PrimaryKeyConstraint('id'),
48
sa.ForeignKeyConstraint(['associated_vni'],
49
['ml2_nexus_vxlan_allocations.vxlan_vni'],
54
'cisco_ml2_nexus_nve',
55
sa.Column('vni', sa.Integer(), nullable=False),
56
sa.Column('switch_ip', sa.String(length=255), nullable=True),
57
sa.Column('device_id', sa.String(length=255), nullable=True),
58
sa.Column('mcast_group', sa.String(length=255), nullable=True),
59
sa.PrimaryKeyConstraint('vni', 'switch_ip', 'device_id'))
62
'cisco_ml2_nexusport_bindings',
63
sa.Column('vni', sa.Integer(), nullable=True))
65
op.add_column('cisco_ml2_nexusport_bindings', sa.Column(
66
'is_provider_vlan', sa.Boolean(), nullable=False,
67
server_default=sa.sql.false()))
71
op.drop_table('ml2_nexus_vxlan_mcast_groups')
72
op.drop_table('ml2_nexus_vxlan_allocations')
73
op.drop_table('cisco_ml2_nexus_nve')
75
op.drop_column('cisco_ml2_nexusport_bindings', 'vni')
76
op.drop_column('cisco_ml2_nexusport_bindings', 'is_provider_vlan')