Add a read-only job queue module
authorIustin Pop <iustin@google.com>
Mon, 10 Dec 2012 18:38:49 +0000 (19:38 +0100)
committerIustin Pop <iustin@google.com>
Wed, 19 Dec 2012 13:37:18 +0000 (14:37 +0100)
commitaa79e62e75140c70e49a6ffaa7a3a959f4f880ac
treef8d9fb651641d29d7bd3a0b955a2a7e178c1043c
parentf94a9680a0c991de69db413c149143fbbb1669a0
Add a read-only job queue module

This patch adds implementation for a read-only job queue module,
together with "full" test (as full as can be in a lazy languageā€¦).

One note about the behaviour of the job queue is the handling of
opcodes that fail validation: the 'input' opcode actually is a
meta-type, which can hold either a real opcode or a plain JSValue, so
that we can still load jobs with invalid opcodes for querying. The
only downside of this is that, as opposed to Python code, we can't
show the correct summary for such an opcode - we try to parse the
OP_ID but not the extended OP_DSC_FIELD-equivalent.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>
Makefile.am
htest/Test/Ganeti/JQueue.hs [new file with mode: 0644]
htest/test.hs
htools/Ganeti/JQueue.hs [new file with mode: 0644]