def __init__(self, *args, **kwargs): test = kwargs.get('test') if not CONF.memcached_servers and not test: raise RuntimeError(_('memcached_servers not defined')) self.mc = memorycache.get_client() self.db_allowed = kwargs.get('db_allowed', True) self.conductor_api = conductor.API(use_local=self.db_allowed)
def __init__(self, application): """middleware can use fake for testing.""" self.mc = memorycache.get_client() super(Lockout, self).__init__(application)
def __init__(self): self._cache = memorycache.get_client()
def __init__(self, scheduler_driver=None, *args, **kwargs): super(ConsoleAuthManager, self).__init__(*args, **kwargs) self.mc = memorycache.get_client()
def __init__(self): self._cache = memorycache.get_client() self.conductor_api = conductor.API()
def __init__(self, scheduler_driver=None, *args, **kwargs): super(ConsoleAuthManager, self).__init__(*args, **kwargs) self.mc = memorycache.get_client() self.compute_rpcapi = compute_rpcapi.ComputeAPI() self.conductor_api = conductor_api.API()