1. 28 Aug, 2012 2 commits
  2. 19 Jul, 2012 1 commit
    • Iustin Pop's avatar
      Add disk logical ID support in Objects.hs · 2e12944a
      Iustin Pop authored
      
      
      This is a complex field, so we have to do a lot of manual work for now.
      
      The complexity arises from the fact that the contents of the field,
      and the way to parse it, depends on the disk type field, so we don't
      have a single, static way of parsing it. Hence we needed the
      extensions to the Template Haskell code.
      
      Since we now can both load and save the disk type, we can remove the
      in-memory (duplicate) disk type from the disk objects, relying only on
      the logical ID to hold the type information.
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
      2e12944a
  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