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()
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
def __init__(self, config): self.config = config self.rest_api = CoreRestApi(self.config)