Commit 66baeccc authored by Iustin Pop's avatar Iustin Pop
Browse files

Add one new luxi query: cluster info

This is the last query that RAPI executes via opcodes and is purely
static (config values only). As such, we can convert it safely to a
query instead of job.

Reviewed-by: imsnah
parent 81a49123
......@@ -255,6 +255,10 @@ class ClientOps:
op = opcodes.OpQueryConfigValues(output_fields=fields)
return self._Query(op)
elif method == luxi.REQ_QUERY_CLUSTER_INFO:
op = opcodes.OpQueryClusterInfo()
return self._Query(op)
elif method == luxi.REQ_QUEUE_SET_DRAIN_FLAG:
drain_flag = args
return queue.SetDrainFlag(drain_flag)
......
......@@ -54,6 +54,7 @@ REQ_QUERY_INSTANCES = "QueryInstances"
REQ_QUERY_NODES = "QueryNodes"
REQ_QUERY_EXPORTS = "QueryExports"
REQ_QUERY_CONFIG_VALUES = "QueryConfigValues"
REQ_QUERY_CLUSTER_INFO = "QueryClusterInfo"
REQ_QUEUE_SET_DRAIN_FLAG = "SetDrainFlag"
DEF_CTMO = 10
......@@ -366,6 +367,9 @@ class Client(object):
def QueryExports(self, nodes, use_locking):
return self.CallMethod(REQ_QUERY_EXPORTS, (nodes, use_locking))
def QueryClusterInfo(self):
return self.CallMethod(REQ_QUERY_CLUSTER_INFO, ())
def QueryConfigValues(self, fields):
return self.CallMethod(REQ_QUERY_CONFIG_VALUES, fields)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment