def __init__(self, storage_api=None): super(StorageQuota, self).__init__() if storage_api is None: storage_api = sapi.StorageAPI() self.storage_api = storage_api
def __init__(self, storage_api=None): super(StorageQuota, self).__init__() if storage_api is None: # TODO(kiall): Should this be tied to central's config? storage_driver = cfg.CONF['service:central'].storage_driver storage_api = sapi.StorageAPI(storage_driver) self.storage_api = storage_api
def __init__(self, *args, **kwargs): backend_driver = cfg.CONF['service:central'].backend_driver self.backend = backend.get_backend(backend_driver, self) kwargs.update( host=cfg.CONF.host, topic=cfg.CONF.central_topic, ) policy.init_policy() super(Service, self).__init__(*args, **kwargs) # Get a storage connection self.storage_api = storage_api.StorageAPI() # Get a quota manager instance self.quota = quota.get_quota()
def setUp(self): super(StorageAPITest, self).setUp() self.storage_api = storage_api.StorageAPI('sqlalchemy') self.storage_mock = mock.Mock() self.storage_api.storage = self.storage_mock
def __init__(self): # Get a storage connection storage_driver = cfg.CONF['service:mdns'].storage_driver self.storage_api = storage_api.StorageAPI(storage_driver)