Revision b40c0e97 lib/server/masterd.py
b/lib/server/masterd.py | ||
---|---|---|
400 | 400 |
use_locking=use_locking) |
401 | 401 |
return self._Query(op) |
402 | 402 |
|
403 |
elif method == luxi.REQ_QUERY_NODES: |
|
404 |
(names, fields, use_locking) = args |
|
405 |
logging.info("Received node query request for %s", names) |
|
406 |
if use_locking: |
|
407 |
raise errors.OpPrereqError("Sync queries are not allowed", |
|
408 |
errors.ECODE_INVAL) |
|
409 |
op = opcodes.OpNodeQuery(names=names, output_fields=fields, |
|
410 |
use_locking=use_locking) |
|
411 |
return self._Query(op) |
|
412 |
|
|
413 |
elif method == luxi.REQ_QUERY_GROUPS: |
|
414 |
(names, fields, use_locking) = args |
|
415 |
logging.info("Received group query request for %s", names) |
|
416 |
if use_locking: |
|
417 |
raise errors.OpPrereqError("Sync queries are not allowed", |
|
418 |
errors.ECODE_INVAL) |
|
419 |
op = opcodes.OpGroupQuery(names=names, output_fields=fields) |
|
420 |
return self._Query(op) |
|
421 |
|
|
422 |
elif method == luxi.REQ_QUERY_NETWORKS: |
|
423 |
(names, fields, use_locking) = args |
|
424 |
logging.info("Received network query request for %s", names) |
|
425 |
if use_locking: |
|
426 |
raise errors.OpPrereqError("Sync queries are not allowed", |
|
427 |
errors.ECODE_INVAL) |
|
428 |
op = opcodes.OpNetworkQuery(names=names, output_fields=fields) |
|
429 |
return self._Query(op) |
|
430 |
|
|
431 |
elif method == luxi.REQ_QUERY_EXPORTS: |
|
432 |
(nodes, use_locking) = args |
|
433 |
if use_locking: |
|
434 |
raise errors.OpPrereqError("Sync queries are not allowed", |
|
435 |
errors.ECODE_INVAL) |
|
436 |
logging.info("Received exports query request") |
|
437 |
op = opcodes.OpBackupQuery(nodes=nodes, use_locking=use_locking) |
|
438 |
return self._Query(op) |
|
439 |
|
|
440 | 403 |
elif method == luxi.REQ_QUERY_CONFIG_VALUES: |
441 | 404 |
(fields, ) = args |
442 | 405 |
logging.info("Received config values query request for %s", fields) |
Also available in: Unified diff