def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._include_users = self.config.strict('include_users', default=[], types=[str], can_iterate=True) self._exclude_users = self.config.strict('exclude_users', default=[], types=[str], can_iterate=True) self._include_member_of = self.config.strict('include_member_of', default=[], types=[str], can_iterate=True) self._exclude_member_of = self.config.strict('exclude_member_of', default=[], types=[str], can_iterate=True) self._sender_location = self.config.strict('sender_location', default='any', types=[str], values=['any', 'internal', 'external'])
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) svc = self.service_resolver.get_service(PipelineService) assert isinstance(svc, PipelineService) self._aggregate = self.config.strict('aggregate', default='all', values=['all', 'any']) def make_filter(key): filter_config = config.section(key=key) module_name = filter_config.strict('module', types=[str], non_empty=True) \ if 'module' in filter_config.keys() else key return svc.get_filter(module_name=module_name, bus=self.bus, config=filter_config) self._filters = [make_filter(key=key) for key in self.config.keys() if key not in Aggregation.FILTER_ARGS]
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._header = self.config.strict('name', types=[str], non_empty=True) self._pattern = self.config.strict('pattern', types=[str], non_empty=True) self._miss_ok = self.config.strict('miss_ok', types=[bool], default=False)
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._lambda = self.config.strict('lambda', can_call=True)
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._tags = self.config.strict(key='tags', types=[unicode, str], can_iterate=True, default=[]) self._take = self.config.strict(key='take', types=[str], values=['all', 'any', 'one'], default='any') self._locations = self.config.strict(key='locations', types=[str], can_iterate=True, default=['subject'])
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._result = self.config.strict('value', default=True, types=[bool])
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._expression = self.config.strict('lambda', default=None, can_call=True) self._error = self.config.strict('error', default='fail', types=[str], values=['fail', 'pass', 'raise'])
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver)
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._with_referenced = self.config.strict('with_referenced', default=True, types=[bool]) self._max_size = self.config.strict('max_size', default=sys.maxint, types=[int]) self._min_size = self.config.strict('min_size', default=0, types=[int])
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._stage = self.config.strict('stage', types=[str], non_empty=True) self._result_in = self.config.strict('result_in', types=[str], values=['pass', 'skip', 'fail'], can_iterate=True, non_empty=True)
def __init__(self, name, bus, config, service_resolver): Filter.__init__(self, name=name, config=config, bus=bus, service_resolver=service_resolver) self._a = self.config.strict(key='a', types=[int], values=[0, 5, 10, 20], non_empty=True) self._b = self.config.strict(key='b', types=[int], values=[0, 5, 10, 20], non_empty=True)