Fix inconsistency in python and haskell objects
authorOleg Ponomarev <oponomarev@google.com>
Mon, 12 Oct 2015 14:25:33 +0000 (16:25 +0200)
committerOleg Ponomarev <oponomarev@google.com>
Tue, 13 Oct 2015 14:36:42 +0000 (16:36 +0200)
commit8f62463576bdab81a17dbab6eda761f9e7703bc9
treeda2902153b245f0c96f6283b4239831605315b5d
parent8ddd073b1eaef4fcf5be4e80c03f5ee56693a07a
Fix inconsistency in python and haskell objects

Currently hv/disk_state_static parameters are supported only for cluster
object properly. For node groups and nodes they were introduced in
2da9f556, however only on the python side. This could cause problems
during upgrades from old versions.

This patch adds hv and disk states fields to haskell objects as a
notSerializedDefaultField which will fix the problem without the changes
in behaviour. Also it modifies corresponding haskell arbitrary instances.

The patch is inspired by e78fb0d6 and 553363a3.

Signed-off-by: Oleg Ponomarev <oponomarev@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
src/Ganeti/Objects.hs
test/hs/Test/Ganeti/Objects.hs