예제 #1
0
    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()
예제 #2
0
    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)
예제 #3
0
    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()
예제 #4
0
    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()
예제 #5
0
 def setUp(self):
     super(QuotaTestCase, self).setUp()
     self.quota = quota.get_quota()
예제 #6
0
 def setUp(self):
     super(StorageQuotaTest, self).setUp()
     self.config(quota_driver='storage')
     self.quota = quota.get_quota()
예제 #7
0
 def setUp(self):
     super(QuotaTestCase, self).setUp()
     self.config(quota_driver=self.quota_driver)
     self.quota = quota.get_quota()
예제 #8
0
 def setUp(self):
     super(QuotaTestCase, self).setUp()
     self.config(quota_driver=self.quota_driver)
     self.quota = quota.get_quota()
예제 #9
0
 def quota(self):
     if not self._quota:
         # Get a quota manager instance
         self._quota = quota.get_quota()
     return self._quota
예제 #10
0
 def quota(self):
     if not hasattr(self, '_quota'):
         # Get a quota manager instance
         self._quota = quota.get_quota()
     return self._quota
예제 #11
0
 def setUp(self):
     super(StorageQuotaTest, self).setUp()
     self.config(quota_driver='storage')
     self.quota = quota.get_quota()
예제 #12
0
 def quota(self):
     if not hasattr(self, '_quota'):
         # Get a quota manager instance
         self._quota = quota.get_quota()
     return self._quota