def _init_driver(self, pool_id): """Given a pool name, returns a storage driver. :param pool_id: The name of a pool. :type pool_id: six.text_type :returns: a storage driver :rtype: zaqar.storage.base.DataDriverBase """ pool = self._pools_ctrl.get(pool_id, detailed=True) conf = utils.dynamic_conf(pool['uri'], pool['options'], conf=self._conf) return utils.load_storage_driver(conf, self._cache)
def _init_driver(self, pool_id): """Given a pool name, returns a storage driver. :param pool_id: The name of a pool. :type pool_id: six.text_type :returns: a storage driver :rtype: zaqar.storage.base.DataDriverBase """ pool = self._pools_ctrl.get(pool_id, detailed=True) conf = utils.dynamic_conf(pool['uri'], pool['options'], conf=self._conf) return utils.load_storage_driver(conf, self._cache)
def _init_driver(self, pool_id, pool_conf=None): """Given a pool name, returns a storage driver. :param pool_id: The name of a pool. :type pool_id: six.text_type :returns: a storage driver :rtype: zaqar.storage.base.DataDriverBase """ if pool_id is not None: pool = self._pools_ctrl.get(pool_id, detailed=True) else: pool = pool_conf conf = utils.dynamic_conf(pool["uri"], pool["options"], conf=self._conf) storage = utils.load_storage_driver(conf, self._cache, control_driver=self.control) return pipeline.DataDriver(conf, storage, self.control)
def _init_driver(self, pool_id, pool_conf=None): """Given a pool name, returns a storage driver. :param pool_id: The name of a pool. :type pool_id: six.text_type :returns: a storage driver :rtype: zaqar.storage.base.DataDriverBase """ if pool_id is not None: pool = self._pools_ctrl.get(pool_id, detailed=True) else: pool = pool_conf conf = utils.dynamic_conf(pool['uri'], pool['options'], conf=self._conf) storage = utils.load_storage_driver(conf, self._cache, control_driver=self.control) return pipeline.DataDriver(conf, storage, self.control)