Statistics
| Branch: | Tag: | Revision:

root / lib / qlang.py @ 0f68f7fa

History | View | Annotate | Download (9.6 kB)

# Date Author Comment
45317e3a 12/19/2012 03:45 pm Iustin Pop

Remove some unused Python code

This patch removes code which is no longer used due to refactoring:

- http.InitSsl, last usage removed in commit 33231500 (“Convert RPC
client to PycURL”)
- rapi.baserlib.MakeParamsDict, last usage remove in commit 4e5a68f8...

76b62028 08/07/2012 12:48 pm Iustin Pop

Switch job IDs to numeric

This has been a long-standing cleanup item, which we've always
refrained from doing due to the high estimated effort needed.

In reality, it turned out that after some infrastructure improvements
(the previous patches), the actual job queue-related changes are quite...

6f287cf3 08/07/2012 12:48 pm Iustin Pop

Add infrastructure for building numeric namefield filters

Currently, all the CLI helpers in qlang.py and cli.py assume that all
namefields are string, which leads to various breakage in case the're
actually not.

To improve the flexibility of the helpers, we add a bit of...

2cfbc784 08/02/2012 03:46 pm Iustin Pop

Fix uses of OpPrereqError without code info

A while back, we did cleanup the code and ensured (manually) that use
of OpPrereqError includes an errors.ECODE_* field as second
argument. Since we cannot automate the check for this, it turns out
that more and more such usage has crept over the years, including in...

ad48eacc 06/14/2012 02:18 pm Michael Hanselmann

query2: Add <, >, <=, >= comparison operators

These can be used, for example, to get jobs submitted after a certain
timestamp.

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

03ec545a 03/30/2012 03:02 pm Michael Hanselmann

qlang.MakeFilter: Enable use of different name field

Jobs don't have a “name” field, so we must be able to control
the field used for simple filters.

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

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 <>