Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / Query / Filter.hs @ 37904802

History | View | Annotate | Download (7.8 kB)

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

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

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

f3baf5ef 09/04/2012 04:51 pm Iustin Pop

Move JSON.hs and Compat.hs out from under HTools/

These two files are not htools-specific, so let's move them out of the
HTools subdirectory/module hierarchy and directly under Ganeti.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

01606931 09/04/2012 02:00 pm Iustin Pop

Implement compilation of regexes at creation time

This means that the verification of the correctness of the regex is
done once, at the deserialisation/creation time, as in the Python
code. To do this, we have to change the FilterRegex type from an alias...

4cab6703 09/04/2012 02:00 pm Iustin Pop

Rename the Qlang and Queryd modules

Per the new query module hierarchy, rename Qlang to Query/Language and
Queryd to Query/Server. This way, all query-related functionality is
now "contained" in the Query/ directory.

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

8a65c02b 09/04/2012 02:00 pm Iustin Pop

Add filtering support in Query

This adds basic infrastructure for filtering (fully functional except,
as usual, for runtime data), and then uses it for node queries.

Since the filtering exports regex matching as an external
functionality, we have to use a regex library. There are many flavours...