Ejemplo n.º 1
0
class Controller(object):
    def __init__(self, config):
        self.config = config
        self.rest_api = CoreRestApi(self.config)

    def run(self):
        logger.debug('xivo-confd running...')
        self.rest_api.run()
Ejemplo n.º 2
0
def setup_app(config):
    app.secret_key = os.urandom(24)
    app.config.update(config)

    http_helpers.add_logger(app, logger)

    app.debug = config.get('debug', False)

    auth.set_config(config)
    core = CoreRestApi(app, api, auth)
    plugin_manager.load_plugins(core)

    load_cors(app)

    return app
Ejemplo n.º 3
0
 def __init__(self, config):
     self.config = config
     self.rest_api = CoreRestApi(self.config)