Previously we had the Haskell data type, a hard-coded list of allowed ssconf keys in Python and individual ssconf constants.
This series defines one global list of all ssconf keys in Constants and also uses it to derive the Haskell data type from it. Also adds a test to check that WConfd creates ssconf entries for all possible keys. Petr Pudlak (7): Add a Monoid instance for FrozenSet Add a constant listing all possible ssconf keys Use the constant with valid ssconf keys in lib/ssconf.py THH: Add a helper for computing ssconf constructor names Generate the SSKey data type from the ssconf constants Move `Arbitrary ConfigData` to the Objects test module Add a test that WConfd uses all ssconf keys Makefile.am | 1 + lib/ssconf.py | 37 +------------------- src/Ganeti/ConstantUtils.hs | 5 +++ src/Ganeti/Constants.hs | 36 ++++++++++++++++++++ src/Ganeti/Ssconf.hs | 35 ++----------------- src/Ganeti/THH.hs | 5 +++ test/hs/Test/Ganeti/Objects.hs | 3 ++ test/hs/Test/Ganeti/Query/Network.hs | 3 -- test/hs/Test/Ganeti/WConfd/Ssconf.hs | 66 ++++++++++++++++++++++++++++++++++++ test/hs/htest.hs | 2 ++ 10 files changed, 121 insertions(+), 72 deletions(-) create mode 100644 test/hs/Test/Ganeti/WConfd/Ssconf.hs -- 2.4.3.573.g4eafbef
