Beispiel #1
0
def main():
    """Entry point to start Blazar API wsgi server."""
    cfg.CONF(sys.argv[1:], project='blazar', prog='blazar-api')
    service_utils.prepare_service(sys.argv)
    if not CONF.enable_v1_api:
        app = v2_app.make_app()
    else:
        app = wsgi_app.VersionSelectorApplication()

    wsgi.server(eventlet.listen((CONF.host, CONF.port), backlog=500), app)
Beispiel #2
0
def main():
    cfg.CONF(project='blazar', prog='blazar-manager')
    service_utils.prepare_service(sys.argv)
    db_api.setup_db()
    notifier.init()
    service.launch(
        cfg.CONF,
        manager_service.ManagerService(),
        restart_method='mutate'
    ).wait()
Beispiel #3
0
def init_app():
    config_files = _get_config_files()
    CONF([],
         project='blazar',
         prog='blazar-api',
         default_config_files=config_files)
    service_utils.prepare_service()
    if not CONF.enable_v1_api:
        app = v2_app.make_app()
    else:
        app = wsgi_app.VersionSelectorApplication()

    return app
Beispiel #4
0
 def test_prepare_service(self):
     service.prepare_service()