History | View | Annotate | Download (7 kB)
qlang: Add function to distinguish filters from names
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
qlang: Add parser for query filter language
With this parser, command line utilities will be able to provide filtersthrough query2 in a simplistic language. Example filters:
name "node3.example.com" master or (name "node4.example.com") be/memory == 128 and name =~ /^web/i...
qlang: Remove OP_GLOB operator
It'll be implemented using OP_REGEXP by the parser.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: René Nussbaumer <rn@google.com>
qlang: Remove unused import
qlang: Remove unused ReadSimpleFilter
qlang: Add some more documentation for filters
It's not perfect, but at least some more.
query: Add operator for truth
The “?” operator is the equivalent of “if var” in Python.
qlang: Add new operators
These are only used programmatically, not exposed to the user.
qlang: Add function to build simple filter
This will be used in clients to build the filters for query2.
Add simple query filter parser
This parser reads only the format described by the query2design document: either an empty filter or an OR operatorwith equality checks as operands.