Stub query2 call integration into QueryD
authorIustin Pop <iustin@google.com>
Thu, 23 Aug 2012 21:12:30 +0000 (23:12 +0200)
committerIustin Pop <iustin@google.com>
Mon, 3 Sep 2012 13:45:39 +0000 (15:45 +0200)
commit4cbe9bdad69c67c584bc73f43d3e690a4ad83f9b
treef18c307c60cde839f1e2fd9457fbc494902f2b0a
parent9abbb084a2187855e5c2ebf25fe516e386cda381
Stub query2 call integration into QueryD

This patch corrects the definitions in Qlang.hs to match what Python
expects on the wire; this means replacing some manual data type
definitions with 'buildObject' so that we get serialisation (and field
names) for free, adding (manually) JSON instances for types which are
not represented as objects in JSON, etc. Due to more TH usage, I had
to shift some definitions around, since TH breaks the "define in any
order" property (☹).

After that, we simply add a call into the stub Query/Query.hs module
which, for all queries, responds with "query not supported". The
reason for the deep directory structure is because I want to separate
the functionality into multiple submodules, for smaller module size
and readability.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Agata Murawska <agatamurawska@google.com>
Makefile.am
htools/Ganeti/Qlang.hs
htools/Ganeti/Query/Query.hs [new file with mode: 0644]
htools/Ganeti/Queryd.hs