Exemple #1
0
def main():
    try:
        logging.register_options(cfg.CONF)
        cfg.CONF(project='senlin',
                 prog='senlin-api',
                 version=version.version_info.version_string())
        config.set_config_defaults()
        logging.setup(cfg.CONF, 'senlin-api')
        objects.register_all()
        messaging.setup()

        app = wsgi.load_paste_app()

        host = cfg.CONF.senlin_api.bind_host
        port = cfg.CONF.senlin_api.bind_port
        LOG.info('Starting Senlin API on %(host)s:%(port)s', {
            'host': host,
            'port': port
        })
        profiler.setup('senlin-api', host)
        server = wsgi.Server('senlin-api', cfg.CONF.senlin_api)
        server.start(app, default_port=port)
        systemd.notify_once()
        server.wait()
    except RuntimeError as ex:
        sys.exit("ERROR: %s" % six.text_type(ex))
Exemple #2
0
def init_app():
    config.parse_args(sys.argv, 'senlin-api')
    logging.setup(cfg.CONF, 'senlin-api')
    objects.register_all()
    messaging.setup()

    profiler.setup('senlin-api', cfg.CONF.host)
    return wsgi.load_paste_app()
Exemple #3
0
def init_app():
    logging.register_options(cfg.CONF)
    cfg.CONF(project='senlin',
             prog='senlin-api',
             version=version.version_info.version_string())
    logging.setup(cfg.CONF, 'senlin-api')
    config.set_config_defaults()
    messaging.setup()

    profiler.setup('senlin-api', cfg.CONF.host)
    return wsgi.load_paste_app()
Exemple #4
0
def main():
    config.parse_args(sys.argv, 'senlin-api')
    logging.setup(CONF, 'senlin-api')
    gmr.TextGuruMeditation.setup_autorun(version)
    objects.register_all()
    messaging.setup()

    app = wsgi.load_paste_app()

    host = CONF.senlin_api.bind_host
    port = CONF.senlin_api.bind_port
    LOG.info('Starting Senlin API on %(host)s:%(port)s', {
        'host': host,
        'port': port
    })
    profiler.setup('senlin-api', host)
    server = wsgi.Server('senlin-api', CONF.senlin_api)
    server.start(app, default_port=port)
    systemd.notify_once()
    server.wait()
Exemple #5
0
def main():
    try:
        logging.register_options(cfg.CONF)
        cfg.CONF(project='senlin', prog='senlin-api',
                 version=version.version_info.version_string())
        logging.setup(cfg.CONF, 'senlin-api')
        messaging.setup()

        app = wsgi.load_paste_app()

        host = cfg.CONF.senlin_api.bind_host
        port = cfg.CONF.senlin_api.bind_port
        LOG.info(_LI('Starting Senlin API on %(host)s:%(port)s'),
                 {'host': host, 'port': port})
        server = wsgi.Server('senlin-api', cfg.CONF.senlin_api)
        server.start(app, default_port=port)
        systemd.notify_once()
        server.wait()
    except RuntimeError as ex:
        sys.exit("ERROR: %s" % six.text_type(ex))