Hs2Py constants: '/etc/hosts' and job queue
authorJose A. Lopes <jabolopes@google.com>
Fri, 4 Oct 2013 17:24:55 +0000 (19:24 +0200)
committerJose A. Lopes <jabolopes@google.com>
Tue, 8 Oct 2013 12:57:29 +0000 (14:57 +0200)
Add '/etc/hosts' and job queue related constants to the Haskell to Python constant generation.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

lib/constants.py
src/Ganeti/HsConstants.hs

index 16ccdbf..85e91dd 100644 (file)
@@ -1194,22 +1194,15 @@ ELOG_MESSAGE = _constants.ELOG_MESSAGE
 ELOG_REMOTE_IMPORT = _constants.ELOG_REMOTE_IMPORT
 ELOG_JQUEUE_TEST = _constants.ELOG_JQUEUE_TEST
 
-# /etc/hosts modification
-ETC_HOSTS_ADD = "add"
-ETC_HOSTS_REMOVE = "remove"
-
-# Job queue test
-JQT_MSGPREFIX = "TESTMSG="
-JQT_EXPANDNAMES = "expandnames"
-JQT_EXEC = "exec"
-JQT_LOGMSG = "logmsg"
-JQT_STARTMSG = "startmsg"
-JQT_ALL = compat.UniqueFrozenset([
-  JQT_EXPANDNAMES,
-  JQT_EXEC,
-  JQT_LOGMSG,
-  JQT_STARTMSG,
-  ])
+ETC_HOSTS_ADD = _constants.ETC_HOSTS_ADD
+ETC_HOSTS_REMOVE = _constants.ETC_HOSTS_REMOVE
+
+JQT_MSGPREFIX = _constants.JQT_MSGPREFIX
+JQT_EXPANDNAMES = _constants.JQT_EXPANDNAMES
+JQT_EXEC = _constants.JQT_EXEC
+JQT_LOGMSG = _constants.JQT_LOGMSG
+JQT_STARTMSG = _constants.JQT_STARTMSG
+JQT_ALL = _constants.JQT_ALL
 
 # Query resources
 QR_CLUSTER = "cluster"
index 9516cf4..b2d5452 100644 (file)
@@ -2908,6 +2908,34 @@ elogRemoteImport = Types.eLogTypeToRaw ELogRemoteImport
 elogJqueueTest :: String
 elogJqueueTest = Types.eLogTypeToRaw ELogJqueueTest
 
+-- * /etc/hosts modification
+
+etcHostsAdd :: String
+etcHostsAdd = "add"
+
+etcHostsRemove :: String
+etcHostsRemove = "remove"
+
+-- * Job queue test
+
+jqtMsgprefix :: String
+jqtMsgprefix = "TESTMSG="
+
+jqtExec :: String
+jqtExec = "exec"
+
+jqtExpandnames :: String
+jqtExpandnames = "expandnames"
+
+jqtLogmsg :: String
+jqtLogmsg = "logmsg"
+
+jqtStartmsg :: String
+jqtStartmsg = "startmsg"
+
+jqtAll :: FrozenSet String
+jqtAll = ConstantUtils.mkSet [jqtExec, jqtExpandnames, jqtLogmsg, jqtStartmsg]
+
 -- * Confd
 
 confdProtocolVersion :: Int