This file is indexed.

/usr/lib/python2.7/dist-packages/networking_l2gw/db/migration/alembic_migrations/versions/42438454c556_l2gateway_models.py is in python-networking-l2gw 1:1.0.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
# Copyright 2015 OpenStack Foundation
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.
#

"""l2gateway_models

Revision ID: 42438454c556
Revises: 54c9c8fe22bf
Create Date: 2014-11-27 01:57:56.997665

"""

# revision identifiers, used by Alembic.
revision = '42438454c556'
down_revision = '54c9c8fe22bf'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table('l2gateways',
                    sa.Column('id', sa.String(length=36), nullable=False),
                    sa.Column('name', sa.String(length=255), nullable=True),
                    sa.Column('tenant_id', sa.String(length=255),
                              nullable=True),
                    sa.PrimaryKeyConstraint('id'))

    op.create_table('l2gatewaydevices',
                    sa.Column('id', sa.String(length=36), nullable=False),
                    sa.Column('device_name', sa.String(length=255),
                              nullable=False),
                    sa.Column('l2_gateway_id', sa.String(length=36),
                              nullable=False),
                    sa.ForeignKeyConstraint(['l2_gateway_id'],
                                            ['l2gateways.id'],
                                            ondelete='CASCADE'),
                    sa.PrimaryKeyConstraint('id'))

    op.create_table('l2gatewayinterfaces',
                    sa.Column('id', sa.String(length=36), nullable=False),
                    sa.Column('interface_name', sa.String(length=255),
                              nullable=True),
                    sa.Column('segmentation_id', sa.Integer(),
                              nullable=True),
                    sa.Column('device_id', sa.String(length=36),
                              nullable=False),
                    sa.ForeignKeyConstraint(['device_id'],
                                            ['l2gatewaydevices.id'],
                                            ondelete='CASCADE'),
                    sa.PrimaryKeyConstraint('id'))

    op.create_table('l2gatewayconnections',
                    sa.Column('id', sa.String(length=36), nullable=False),
                    sa.Column('tenant_id', sa.String(length=255),
                              nullable=True),
                    sa.Column('l2_gateway_id', sa.String(length=36),
                              nullable=True),
                    sa.Column('network_id', sa.String(length=36),
                              nullable=False),
                    sa.Column('segmentation_id', sa.Integer(),
                              nullable=True),
                    sa.ForeignKeyConstraint(['l2_gateway_id'],
                                            ['l2gateways.id'],
                                            ondelete='CASCADE'),
                    sa.ForeignKeyConstraint(['network_id'], ['networks.id'],
                                            ondelete='CASCADE'),
                    sa.UniqueConstraint('l2_gateway_id',
                                        'network_id'),
                    sa.PrimaryKeyConstraint('id'))

    op.create_table('pending_ucast_macs_remotes',
                    sa.Column('id', sa.String(length=36), nullable=False),
                    sa.Column('uuid', sa.String(length=36), nullable=True),
                    sa.Column('mac', sa.String(32), nullable=False),
                    sa.Column('logical_switch_uuid', sa.String(36),
                              nullable=False),
                    sa.Column('locator_uuid', sa.String(36),
                              nullable=True),
                    sa.Column('dst_ip', sa.String(64)),
                    sa.Column('vm_ip', sa.String(64)),
                    sa.Column('ovsdb_identifier', sa.String(64),
                              nullable=False),
                    sa.Column('operation', sa.String(8), nullable=False),
                    sa.Column('timestamp', sa.DateTime, nullable=False))


def downgrade():
    op.drop_table('l2gatewayconnections')
    op.drop_table('l2gatewayinterfaces')
    op.drop_table('l2gatewaydevices')
    op.drop_table('l2gateways')
    op.drop_table('pending_ucast_macs_remotes')