Revision a79ef2a5
b/lib/luxi.py | ||
---|---|---|
56 | 56 |
REQ_QUERY_JOBS = "QueryJobs" |
57 | 57 |
REQ_QUERY_INSTANCES = "QueryInstances" |
58 | 58 |
REQ_QUERY_NODES = "QueryNodes" |
59 |
REQ_QUERY_GROUPS = "QueryGroups" |
|
59 | 60 |
REQ_QUERY_EXPORTS = "QueryExports" |
60 | 61 |
REQ_QUERY_CONFIG_VALUES = "QueryConfigValues" |
61 | 62 |
REQ_QUERY_CLUSTER_INFO = "QueryClusterInfo" |
... | ... | |
495 | 496 |
def QueryNodes(self, names, fields, use_locking): |
496 | 497 |
return self.CallMethod(REQ_QUERY_NODES, (names, fields, use_locking)) |
497 | 498 |
|
499 |
def QueryGroups(self, names, fields, use_locking): |
|
500 |
return self.CallMethod(REQ_QUERY_GROUPS, (names, fields, use_locking)) |
|
501 |
|
|
498 | 502 |
def QueryExports(self, nodes, use_locking): |
499 | 503 |
return self.CallMethod(REQ_QUERY_EXPORTS, (nodes, use_locking)) |
500 | 504 |
|
b/lib/server/masterd.py | ||
---|---|---|
256 | 256 |
use_locking=use_locking) |
257 | 257 |
return self._Query(op) |
258 | 258 |
|
259 |
elif method == luxi.REQ_QUERY_GROUPS: |
|
260 |
(names, fields, use_locking) = args |
|
261 |
logging.info("Received group query request for %s", names) |
|
262 |
if use_locking: |
|
263 |
raise errors.OpPrereqError("Sync queries are not allowed", |
|
264 |
errors.ECODE_INVAL) |
|
265 |
op = opcodes.OpQueryGroups(names=names, output_fields=fields) |
|
266 |
return self._Query(op) |
|
267 |
|
|
259 | 268 |
elif method == luxi.REQ_QUERY_EXPORTS: |
260 | 269 |
nodes, use_locking = args |
261 | 270 |
if use_locking: |
Also available in: Unified diff