Split 'Query.Language.ItemType' in two sub-types
The QR_VIA_OP/QR_VIA_LUXI types in Python are using yet another validation mode: QR_VIA_OP is the base type, and QR_VIA_LUXI extends it (when doing luxi queries). But on the wire they have the same representation. To accommodate this properly, we split the ItemType in two: a QueryTypeOp and a QueryTypeLuxi, joining them back together in ItemType itself. This requires custom serialisation/deserialisation, but allows us to express correctly that at opcode level, we only accept a QueryTypeOp, but at Luxi query level, we accept either of them. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Showing
- htest/Test/Ganeti/Query/Filter.hs 1 addition, 1 deletionhtest/Test/Ganeti/Query/Filter.hs
- htest/Test/Ganeti/Query/Language.hs 9 additions, 0 deletionshtest/Test/Ganeti/Query/Language.hs
- htest/Test/Ganeti/Query/Query.hs 19 additions, 13 deletionshtest/Test/Ganeti/Query/Query.hs
- htools/Ganeti/HTools/Backend/Luxi.hs 12 additions, 9 deletionshtools/Ganeti/HTools/Backend/Luxi.hs
- htools/Ganeti/Query/Language.hs 38 additions, 4 deletionshtools/Ganeti/Query/Language.hs
- htools/Ganeti/Query/Query.hs 8 additions, 6 deletionshtools/Ganeti/Query/Query.hs
- htools/Ganeti/Query/Server.hs 2 additions, 2 deletionshtools/Ganeti/Query/Server.hs
Loading
Please register or sign in to comment