Statistics
| Branch: | Tag: | Revision:

root / lib / qlang.py @ 566db1f2

History | View | Annotate | Download (9 kB)

# Date Author Comment
b459a848 08/30/2011 11:24 am Andrea Spadaccini

DeprecationWarning fixes for pylint

In version 0.21, pylint unified all the disable-* (and enable-*)
directives to disable (resp. enable). This leads to a lot of
DeprecationWarning being emitted even if one uses the recommended
version of pylint (0.21.1, as stated in devnotes.rst)....

0b0ca0c0 08/08/2011 07:18 pm Michael Hanselmann

Fix epydoc breakage caused by f8638e288c7a

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

f8638e28 08/08/2011 06:42 pm Michael Hanselmann

Detect globbing patterns as query arguments

Short: this patch enables the use of “gnt-instance list '*.site'”.

Detailed description: This patch changes the command line interface code
to try to deduce the kind of filter from the arguments to a “list”
command. If it's a list of plain names an old-style name filter is used....

16629d10 08/05/2011 05:16 pm Michael Hanselmann

Implement globbing operator for filters

The operators “=*” and “!*” do globbing in filters, e.g.:

$ gnt-instance list --no-headers -o name 'name =* "*.site"'
inst1.site.example.com

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

3f2f55bb 04/18/2011 06:55 pm Michael Hanselmann

qlang: Add function to distinguish filters from names

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

7578ab0a 04/18/2011 06:55 pm Michael Hanselmann

qlang: Add parser for query filter language

With this parser, command line utilities will be able to provide filters
through query2 in a simplistic language. Example filters:

name  "node3.example.com" 
master or (name "node4.example.com")
be/memory == 128 and name =~ /^web/i...
bc385fa0 04/05/2011 03:20 pm Michael Hanselmann

qlang: Remove OP_GLOB operator

It'll be implemented using OP_REGEXP by the parser.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

51ae7c85 03/15/2011 03:11 pm Michael Hanselmann

qlang: Remove unused import

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

31554d0a 03/15/2011 02:57 pm Michael Hanselmann

qlang: Remove unused ReadSimpleFilter

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

341ff8e9 03/14/2011 12:49 pm Michael Hanselmann

qlang: Add some more documentation for filters

It's not perfect, but at least some more.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

3b877f08 03/07/2011 03:28 pm Michael Hanselmann

query: Add operator for truth

The “?” operator is the equivalent of “if var” in Python.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

88076fd1 03/01/2011 12:02 pm Michael Hanselmann

qlang: Add new operators

These are only used programmatically, not exposed to the user.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

60cba7f8 12/13/2010 05:15 pm Michael Hanselmann

qlang: Add function to build simple filter

This will be used in clients to build the filters for query2.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

a123dc19 11/29/2010 10:00 pm Michael Hanselmann

Add simple query filter parser

This parser reads only the format described by the query2
design document: either an empty filter or an OR operator
with equality checks as operands.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>