Statistics
| Branch: | Tag: | Revision:

root / lib / query.py @ 1d5f1b4c

History | View | Annotate | Download (33.5 kB)

# Date Author Comment
52b5d286 01/06/2011 05:19 pm René Nussbaumer

Support query of node field 'powered'

This field is based on OOB support and is only available if there's oob
support for that node.

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

8e21cfc0 01/06/2011 03:01 pm Adeodato Simo

query.py: add definitions for node group queries

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

e571ee44 01/06/2011 03:01 pm Adeodato Simo

ganeti.query_unittest.py: test lock fields too

Additionally, change TestQueryFields.testSomeFields() to handle lists of
fields shorter than 20 elements.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

24d16f76 01/06/2011 12:08 pm Michael Hanselmann

Convert “gnt-debug locks” to query2

Locks can now be queried using “Query(what="lock", …)” over LUXI.

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

a6070ef7 01/05/2011 12:39 pm Michael Hanselmann

query2: Add new field status “offline”

This allows “gnt-node list” to show the difference between modes marked
offline and nodes with e.g. RPC errors (“(nodata)”). node1 is the
master, node2's node daemon crashed and node3 is marked offline:

$ gnt-node list -o name,offline,dtotal,dfree...

b60fcb6f 12/21/2010 03:18 pm Michael Hanselmann

query: Add wrapper for creating response object

It'll be used for querying locks.

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

aa29e95f 12/21/2010 03:18 pm Michael Hanselmann

Move QueryFields to query module

Also replace “sorted” with “utils.NiceSort” now that it supports a key
function.

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

145bea54 12/13/2010 05:15 pm Michael Hanselmann

query: Handle items missing timestamps

In upgraded configurations, some items might miss the “ctime” and/or
“mtime” values and need to be handled specially.

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

1c8addc6 12/10/2010 05:48 pm Michael Hanselmann

query: Add definition for instance queries

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

89ce4acc 12/08/2010 08:00 pm Michael Hanselmann

query: Improve error checking

- Show only field definition, not callback when a result row is
inconsistent
- Show list of duplicate titles if there are any (module load time)

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Adeodato Simo <>

8235fe04 11/29/2010 10:00 pm Michael Hanselmann

Add node query definition

This includes a bunch of helper functions which can be helpful for other
queries, too. Unittests are included.

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

4ca96421 11/29/2010 10:00 pm Michael Hanselmann

Add utility class for definition-based data queries

While not immediately visible, using definition-based queries will allow
for a number of optimizations and simplifications. This patch just
contains the utility class used for executing queries.

Signed-off-by: Michael Hanselmann <>...