1. 08 May, 2012 2 commits
    • Iustin Pop's avatar
      Add decoding of Luxi calls and unittests for LuxiOp · cdd495ae
      Iustin Pop authored
      
      
      This patch adds a hand-coded decoder for LuxiCall arguments, as the
      data-structure is not uniform enough for automated generation (even
      for the serialisation, we had to add hints for some fields,
      de-serialisation is even harder).
      
      It also fixes a tiny issue with WaitForJobChange job ID encoding, and
      adds unittests for the encoding/decoding of LuxiOp structures.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      cdd495ae
    • Iustin Pop's avatar
      Auto-define a LuxiReq data type · 95d0d502
      Iustin Pop authored
      
      
      We currently auto-generate a LuxiOp data type, which holds the entire
      operation (including parameters). However, having a data type just for
      the method call would be useful, so let's change THH to also
      defineSADT for the Luxi constructors.
      
      Currently I don't know how to match automatically a LuxiReq to its
      LuxiOp counterpart (not even sure we need that), so any matching will
      remain manual.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      95d0d502
  2. 26 Mar, 2012 2 commits
  3. 13 Mar, 2012 1 commit
    • Iustin Pop's avatar
      htools: add partial implementation of lib/objects.py · b1e81520
      Iustin Pop authored
      
      
      This is partial since not all object types can be easily converted for
      now (will need some changes on the Python side for this).
      
      Most importantly, the *Params types do not have a good solution now:
      the Python code, due to its dynamic typing, hides the fact that we
      actually have two different types at play: a full type which needs to
      have all keys, and the 'partial' type which has slightly different
      behaviour. I've implemented these in Haskell as two different types,
      Full* and Partial*, which are derived automatically from a single
      Parameter type, together with the associated Fill* functions.
      
      Furthermore, HVParams is even more special, as its contents is not
      fixed but varies per hypervisor type, plus it has the HV_GLOBALS part
      which should not be customisable at instance type (yay for
      exceptions). As such, this should be written in Haskell as a
      multi-constructor type, but it's the only one so far and thus we don't
      have support for it yet.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      b1e81520
  4. 13 Jan, 2012 2 commits
  5. 07 Dec, 2011 1 commit
  6. 06 Dec, 2011 3 commits
  7. 17 Nov, 2011 1 commit
  8. 26 Oct, 2011 2 commits
  9. 14 Oct, 2011 1 commit
    • Iustin Pop's avatar
      Adjust htools code to new Luxi argument format · b20cbf06
      Iustin Pop authored
      This partially undoes commit 92678b3c
      
      , more specifically it removes the
      Store data type and the associated code, since all Luxi arguments are
      now lists.
      
      Furthermore, since the qfilter field on Query is complex (it's
      actually a tree structure), and we don't support it, turn it into a
      plain () type, which always gets encoded as JSNull ('null'), so that
      we can remove the optional field handling from Luxi (all fields are
      always required).
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
      b20cbf06
  10. 12 Oct, 2011 3 commits
  11. 11 Oct, 2011 1 commit
  12. 06 Oct, 2011 1 commit
  13. 03 Oct, 2011 4 commits