Пример #1
0
def launch_cfn_api(setup_logging=True):
    if setup_logging:
        logging.register_options(cfg.CONF)
    cfg.CONF(project='heat',
             prog='heat-api-cfn',
             version=version.version_info.version_string())
    if setup_logging:
        logging.setup(cfg.CONF, 'heat-api-cfn')
        logging.set_defaults()
    config.set_config_defaults()
    messaging.setup()

    app = config.load_paste_app()

    port = cfg.CONF.heat_api_cfn.bind_port
    host = cfg.CONF.heat_api_cfn.bind_host
    LOG.info('Starting Heat API on %(host)s:%(port)s', {
        'host': host,
        'port': port
    })
    profiler.setup('heat-api-cfn', host)
    gmr.TextGuruMeditation.setup_autorun(version)
    server = wsgi.Server('heat-api-cfn', cfg.CONF.heat_api_cfn)
    server.start(app, default_port=port)
    return server
Пример #2
0
def main():
    try:
        logging.register_options(cfg.CONF)
        cfg.CONF(project='heat',
                 prog='heat-api',
                 version=version.version_info.version_string())
        logging.setup(cfg.CONF, 'heat-api')
        messaging.setup()

        app = config.load_paste_app()

        port = cfg.CONF.heat_api.bind_port
        host = cfg.CONF.heat_api.bind_host
        LOG.info(_LI('Starting Heat REST API on %(host)s:%(port)s'), {
            'host': host,
            'port': port
        })
        profiler.setup('heat-api', host)
        gmr.TextGuruMeditation.setup_autorun(version)
        server = wsgi.Server('heat-api', cfg.CONF.heat_api)
        server.start(app, default_port=port)
        systemd.notify_once()
        server.wait()
    except RuntimeError as e:
        msg = six.text_type(e)
        sys.exit("ERROR: %s" % msg)
Пример #3
0
def main():
    try:
        logging.register_options(cfg.CONF)
        cfg.CONF(project='heat',
                 prog='heat-api-cloudwatch',
                 version=version.version_info.version_string())
        logging.setup(cfg.CONF, 'heat-api-cloudwatch')
        logging.set_defaults()
        messaging.setup()

        app = config.load_paste_app()

        port = cfg.CONF.heat_api_cloudwatch.bind_port
        host = cfg.CONF.heat_api_cloudwatch.bind_host
        LOG.info(_LI('Starting Heat CloudWatch API on %(host)s:%(port)s'),
                 {'host': host, 'port': port})
        profiler.setup('heat-api-cloudwatch', host)
        gmr.TextGuruMeditation.setup_autorun(version)
        server = wsgi.Server('heat-api-cloudwatch',
                             cfg.CONF.heat_api_cloudwatch)
        server.start(app, default_port=port)
        systemd.notify_once()
        server.wait()
    except RuntimeError as e:
        msg = six.text_type(e)
        sys.exit("ERROR: %s" % msg)
Пример #4
0
Файл: api.py Проект: timotm/heat
def launch_api(setup_logging=True):
    if setup_logging:
        logging.register_options(CONF)
    CONF(project='heat',
         prog='heat-api',
         version=version.version_info.version_string())
    if setup_logging:
        logging.setup(CONF, CONF.prog)
    LOG = logging.getLogger(CONF.prog)
    config.set_config_defaults()
    messaging.setup()

    app = config.load_paste_app()

    port = CONF.heat_api.bind_port
    host = CONF.heat_api.bind_host
    LOG.info('Starting Heat REST API on %(host)s:%(port)s', {
        'host': host,
        'port': port
    })
    profiler.setup(CONF.prog, host)
    gmr.TextGuruMeditation.setup_autorun(version)
    server = wsgi.Server(CONF.prog, CONF.heat_api)
    server.start(app, default_port=port)
    return server
