Commit a79ef2a5 authored by Adeodato Simo's avatar Adeodato Simo Committed by Iustin Pop
Browse files

Querying node groups: add luxi.REQ_QUERY_GROUPS

This also updates
Signed-off-by: default avatarAdeodato Simo <>
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarIustin Pop <>
parent 70a6a926
......@@ -56,6 +56,7 @@ REQ_AUTOARCHIVE_JOBS = "AutoArchiveJobs"
REQ_QUERY_JOBS = "QueryJobs"
REQ_QUERY_INSTANCES = "QueryInstances"
REQ_QUERY_NODES = "QueryNodes"
REQ_QUERY_GROUPS = "QueryGroups"
REQ_QUERY_EXPORTS = "QueryExports"
......@@ -495,6 +496,9 @@ class Client(object):
def QueryNodes(self, names, fields, use_locking):
return self.CallMethod(REQ_QUERY_NODES, (names, fields, use_locking))
def QueryGroups(self, names, fields, use_locking):
return self.CallMethod(REQ_QUERY_GROUPS, (names, fields, use_locking))
def QueryExports(self, nodes, use_locking):
return self.CallMethod(REQ_QUERY_EXPORTS, (nodes, use_locking))
......@@ -256,6 +256,15 @@ class ClientOps:
return self._Query(op)
elif method == luxi.REQ_QUERY_GROUPS:
(names, fields, use_locking) = args"Received group query request for %s", names)
if use_locking:
raise errors.OpPrereqError("Sync queries are not allowed",
op = opcodes.OpQueryGroups(names=names, output_fields=fields)
return self._Query(op)
elif method == luxi.REQ_QUERY_EXPORTS:
nodes, use_locking = args
if use_locking:
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