Currently, we have two places where we define the
list of all Ganeti daemons: the type GanetiDaemon
in Ganeti.Runtime and the constant daemons
in Ganeti.Constants. Avoid this duplication by
using Bounded GanetiDaemons and Enum GanetiDaemons.

Signed-off-by: Klaus Aehlig <[email protected]>
---
 src/Ganeti/Constants.hs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/Ganeti/Constants.hs b/src/Ganeti/Constants.hs
index 03b32c5..97093df 100644
--- a/src/Ganeti/Constants.hs
+++ b/src/Ganeti/Constants.hs
@@ -377,12 +377,8 @@ kvmd = Runtime.daemonName GanetiKvmd
 
 daemons :: FrozenSet String
 daemons =
-  ConstantUtils.mkSet [confd,
-                       luxid,
-                       masterd,
-                       mond,
-                       noded,
-                       rapi]
+  ConstantUtils.mkSet
+  $ map Runtime.daemonName [minBound .. maxBound]
 
 defaultConfdPort :: Int
 defaultConfdPort = 1814
-- 
2.4.3.573.g4eafbef

Reply via email to