Public Member Functions | |
| __init__ (self, str rule) | |
| bool | is_match_all (self) |
| bool|None | accept (self, str agent_name) |
Public Attributes | |
| str | agent_name = "any" else rule |
Protected Attributes | |
| bool | _accept = True |
Filter for the names associated with client agents.
Parameters
----------
rule : `str`
String specifying filtering rule for a single name, or catch-all rule.
The rule consist of the agent name prefixed by minus or optional plus
sign. Catch-all rule uses name "any". If the rule starts with minus
sign then matching agent will be rejected. Otherwise matching agent
is accepted.
| bool | None lsst.dax.apdb.monitor.MonFilter.accept | ( | self, | |
| str | agent_name ) |
Return filtering decision for specified agent name.
Parameters
----------
agent_name : `str`
Name of the client agent that produces monitoring record.
Returns
-------
decision : `bool` or `None`
`True` if the agent is accepted, `False` if agent is rejected.
`None` is returned if this rule does not match agent name and
decision should be made by the next rule.
| bool lsst.dax.apdb.monitor.MonFilter.is_match_all | ( | self | ) |
Return `True` if this rule is a catch-all rule.
Returns
-------
is_match_all : `bool`
`True` if rule name is `-any`, `+any`, or `any`.