Debian Codegraph @

neutron_fwaas/db/migration/alembic_migrations/versions/796c68dffbb_cisco_csr_fwaas.py

raw symbols SCIP
1 # Copyright 2015 OpenStack Foundation
2 #
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
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
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
13 # under the License.
14 #
15
16 """cisco_csr_fwaas
17
18 Revision ID: 796c68dffbb
19 Revises: 540142f314f4
20 Create Date: 2015-02-02 13:11:55.184112
21
22 """
23
24 from alembic import op
25 import sqlalchemy as sa
26
27 # revision identifiers, used by Alembic.
28 revision = '796c68dffbb'
29 down_revision = '540142f314f4'
30
31
32 def upgrade(active_plugins=None, options=None):
33
34 op.create_table('cisco_firewall_associations',
35 sa.Column('fw_id', sa.String(length=36), nullable=False),
36 sa.Column('port_id', sa.String(length=36), nullable=True),
37 sa.Column('direction', sa.String(
38 length=16), nullable=True),
39 sa.Column('acl_id', sa.String(length=36), nullable=True),
40 sa.Column('router_id', sa.String(
41 length=36), nullable=True),
42 sa.ForeignKeyConstraint(['fw_id'], ['firewalls.id'],
43 ondelete='CASCADE'),
44 sa.ForeignKeyConstraint(['port_id'], ['ports.id'],
45 ondelete='CASCADE'),
46 sa.PrimaryKeyConstraint('fw_id')
47 )