示例#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