+# Query resources
+QR_INSTANCE = "instance"
+QR_NODE = "node"
+QR_LOCK = "lock"
+QR_GROUP = "group"
+
+#: List of resources which can be queried using L{opcodes.OpQuery}
+QR_OP_QUERY = frozenset([QR_INSTANCE, QR_NODE, QR_GROUP])
+
+#: List of resources which can be queried using LUXI
+QR_OP_LUXI = QR_OP_QUERY.union([
+ QR_LOCK,
+ ])
+
+# Query field types
+QFT_UNKNOWN = "unknown"
+QFT_TEXT = "text"
+QFT_BOOL = "bool"
+QFT_NUMBER = "number"
+QFT_UNIT = "unit"
+QFT_TIMESTAMP = "timestamp"
+QFT_OTHER = "other"
+
+#: All query field types
+QFT_ALL = frozenset([
+ QFT_UNKNOWN,
+ QFT_TEXT,
+ QFT_BOOL,
+ QFT_NUMBER,
+ QFT_UNIT,
+ QFT_TIMESTAMP,
+ QFT_OTHER,
+ ])
+
+# Query result field status (don't change or reuse values as they're used by
+# clients)
+#: Normal field status
+RS_NORMAL = 0
+#: Unknown field
+RS_UNKNOWN = 1
+#: No data (e.g. RPC error), can be used instead of L{RS_OFFLINE}
+RS_NODATA = 2
+#: Value unavailable/unsupported for item; if this field is supported
+#: but we cannot get the data for the moment, RS_NODATA or
+#: RS_OFFLINE should be used
+RS_UNAVAIL = 3
+#: Resource marked offline
+RS_OFFLINE = 4
+
+RS_ALL = frozenset([
+ RS_NORMAL,
+ RS_UNKNOWN,
+ RS_NODATA,
+ RS_UNAVAIL,
+ RS_OFFLINE,
+ ])
+