hooks: Provide variables with post-opcode values
[ganeti-local] / lib / constants.py
index 816ad17..2ae1a43 100644 (file)
@@ -367,7 +367,7 @@ DT_SHARED_FILE = "sharedfile"
 DT_BLOCK = "blockdev"
 
 # the set of network-mirrored disk templates
-DTS_NET_MIRROR = frozenset([DT_DRBD8])
+DTS_INT_MIRROR = frozenset([DT_DRBD8])
 
 # the set of externally-mirrored disk templates (e.g. SAN, NAS)
 DTS_EXT_MIRROR = frozenset([DT_SHARED_FILE, DT_BLOCK])
@@ -385,7 +385,7 @@ DTS_MAY_ADOPT = frozenset([DT_PLAIN, DT_BLOCK])
 DTS_MUST_ADOPT = frozenset([DT_BLOCK])
 
 # the set of disk templates that allow migrations
-DTS_MIRRORED = frozenset.union(DTS_NET_MIRROR, DTS_EXT_MIRROR)
+DTS_MIRRORED = frozenset.union(DTS_INT_MIRROR, DTS_EXT_MIRROR)
 
 
 # logical disk types
@@ -702,6 +702,7 @@ OOB_COMMANDS = frozenset([OOB_POWER_ON, OOB_POWER_OFF, OOB_POWER_CYCLE,
 OOB_POWER_STATUS_POWERED = "powered"
 
 OOB_TIMEOUT = 60 # 60 seconds
+OOB_POWER_DELAY = 2.0 # 2 seconds
 
 OOB_STATUS_OK = "OK"
 OOB_STATUS_WARNING = "WARNING"
@@ -1026,15 +1027,19 @@ QR_INSTANCE = "instance"
 QR_NODE = "node"
 QR_LOCK = "lock"
 QR_GROUP = "group"
+QR_OS = "os"
 
 #: List of resources which can be queried using L{opcodes.OpQuery}
-QR_OP_QUERY = frozenset([QR_INSTANCE, QR_NODE, QR_GROUP])
+QR_VIA_OP = frozenset([QR_INSTANCE, QR_NODE, QR_GROUP, QR_OS])
 
 #: List of resources which can be queried using Local UniX Interface
-QR_OP_LUXI = QR_OP_QUERY.union([
+QR_VIA_LUXI = QR_VIA_OP.union([
   QR_LOCK,
   ])
 
+#: List of resources which can be queried using RAPI
+QR_VIA_RAPI = QR_VIA_LUXI
+
 # Query field types
 QFT_UNKNOWN = "unknown"
 QFT_TEXT = "text"