def __init__(self, config, name, userOpt, itemName, discoverFun): Broker.__init__(self, config, name, userOpt, itemName, discoverFun) self._storageDict = config.getLookup( '%s storage access' % userOpt, {}, onChange=None, parser=lambda x: parseList(x, ' '), strfun=lambda x: str.join(' ', x))
def __init__(self, config, name, broker_prefix, item_name, discover_fun): Broker.__init__(self, config, name, broker_prefix, item_name, discover_fun) user_filter = config.get_filter(broker_prefix, '', default_matcher='blackwhite', default_filter='try_strict', default_order=ListOrder.matcher) self._item_list_start = user_filter.get_selector() if self._item_list_start: self._discover(discover_fun) if self._item_list_discovered: self._item_list_start = user_filter.filter_list(self._item_list_discovered)
def __init__(self, config, name, userOpt, itemName, discoverFun): Broker.__init__(self, config, name, userOpt, itemName, discoverFun) userFilter = config.getFilter(userOpt, '', defaultMatcher='blackwhite', defaultFilter='try_strict', defaultOrder=ListOrder.matcher) self._itemsStart = userFilter.filterList(None) itemsDiscover = list(self._discover(discoverFun).keys()) if itemsDiscover: self._itemsStart = userFilter.filterList(itemsDiscover) self._nIndex = 0
def __init__(self, config, name, userOpt, itemName, discoverFun): Broker.__init__(self, config, name, userOpt, itemName, discoverFun) userFilter = config.getFilter(userOpt, '', defaultMatcher='blackwhite', defaultFilter='try_strict', defaultOrder=ListOrder.matcher) self._itemsStart = userFilter.getSelector() if self._itemsStart: self._discover(discoverFun) if self._itemsDiscovered: self._itemsStart = userFilter.filterList(self._itemsDiscovered)
def _broker(self, reqs, items): result = Broker._broker(self, reqs, items) for (req_enum, req_value) in reqs: if (req_enum == WMS.STORAGE) and req_value: if result is None: result = [] for rval in req_value: result.extend(self._storage_lookup.lookup(rval)) return result
def _broker(self, reqs, items): result = Broker._broker(self, reqs, items) for (rType, rValue) in reqs: if (rType == WMS.STORAGE) and rValue: if result is None: result = [] for rval in rValue: result.extend(self._storageDict.lookup(rval)) return result
def __init__(self, config, name, broker_prefix, item_name, discover_fun): Broker.__init__(self, config, name, broker_prefix, item_name, discover_fun) self._item_list_start = config.get_list(broker_prefix, [], on_change=None) if not self._item_list_start: self._item_list_start = None
def __init__(self, config, name, broker_prefix, item_name, discover_fun): Broker.__init__(self, config, name, broker_prefix, item_name, discover_fun) self._storage_lookup = config.get_lookup('%s storage access' % broker_prefix, {}, on_change=None, parser=lambda x: parse_list(x, ' '), strfun=lambda x: str.join(' ', x))
def __init__(self, config, name, broker_prefix, item_name, discover_fun): Broker.__init__(self, config, name, broker_prefix, item_name, discover_fun) self._item_list_start = self._discover(discover_fun)
def _broker(self, reqs, items): items = Broker._broker(self, reqs, items) if items: items = [sorted(items)[self._item_idx % len(items)]] self._item_idx += 1 return items
def __init__(self, config, name, userOpt, itemName, discoverFun): Broker.__init__(self, config, name, userOpt, itemName, discoverFun) self._itemsStart = config.getList(userOpt, [], onChange=None) if not self._itemsStart: self._itemsStart = None
def __init__(self, config, name, userOpt, itemName, discoverFun): Broker.__init__(self, config, name, userOpt, itemName, discoverFun) self._itemsStart = self._discover(discoverFun)