# Path: aodh/conf/defaults.py
# def set_lib_defaults():
# def set_cors_middleware_defaults():
# 
# Path: aodh/keystone_client.py
# CFG_GROUP = "service_credentials"
# OPTS = [
#     cfg.StrOpt('region-name',
#                default=os.environ.get('OS_REGION_NAME'),
#                deprecated_name="os-region-name",
#                help='Region name to use for OpenStack service endpoints.'),
#     cfg.StrOpt('interface',
#                default=os.environ.get(
#                    'OS_INTERFACE', os.environ.get('OS_ENDPOINT_TYPE',
#                                                   'public')),
#                deprecated_name="os-endpoint-type",
#                choices=('public', 'internal', 'admin', 'auth', 'publicURL',
#                         'internalURL', 'adminURL'),
#                help='Type of endpoint in Identity service catalog to use for '
#                     'communication with OpenStack services.'),
# ]
# def get_session(conf):
# def get_client(conf):
# def get_trusted_client(conf, trust_id):
# def get_auth_token(client):
# def get_client_on_behalf_user(conf, auth_plugin):
# def create_trust_id(conf, trustor_user_id, trustor_project_id, roles,
#                     auth_plugin):
# def delete_trust_id(conf, trust_id, auth_plugin):
# def url_for(conf, **kwargs):
# def get_heat_client_from_trust(conf, trust_id):
# def register_keystoneauth_opts(conf):
# 
# Path: aodh/messaging.py
# DEFAULT_URL = "__default__"
# TRANSPORTS = {}
# _SERIALIZER = oslo_serializer.JsonPayloadSerializer()
# def setup():
# def get_transport(conf, url=None, optional=False, cache=True):
# def get_batch_notification_listener(transport, targets, endpoints,
#                                     allow_requeue=False,
#                                     batch_size=1, batch_timeout=None):
# def get_notifier(transport, publisher_id):
# 
# Path: aodh/profiler.py
# LOG = log.getLogger(__name__)
# class WsgiMiddleware(object):
#     def __init__(self, application, **kwargs):
#     def factory(cls, global_conf, **local_conf):
#         def filter_(app):
#     def __call__(self, request):
# def setup(conf):
# def trace_cls(name, **kwargs):
#     def decorator(cls):
# 
# Path: aodh/version.py



import os
import oslo_i18n
from keystoneauth1 import loading as ka_loading
from oslo_config import cfg
from oslo_db import options as db_options
from oslo_log import log
from oslo_policy import opts as policy_opts
from oslo_reports import guru_meditation_report as gmr
from oslo_utils import importutils
from aodh.conf import defaults
from aodh import keystone_client
from aodh import messaging
from aodh import profiler
from aodh import version
    from aodh import opts
            'keystoneclient=INFO',
            'oslo_db.sqlalchemy=WARN',
            'cotyledon=INFO'
        ]
    )
    log.set_defaults(default_log_levels=log_levels)
    defaults.set_cors_middleware_defaults()
    db_options.set_defaults(conf)
    if profiler_opts:
        profiler_opts.set_defaults(conf)
    policy_opts.set_defaults(conf, policy_file=os.path.abspath(
        os.path.join(os.path.dirname(__file__), "api", "policy.yaml")))
    # Register our own Aodh options
    for group, options in opts.list_opts():
        conf.register_opts(list(options),
                           group=None if group == "DEFAULT" else group)
    keystone_client.register_keystoneauth_opts(conf)

    conf(argv, project='aodh', validate_default_values=True,
         default_config_files=config_files,
         version=version.version_info.version_string())

    ka_loading.load_auth_from_conf_options(conf, "service_credentials")
    log.setup(conf, 'aodh')

    # NOTE(tkajinam): guru cannot run with service under apache daemon, so when
    # aod-api running with mod_wsgi, the argv is [], we don't start guru.
    if argv:
        gmr.TextGuruMeditation.setup_autorun(version)


