Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / Query @ 5183e8be

Name Size
Common.hs 5.5 kB
Filter.hs 7.8 kB
Group.hs 3.3 kB
Language.hs 14.1 kB
Node.hs 8.2 kB
Query.hs 8.5 kB
Server.hs 9 kB
Types.hs 2.1 kB

Latest revisions

# Date Author Comment
5183e8be 10/25/2012 01:05 pm Iustin Pop

Convert query path from string errors to GanetiException

This patch converts all the call paths from 'Result' (which contains
just string errors) to 'ErrorResult', which holds
GanetiException-encoded errors. We can now return proper
OpPrereq/OpExec errors to the clients of the luxi/query socket....

a2ae14e9 10/11/2012 01:03 pm Iustin Pop

Add a helper for query field checks

… and also use it to simplify 'needsLiveData'. Additionally, add an
explicit export list to Ganeti.Query.Types, since otherwise we'd
(re)export all imported symbols.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

bc4cdeef 10/11/2012 01:03 pm Iustin Pop

Add functionality for checking validity of names

This replicates in the Haskell Query2 implementation the behaviour of
the Python code: if a "simple" filter is passed (one that contains
only Or aggregators and EQ binary ops on the name field), then an
failure is flagged if the given values are not known....

a41c337e 10/11/2012 01:03 pm Iustin Pop

Use the new name filtering behaviour in query

We do this not quite generically, which means we have to add
another layer in the call chain, and rename the current query
function, plus add special-case code for each query type. Hopefully we
will be able to improve on this in the future....

1fc3812c 10/11/2012 01:03 pm Iustin Pop

Switch ordering of names on query to niceSort

This makes the "all" names queries consistent with the Python
results. The change requires updating the unittests, at which point a
duplicate error message is simplified.

Signed-off-by: Iustin Pop <>...

90d033ef 10/11/2012 01:03 pm Iustin Pop

Add function for getting a group's merged disk params

… and use it in the Query implementation, removing the last
non-correct query field for Groups.

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

b04dc242 10/11/2012 01:03 pm Iustin Pop

Simplify a bit queryFields

We don't add a type class for fully-generic handling, but we do
abstract the duplicate part.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

5227de56 10/11/2012 01:03 pm Iustin Pop

Fix the node powered field

When initially implementing the node query, I thought the 'powered'
field is a representation of the run-time powered status, which would
make its query complex.

In reality, it's a simple config query, which we can support
easily. We also add a small helper, so that we don't hardcode the...

b3d17f52 10/11/2012 01:03 pm Iustin Pop

Add a makeSimpleFilter function

And associated unittests. This will be needed for classic-style
queries.

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

cd67e337 10/11/2012 01:03 pm Iustin Pop

Add support for classic queries

This patch adds support for classic-style queries (before query2) to
the query socket server. The patch is rather trivial, since as in
Python we just piggy-back on the query2 implementation.

Signed-off-by: Iustin Pop <>...

View revisions

Also available in: Atom