Create a new Ganeti/Types.hs module
There are already three cases where we copied type definitions between the htools-specific types into the main ganeti code. Let's stop doing this☺️ and create a common types module that holds these. Note that there already exists BasicTypes.hs, but that refers to very low-level types, and can't use TH derivation itself. A side effect of this unification is that there is a small conflict between AdminStatus/AdminOffline and InstanceStatus/AdminOffline. As such, I renamed AdminOffline and AdminDown to StatusOffline/StatusDown in the InstanceStatus type. The patch also moves the tests related to these types to a new test module. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Adeodato Simo <dato@google.com>
Showing
- Makefile.am 2 additions, 0 deletionsMakefile.am
- htest/Test/Ganeti/HTools/Node.hs 2 additions, 2 deletionshtest/Test/Ganeti/HTools/Node.hs
- htest/Test/Ganeti/HTools/Types.hs 2 additions, 13 deletionshtest/Test/Ganeti/HTools/Types.hs
- htest/Test/Ganeti/Objects.hs 1 addition, 3 deletionshtest/Test/Ganeti/Objects.hs
- htest/Test/Ganeti/TestHTools.hs 0 additions, 6 deletionshtest/Test/Ganeti/TestHTools.hs
- htest/Test/Ganeti/Types.hs 64 additions, 0 deletionshtest/Test/Ganeti/Types.hs
- htest/test.hs 2 additions, 0 deletionshtest/test.hs
- htools/Ganeti/HTools/Instance.hs 2 additions, 2 deletionshtools/Ganeti/HTools/Instance.hs
- htools/Ganeti/HTools/Types.hs 1 addition, 38 deletionshtools/Ganeti/HTools/Types.hs
- htools/Ganeti/Objects.hs 1 addition, 28 deletionshtools/Ganeti/Objects.hs
- htools/Ganeti/Types.hs 85 additions, 0 deletionshtools/Ganeti/Types.hs
Loading
Please register or sign in to comment