# Path: aodh/conf/defaults.py
# def set_lib_defaults():
# def set_cors_middleware_defaults():
# 
# Path: aodh/keystone_client.py
# CFG_GROUP = "service_credentials"
# OPTS = [
#     cfg.StrOpt('region-name',
#                default=os.environ.get('OS_REGION_NAME'),
#                deprecated_name="os-region-name",
#                help='Region name to use for OpenStack service endpoints.'),
#     cfg.StrOpt('interface',
#                default=os.environ.get(
#                    'OS_INTERFACE', os.environ.get('OS_ENDPOINT_TYPE',
#                                                   'public')),
#                deprecated_name="os-endpoint-type",
#                choices=('public', 'internal', 'admin', 'auth', 'publicURL',
#                         'internalURL', 'adminURL'),
#                help='Type of endpoint in Identity service catalog to use for '
#                     'communication with OpenStack services.'),
# ]
# def get_session(conf):
# def get_client(conf):
# def get_trusted_client(conf, trust_id):
# def get_auth_token(client):
# def get_client_on_behalf_user(conf, auth_plugin):
# def create_trust_id(conf, trustor_user_id, trustor_project_id, roles,
#                     auth_plugin):
# def delete_trust_id(conf, trust_id, auth_plugin):
# def url_for(conf, **kwargs):
# def get_heat_client_from_trust(conf, trust_id):
# def register_keystoneauth_opts(conf):
# 
# Path: aodh/messaging.py
# DEFAULT_URL = "__default__"
# TRANSPORTS = {}
# _SERIALIZER = oslo_serializer.JsonPayloadSerializer()
# def setup():
# def get_transport(conf, url=None, optional=False, cache=True):
# def get_batch_notification_listener(transport, targets, endpoints,
#                                     allow_requeue=False,
#                                     batch_size=1, batch_timeout=None):
# def get_notifier(transport, publisher_id):
# 
# Path: aodh/profiler.py
# LOG = log.getLogger(__name__)
# class WsgiMiddleware(object):
#     def __init__(self, application, **kwargs):
#     def factory(cls, global_conf, **local_conf):
#         def filter_(app):
#     def __call__(self, request):
# def setup(conf):
# def trace_cls(name, **kwargs):
#     def decorator(cls):
# 
# Path: aodh/version.py



# Path: aodh/service.py
import os
import oslo_i18n
from keystoneauth1 import loading as ka_loading
from oslo_config import cfg
from oslo_db import options as db_options
from oslo_log import log
from oslo_policy import opts as policy_opts
from oslo_reports import guru_meditation_report as gmr
from oslo_utils import importutils
from aodh.conf import defaults
from aodh import keystone_client
from aodh import messaging
from aodh import profiler
from aodh import version
    from aodh import opts

            'keystoneclient=INFO',
            'oslo_db.sqlalchemy=WARN',
            'cotyledon=INFO'
        ]
    )
    log.set_defaults(default_log_levels=log_levels)
    defaults.set_cors_middleware_defaults()
    db_options.set_defaults(conf)
    if profiler_opts:
        profiler_opts.set_defaults(conf)
    policy_opts.set_defaults(conf, policy_file=os.path.abspath(
        os.path.join(os.path.dirname(__file__), "api", "policy.yaml")))
    # Register our own Aodh options
    for group, options in opts.list_opts():
        conf.register_opts(list(options),
                           group=None if group == "DEFAULT" else group)
    keystone_client.register_keystoneauth_opts(conf)

    conf(argv, project='aodh', validate_default_values=True,
         default_config_files=config_files,
         version=version.version_info.version_string())

    ka_loading.load_auth_from_conf_options(conf, "service_credentials")
    log.setup(conf, 'aodh')

    # NOTE(tkajinam): guru cannot run with service under apache daemon, so when
    # aod-api running with mod_wsgi, the argv is [], we don't start guru.
    if argv:
        gmr.TextGuruMeditation.setup_autorun(version)


    profiler.setup(conf)