def __init__(self, threads=None): super(Service, self).__init__(threads=threads) storage_driver = cfg.CONF['service:zone_manager'].storage_driver self.storage = storage.get_storage(storage_driver) # Get a quota manager instance self.quota = quota.get_quota()
def __init__(self, *args, **kwargs): super(Service, self).__init__(*args, **kwargs) backend_driver = cfg.CONF['service:central'].backend_driver self.backend = backend.get_backend(backend_driver, self) policy.init_policy() # Get a storage connection self.storage_api = storage_api.StorageAPI() # Get a quota manager instance self.quota = quota.get_quota() self.network_api = network_api.get_network_api(cfg.CONF.network_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(QuotaTestCase, self).setUp() self.quota = quota.get_quota()
def setUp(self): super(StorageQuotaTest, self).setUp() self.config(quota_driver='storage') self.quota = quota.get_quota()
def setUp(self): super(QuotaTestCase, self).setUp() self.config(quota_driver=self.quota_driver) self.quota = quota.get_quota()
def quota(self): if not self._quota: # Get a quota manager instance self._quota = quota.get_quota() return self._quota
def quota(self): if not hasattr(self, '_quota'): # Get a quota manager instance self._quota = quota.get_quota() return self._quota