Commit 02f7fe54 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Implement query for nodes

Reviewed-by: iustinp
parent 1f05af2b
......@@ -232,6 +232,11 @@ class ClientOps:
op = opcodes.OpQueryInstances(names=names, output_fields=fields)
return self._Query(op)
elif method == luxi.REQ_QUERY_NODES:
(names, fields) = args
op = opcodes.OpQueryNodes(names=names, output_fields=fields)
return self._Query(op)
else:
raise ValueError("Invalid operation")
......
......@@ -48,6 +48,7 @@ REQ_CANCEL_JOB = "CancelJob"
REQ_ARCHIVE_JOB = "ArchiveJob"
REQ_QUERY_JOBS = "QueryJobs"
REQ_QUERY_INSTANCES = "QueryInstances"
REQ_QUERY_NODES = "QueryNodes"
DEF_CTMO = 10
DEF_RWTO = 60
......@@ -292,4 +293,7 @@ class Client(object):
def QueryInstances(self, names, fields):
return self.CallMethod(REQ_QUERY_INSTANCES, (names, fields))
def QueryNodes(self, names, fields):
return self.CallMethod(REQ_QUERY_NODES, (names, fields))
# TODO: class Server(object)
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