Hs2Py constants: reboot behaviour
authorJose A. Lopes <jabolopes@google.com>
Fri, 4 Oct 2013 16:11:46 +0000 (18:11 +0200)
committerJose A. Lopes <jabolopes@google.com>
Tue, 8 Oct 2013 12:57:28 +0000 (14:57 +0200)
Add reboot behaviour 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 5f0c05e..6f19f47 100644 (file)
@@ -502,14 +502,9 @@ INSTANCE_REBOOT_HARD = _constants.INSTANCE_REBOOT_HARD
 INSTANCE_REBOOT_FULL = _constants.INSTANCE_REBOOT_FULL
 REBOOT_TYPES = _constants.REBOOT_TYPES
 
-# instance reboot behaviors
-INSTANCE_REBOOT_ALLOWED = "reboot"
-INSTANCE_REBOOT_EXIT = "exit"
-
-REBOOT_BEHAVIORS = compat.UniqueFrozenset([
-  INSTANCE_REBOOT_ALLOWED,
-  INSTANCE_REBOOT_EXIT,
-  ])
+INSTANCE_REBOOT_ALLOWED = _constants.INSTANCE_REBOOT_ALLOWED
+INSTANCE_REBOOT_EXIT = _constants.INSTANCE_REBOOT_EXIT
+REBOOT_BEHAVIORS = _constants.REBOOT_BEHAVIORS
 
 VTYPE_STRING = _constants.VTYPE_STRING
 VTYPE_MAYBE_STRING = _constants.VTYPE_MAYBE_STRING
index c2d416e..f87be5b 100644 (file)
@@ -1293,6 +1293,17 @@ esScripts =
 esParametersFile :: String
 esParametersFile = "parameters.list"
 
+-- * Instance reboot behaviors
+
+instanceRebootAllowed :: String
+instanceRebootAllowed = "reboot"
+
+instanceRebootExit :: String
+instanceRebootExit = "exit"
+
+rebootBehaviors :: [String]
+rebootBehaviors = [instanceRebootAllowed, instanceRebootExit]
+
 -- * VTypes
 
 vtypeBool :: VType