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