Пример #5
0
def init_application():
    i18n.enable_lazy()

    # NOTE(hberaud): Call reset to ensure the ConfigOpts object doesn't
    # already contain registered options if the app is reloaded.
    CONF.reset()
    logging.register_options(CONF)
    CONF(project='heat',
         prog='heat-api-cfn',
         version=version.version_info.version_string())
    logging.setup(CONF, CONF.prog)
    logging.set_defaults()
    LOG = logging.getLogger(CONF.prog)
    config.set_config_defaults()
    messaging.setup()

    port = CONF.heat_api_cfn.bind_port
    host = CONF.heat_api_cfn.bind_host
    LOG.info('Starting Heat API on %(host)s:%(port)s', {
        'host': host,
        'port': port
    })
    profiler.setup(CONF.prog, host)

    return config.load_paste_app()
Пример #6
0
def init_application():
    i18n.enable_lazy()

    LOG = logging.getLogger('heat.api')

    logging.register_options(cfg.CONF)
    version = hversion.version_info.version_string()
    cfg.CONF(project='heat', prog='heat-api', version=version)
    logging.setup(cfg.CONF, 'heat-api')
    messaging.setup()

    port = cfg.CONF.heat_api.bind_port
    host = cfg.CONF.heat_api.bind_host
    profiler.setup('heat-api', host)
    LOG.info(_LI('Starting Heat REST API on %(host)s:%(port)s'),
             {'host': host, 'port': port})
    return config.load_paste_app()
Пример #7
0
def init_application():
    i18n.enable_lazy()

    LOG = logging.getLogger('heat.api')

    logging.register_options(cfg.CONF)
    version = hversion.version_info.version_string()
    cfg.CONF(project='heat', prog='heat-api', version=version)
    logging.setup(cfg.CONF, 'heat-api')
    config.set_config_defaults()
    messaging.setup()

    port = cfg.CONF.heat_api.bind_port
    host = cfg.CONF.heat_api.bind_host
    profiler.setup('heat-api', host)
    LOG.info(_LI('Starting Heat REST API on %(host)s:%(port)s'),
             {'host': host, 'port': port})
    return config.load_paste_app()
Пример #8
0
def init_application():
    i18n.enable_lazy()

    LOG = logging.getLogger('heat.api.cloudwatch')

    logging.register_options(cfg.CONF)
    cfg.CONF(project='heat',
             prog='heat-api-cloudwatch',
             version=version.version_info.version_string())
    logging.setup(cfg.CONF, 'heat-api-cloudwatch')
    logging.set_defaults()
    messaging.setup()

    port = cfg.CONF.heat_api_cloudwatch.bind_port
    host = cfg.CONF.heat_api_cloudwatch.bind_host
    LOG.info(_LI('Starting Heat CloudWatch API on %(host)s:%(port)s'),
             {'host': host, 'port': port})
    profiler.setup('heat-api-cloudwatch', host)

    return config.load_paste_app()
Пример #9
0
def init_application():
    i18n.enable_lazy()

    logging.register_options(CONF)
    CONF(project='heat',
         prog='heat-api-cfn',
         version=version.version_info.version_string())
    logging.setup(CONF, CONF.prog)
    logging.set_defaults()
    LOG = logging.getLogger(CONF.prog)
    config.set_config_defaults()
    messaging.setup()

    port = CONF.heat_api_cfn.bind_port
    host = CONF.heat_api_cfn.bind_host
    LOG.info('Starting Heat API on %(host)s:%(port)s',
             {'host': host, 'port': port})
    profiler.setup(CONF.prog, host)

    return config.load_paste_app()
Пример #10
0
def launch_api(setup_logging=True):
    if setup_logging:
        logging.register_options(cfg.CONF)
    cfg.CONF(project='heat', prog='heat-api',
             version=version.version_info.version_string())
    if setup_logging:
        logging.setup(cfg.CONF, 'heat-api')
    config.set_config_defaults()
    messaging.setup()

    app = config.load_paste_app()

    port = cfg.CONF.heat_api.bind_port
    host = cfg.CONF.heat_api.bind_host
    LOG.info(_LI('Starting Heat REST API on %(host)s:%(port)s'),
             {'host': host, 'port': port})
    profiler.setup('heat-api', host)
    gmr.TextGuruMeditation.setup_autorun(version)
    server = wsgi.Server('heat-api', cfg.CONF.heat_api)
    server.start(app, default_port=port)
    return server
