This file is indexed.

/usr/lib/python2.7/dist-packages/aodh/storage/sqlalchemy/alembic/versions/12fe8fac9fe4_initial_base.py is in python-aodh 2.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
# 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.
#

"""initial base

Revision ID: 12fe8fac9fe4
Revises:
Create Date: 2015-07-28 17:38:37.022899

"""

# revision identifiers, used by Alembic.
revision = '12fe8fac9fe4'
down_revision = None
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa

import aodh.storage.sqlalchemy.models


def upgrade():
    op.create_table(
        'alarm_history',
        sa.Column('event_id', sa.String(length=128), nullable=False),
        sa.Column('alarm_id', sa.String(length=128), nullable=True),
        sa.Column('on_behalf_of', sa.String(length=128), nullable=True),
        sa.Column('project_id', sa.String(length=128), nullable=True),
        sa.Column('user_id', sa.String(length=128), nullable=True),
        sa.Column('type', sa.String(length=20), nullable=True),
        sa.Column('detail', sa.Text(), nullable=True),
        sa.Column('timestamp',
                  aodh.storage.sqlalchemy.models.PreciseTimestamp(),
                  nullable=True),
        sa.PrimaryKeyConstraint('event_id')
    )
    op.create_index(
        'ix_alarm_history_alarm_id', 'alarm_history', ['alarm_id'],
        unique=False)
    op.create_table(
        'alarm',
        sa.Column('alarm_id', sa.String(length=128), nullable=False),
        sa.Column('enabled', sa.Boolean(), nullable=True),
        sa.Column('name', sa.Text(), nullable=True),
        sa.Column('type', sa.String(length=50), nullable=True),
        sa.Column('severity', sa.String(length=50), nullable=True),
        sa.Column('description', sa.Text(), nullable=True),
        sa.Column('timestamp',
                  aodh.storage.sqlalchemy.models.PreciseTimestamp(),
                  nullable=True),
        sa.Column('user_id', sa.String(length=128), nullable=True),
        sa.Column('project_id', sa.String(length=128), nullable=True),
        sa.Column('state', sa.String(length=255), nullable=True),
        sa.Column('state_timestamp',
                  aodh.storage.sqlalchemy.models.PreciseTimestamp(),
                  nullable=True),
        sa.Column('ok_actions',
                  aodh.storage.sqlalchemy.models.JSONEncodedDict(),
                  nullable=True),
        sa.Column('alarm_actions',
                  aodh.storage.sqlalchemy.models.JSONEncodedDict(),
                  nullable=True),
        sa.Column('insufficient_data_actions',
                  aodh.storage.sqlalchemy.models.JSONEncodedDict(),
                  nullable=True),
        sa.Column('repeat_actions', sa.Boolean(), nullable=True),
        sa.Column('rule',
                  aodh.storage.sqlalchemy.models.JSONEncodedDict(),
                  nullable=True),
        sa.Column('time_constraints',
                  aodh.storage.sqlalchemy.models.JSONEncodedDict(),
                  nullable=True),
        sa.PrimaryKeyConstraint('alarm_id')
    )
    op.create_index(
        'ix_alarm_project_id', 'alarm', ['project_id'], unique=False)
    op.create_index(
        'ix_alarm_user_id', 'alarm', ['user_id'], unique=False)