# Path: aodh/storage/impl_sqlalchemy.py
# LOG = log.getLogger(__name__)
# AVAILABLE_CAPABILITIES = {
#     'alarms': {'query': {'simple': True,
#                          'complex': True},
#                'history': {'query': {'simple': True,
#                                      'complex': True}}},
# }
# AVAILABLE_STORAGE_CAPABILITIES = {
#     'storage': {'production_ready': True},
# }
#     CAPABILITIES = base.update_nested(base.Connection.CAPABILITIES,
#                                       AVAILABLE_CAPABILITIES)
#     STORAGE_CAPABILITIES = base.update_nested(
#         base.Connection.STORAGE_CAPABILITIES,
#         AVAILABLE_STORAGE_CAPABILITIES,
#     )
# def apply_filters(query, model, **filters):
#     def __init__(self, conf, url):
#     def dress_url(url):
#     def disconnect(self):
#     def _get_alembic_config(self):
#     def upgrade(self, nocreate=False):
#     def clear(self):
#     def _retrieve_data(self, filter_expr, orderby, limit, table):
#     def _row_to_alarm_model(row):
#     def _retrieve_alarms(self, query):
#     def _get_pagination_query(session, query, pagination, api_model, model):
#     def get_alarms(self, meter=None, pagination=None, **kwargs):
#     def create_alarm(self, alarm):
#     def update_alarm(self, alarm):
#     def delete_alarm(self, alarm_id):
#     def _row_to_alarm_change_model(row):
#     def query_alarms(self, filter_expr=None, orderby=None, limit=None):
#     def _retrieve_alarm_history(self, query):
#     def query_alarm_history(self, filter_expr=None, orderby=None, limit=None):
#     def get_alarm_changes(self, alarm_id, on_behalf_of,
#                           user=None, project=None, alarm_type=None,
#                           severity=None, start_timestamp=None,
#                           start_timestamp_op=None, end_timestamp=None,
#                           end_timestamp_op=None, pagination=None):
#     def record_alarm_change(self, alarm_change):
#     def clear_expired_alarm_history_data(self, ttl, max_count=100):
#     def conditional_update(self, model, values, expected_values, filters=None):
#     def _row_to_quota_model(row):
#     def _retrieve_quotas(self, query):
#     def get_quotas(self, project_id):
#     def set_quotas(self, project_id, quotas):
#     def delete_quotas(self, project_id):
# class Connection(base.Connection):
# 
# Path: aodh/storage/sqlalchemy/models.py
# class JSONEncodedDict(TypeDecorator):
# class TimestampUTC(TypeDecorator):
# class AodhBase(object):
# class Alarm(Base):
# class AlarmChange(Base):
# class Quota(Base):
#     def process_bind_param(value, dialect):
#     def process_result_value(value, dialect):
#     def load_dialect_impl(self, dialect):
#     def __setitem__(self, key, value):
#     def __getitem__(self, key):
#     def update(self, values):


from alembic import context
from logging.config import fileConfig
from aodh.storage import impl_sqlalchemy
from aodh.storage.sqlalchemy import models
    from aodh import service


def run_migrations_offline():
    """Run migrations in 'offline' mode.

    This configures the context with just a URL
    and not an Engine, though an Engine is acceptable
    here as well.  By skipping the Engine creation
    we don't even need a DBAPI to be available.

    Calls to context.execute() here emit the given string to the
    script output.

    """
    conf = config.conf
    context.configure(url=conf.database.connection,
                      target_metadata=target_metadata)

    with context.begin_transaction():
        context.run_migrations()


def run_migrations_online():
    """Run migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.

    """
    conf = config.conf

# Path: aodh/storage/impl_sqlalchemy.py
# LOG = log.getLogger(__name__)
# AVAILABLE_CAPABILITIES = {
#     'alarms': {'query': {'simple': True,
#                          'complex': True},
#                'history': {'query': {'simple': True,
#                                      'complex': True}}},
# }
# AVAILABLE_STORAGE_CAPABILITIES = {
#     'storage': {'production_ready': True},
# }
#     CAPABILITIES = base.update_nested(base.Connection.CAPABILITIES,
#                                       AVAILABLE_CAPABILITIES)
#     STORAGE_CAPABILITIES = base.update_nested(
#         base.Connection.STORAGE_CAPABILITIES,
#         AVAILABLE_STORAGE_CAPABILITIES,
#     )
# def apply_filters(query, model, **filters):
#     def __init__(self, conf, url):
#     def dress_url(url):
#     def disconnect(self):
#     def _get_alembic_config(self):
#     def upgrade(self, nocreate=False):
#     def clear(self):
#     def _retrieve_data(self, filter_expr, orderby, limit, table):
#     def _row_to_alarm_model(row):
#     def _retrieve_alarms(self, query):
#     def _get_pagination_query(session, query, pagination, api_model, model):
#     def get_alarms(self, meter=None, pagination=None, **kwargs):
#     def create_alarm(self, alarm):
#     def update_alarm(self, alarm):
#     def delete_alarm(self, alarm_id):
#     def _row_to_alarm_change_model(row):
#     def query_alarms(self, filter_expr=None, orderby=None, limit=None):
#     def _retrieve_alarm_history(self, query):
#     def query_alarm_history(self, filter_expr=None, orderby=None, limit=None):
#     def get_alarm_changes(self, alarm_id, on_behalf_of,
#                           user=None, project=None, alarm_type=None,
#                           severity=None, start_timestamp=None,
#                           start_timestamp_op=None, end_timestamp=None,
#                           end_timestamp_op=None, pagination=None):
#     def record_alarm_change(self, alarm_change):
#     def clear_expired_alarm_history_data(self, ttl, max_count=100):
#     def conditional_update(self, model, values, expected_values, filters=None):
#     def _row_to_quota_model(row):
#     def _retrieve_quotas(self, query):
#     def get_quotas(self, project_id):
#     def set_quotas(self, project_id, quotas):
#     def delete_quotas(self, project_id):
# class Connection(base.Connection):
# 
# Path: aodh/storage/sqlalchemy/models.py
# class JSONEncodedDict(TypeDecorator):
# class TimestampUTC(TypeDecorator):
# class AodhBase(object):
# class Alarm(Base):
# class AlarmChange(Base):
# class Quota(Base):
#     def process_bind_param(value, dialect):
#     def process_result_value(value, dialect):
#     def load_dialect_impl(self, dialect):
#     def __setitem__(self, key, value):
#     def __getitem__(self, key):
#     def update(self, values):


# Path: aodh/storage/sqlalchemy/alembic/env.py
from alembic import context
from logging.config import fileConfig
from aodh.storage import impl_sqlalchemy
from aodh.storage.sqlalchemy import models
    from aodh import service



def run_migrations_offline():
    """Run migrations in 'offline' mode.

    This configures the context with just a URL
    and not an Engine, though an Engine is acceptable
    here as well.  By skipping the Engine creation
    we don't even need a DBAPI to be available.

    Calls to context.execute() here emit the given string to the
    script output.

    """
    conf = config.conf
    context.configure(url=conf.database.connection,
                      target_metadata=target_metadata)

    with context.begin_transaction():
        context.run_migrations()


def run_migrations_online():
    """Run migrations in 'online' mode.

    In this scenario we need to create an Engine
    and associate a connection with the context.

    """
    conf = config.conf

    conn = impl_sqlalchemy.Connection(conf, conf.database.connection)