def storage(self): LOG.debug(u'Loading storage driver') if self.conf.pooling: LOG.debug(u'Storage pooling enabled') storage_driver = pooling.DataDriver(self.conf, self.cache, self.control) else: storage_driver = storage_utils.load_storage_driver( self.conf, self.cache, control_driver=self.control) LOG.debug(u'Loading storage pipeline') return pipeline.DataDriver(self.conf, storage_driver, self.control)
def setUp(self): super(PoolQueuesTest, self).setUp() cache = oslo_cache.get_cache() control = utils.load_storage_driver(self.conf, cache, control_mode=True) self.pools_ctrl = control.pools_controller self.driver = pooling.DataDriver(self.conf, cache, control) self.controller = self.driver.queue_controller # fake two pools for _ in six.moves.xrange(2): self.pools_ctrl.create(str(uuid.uuid1()), 100, 'sqlite://:memory:')
def storage(self): LOG.debug(u'Loading storage driver') if self.conf.pooling: LOG.debug(u'Storage pooling enabled') storage_driver = pooling.DataDriver(self.conf, self.cache, self.control) if self.conf.profiler.enabled: storage_driver = profiler.trace_cls("pooling_data_" "driver")(storage_driver) else: storage_driver = storage_utils.load_storage_driver( self.conf, self.cache, control_driver=self.control) LOG.debug(u'Loading storage pipeline') return pipeline.DataDriver(self.conf, storage_driver, self.control)