On Tue, 7 Jul 2015 at 11:20 'Petr Pudlak' via ganeti-devel < [email protected]> wrote:
> Signed-off-by: Petr Pudlak <[email protected]> > --- > src/Ganeti/Ssconf.hs | 34 ++-------------------------------- > 1 file changed, 2 insertions(+), 32 deletions(-) > > diff --git a/src/Ganeti/Ssconf.hs b/src/Ganeti/Ssconf.hs > index ae8283d..99ad3e5 100644 > --- a/src/Ganeti/Ssconf.hs > +++ b/src/Ganeti/Ssconf.hs > @@ -68,6 +68,7 @@ import qualified Text.JSON as J > import qualified AutoConf > import Ganeti.BasicTypes > import qualified Ganeti.Constants as C > +import qualified Ganeti.ConstantUtils as CU > import Ganeti.JSON (GenericContainer(..), HasStringRepr(..)) > import qualified Ganeti.Path as Path > import Ganeti.THH > @@ -86,38 +87,7 @@ sSFilePrefix :: FilePath > sSFilePrefix = C.ssconfFileprefix > > $(declareLADT ''String "SSKey" ( > - [ ("SSClusterName", C.ssClusterName) > - , ("SSClusterTags", C.ssClusterTags) > - , ("SSFileStorageDir", C.ssFileStorageDir) > - , ("SSSharedFileStorageDir", C.ssSharedFileStorageDir) > - , ("SSGlusterStorageDir", C.ssGlusterStorageDir) > - , ("SSMasterCandidates", C.ssMasterCandidates) > - , ("SSMasterCandidatesIps", C.ssMasterCandidatesIps) > - , ("SSMasterCandidatesCerts", C.ssMasterCandidatesCerts) > - , ("SSMasterIp", C.ssMasterIp) > - , ("SSMasterNetdev", C.ssMasterNetdev) > - , ("SSMasterNetmask", C.ssMasterNetmask) > - , ("SSMasterNode", C.ssMasterNode) > - , ("SSNodeList", C.ssNodeList) > - , ("SSNodePrimaryIps", C.ssNodePrimaryIps) > - , ("SSNodeSecondaryIps", C.ssNodeSecondaryIps) > - , ("SSNodeVmCapable", C.ssNodeVmCapable) > - , ("SSOfflineNodes", C.ssOfflineNodes) > - , ("SSOnlineNodes", C.ssOnlineNodes) > - , ("SSPrimaryIpFamily", C.ssPrimaryIpFamily) > - , ("SSInstanceList", C.ssInstanceList) > - , ("SSReleaseVersion", C.ssReleaseVersion) > - , ("SSHypervisorList", C.ssHypervisorList) > - , ("SSMaintainNodeHealth", C.ssMaintainNodeHealth) > - , ("SSUidPool", C.ssUidPool) > - , ("SSNodegroups", C.ssNodegroups) > - , ("SSNetworks", C.ssNetworks) > - , ("SSEnabledUserShutdown", C.ssEnabledUserShutdown) > - ] ++ > - -- Automatically generate SSHvparamsXxx for each hypervisor type: > - map ((("SSHvparams" ++) . show) > - &&& ((C.ssHvparamsPref ++) . Types.hypervisorToRaw)) > - [minBound..maxBound] > + map (ssconfConstructorName &&& id) . CU.toList $ C.validSsKeys > )) > instance HasStringRepr SSKey where > -- > 2.4.3.573.g4eafbef > > Neat. :) LGTM -- Helga Velroyen Software Engineer [email protected] Google Germany GmbH Dienerstraße 12 80331 München Geschäftsführer: Graham Law, Christine Elizabeth Flores Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind, leiten Sie diese bitte nicht weiter, informieren Sie den Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank. This e-mail is confidential. If you are not the right addressee please do not forward it, please inform the sender, and please erase this e-mail including any attachments. Thanks.