Пример #11
0
Файл: api.py Проект: steveb/heat
def main():
    try:
        logging.register_options(cfg.CONF)
        cfg.CONF(project="heat", prog="heat-api", version=version.version_info.version_string())
        logging.setup(cfg.CONF, "heat-api")
        config.set_config_defaults()
        messaging.setup()

        app = config.load_paste_app()

        port = cfg.CONF.heat_api.bind_port
        host = cfg.CONF.heat_api.bind_host
        LOG.info(_LI("Starting Heat REST API on %(host)s:%(port)s"), {"host": host, "port": port})
        profiler.setup("heat-api", host)
        gmr.TextGuruMeditation.setup_autorun(version)
        server = wsgi.Server("heat-api", cfg.CONF.heat_api)
        server.start(app, default_port=port)
        systemd.notify_once()
        server.wait()
    except RuntimeError as e:
        msg = six.text_type(e)
        sys.exit("ERROR: %s" % msg)
Пример #12
0
def init_application():
    i18n.enable_lazy()

    LOG = logging.getLogger('heat.api.cloudwatch')

    logging.register_options(cfg.CONF)
    cfg.CONF(project='heat',
             prog='heat-api-cloudwatch',
             version=version.version_info.version_string())
    logging.setup(cfg.CONF, 'heat-api-cloudwatch')
    logging.set_defaults()
    config.set_config_defaults()
    messaging.setup()

    port = cfg.CONF.heat_api_cloudwatch.bind_port
    host = cfg.CONF.heat_api_cloudwatch.bind_host
    LOG.info('Starting Heat CloudWatch API on %(host)s:%(port)s', {
        'host': host,
        'port': port
    })
    profiler.setup('heat-api-cloudwatch', host)

    return config.load_paste_app()
Пример #13
0
"""


from oslo_config import cfg
import oslo_i18n as i18n
from oslo_log import log as logging

from heat.common import config
from heat.common.i18n import _LI
from heat.common import messaging
from heat.common import profiler
from heat import version

i18n.enable_lazy()

LOG = logging.getLogger('heat.api')

logging.register_options(cfg.CONF)
version = version.version_info.version_string()
cfg.CONF(project='heat', prog='heat-api', version=version)
logging.setup(cfg.CONF, 'heat-api')
messaging.setup()

port = cfg.CONF.heat_api.bind_port
host = cfg.CONF.heat_api.bind_host
LOG.info(_LI('Starting Heat REST API on %(host)s:%(port)s'),
         {'host': host, 'port': port})
profiler.setup('heat-api', host)

application = config.load_paste_app()
Пример #14
0
import oslo_i18n as i18n
from oslo_log import log as logging

from heat.common import config
from heat.common.i18n import _LI
from heat.common import messaging
from heat.common import profiler
from heat import version

i18n.enable_lazy()

LOG = logging.getLogger('heat.api.cloudwatch')

logging.register_options(cfg.CONF)
cfg.CONF(project='heat',
         prog='heat-api-cloudwatch',
         version=version.version_info.version_string())
logging.setup(cfg.CONF, 'heat-api-cloudwatch')
logging.set_defaults()
messaging.setup()

port = cfg.CONF.heat_api_cloudwatch.bind_port
host = cfg.CONF.heat_api_cloudwatch.bind_host
LOG.info(_LI('Starting Heat CloudWatch API on %(host)s:%(port)s'), {
    'host': host,
    'port': port
})
profiler.setup('heat-api-cloudwatch', host)

application = config.load_paste_app()