Add disk logical ID support in Objects.hs
authorIustin Pop <iustin@google.com>
Mon, 16 Jul 2012 12:11:03 +0000 (14:11 +0200)
committerIustin Pop <iustin@google.com>
Thu, 19 Jul 2012 08:01:48 +0000 (10:01 +0200)
commit2e12944a18538734d42483e51c402db7ab19826e
tree6127132afeb5366e494b3810afd889e780369a54
parent5c755a4dae09d5bb1bce61930d93ad817e71ea95
Add disk logical ID support in Objects.hs

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: Iustin Pop <iustin@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
htools/Ganeti/Objects.hs