Revision f1de3563
b/scripts/gnt-job | ||
---|---|---|
64 | 64 |
else: |
65 | 65 |
selected_fields = opts.output.split(",") |
66 | 66 |
|
67 |
output = GetClient().QueryJobs(None, selected_fields)
|
|
67 |
output = GetClient().QueryJobs(args, selected_fields)
|
|
68 | 68 |
if not opts.no_headers: |
69 | 69 |
# TODO: Implement more fields |
70 | 70 |
headers = { |
... | ... | |
84 | 84 |
else: |
85 | 85 |
headers = None |
86 | 86 |
|
87 |
# we don't have yet unitfields here |
|
88 |
unitfields = None |
|
89 |
numfields = None |
|
90 |
|
|
91 | 87 |
# change raw values to nicer strings |
92 | 88 |
for row in output: |
93 | 89 |
for idx, field in enumerate(selected_fields): |
... | ... | |
107 | 103 |
row[idx] = str(val) |
108 | 104 |
|
109 | 105 |
data = GenerateTable(separator=opts.separator, headers=headers, |
110 |
fields=selected_fields, unitfields=unitfields, |
|
111 |
numfields=numfields, data=output, units=opts.units) |
|
106 |
fields=selected_fields, data=output) |
|
112 | 107 |
for line in data: |
113 | 108 |
ToStdout(line) |
114 | 109 |
|
... | ... | |
314 | 309 |
|
315 | 310 |
|
316 | 311 |
commands = { |
317 |
'list': (ListJobs, ARGS_NONE, |
|
318 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT], |
|
319 |
"", "List the jobs and their status. The available fields are" |
|
312 |
'list': (ListJobs, ARGS_ANY, |
|
313 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, FIELDS_OPT], |
|
314 |
"[job_id ...]", |
|
315 |
"List the jobs and their status. The available fields are" |
|
320 | 316 |
" (see the man page for details): id, status, op_list," |
321 | 317 |
" op_status, op_result." |
322 | 318 |
" The default field" |
b/scripts/gnt-node | ||
---|---|---|
142 | 142 |
else: |
143 | 143 |
selected_fields = opts.output.split(",") |
144 | 144 |
|
145 |
output = GetClient().QueryNodes([], selected_fields, opts.do_locking)
|
|
145 |
output = GetClient().QueryNodes(args, selected_fields, opts.do_locking)
|
|
146 | 146 |
|
147 | 147 |
if not opts.no_headers: |
148 | 148 |
headers = _LIST_HEADERS |
... | ... | |
528 | 528 |
" (only for instances of type drbd)"), |
529 | 529 |
'info': (ShowNodeConfig, ARGS_ANY, [DEBUG_OPT], |
530 | 530 |
"[<node_name>...]", "Show information about the node(s)"), |
531 |
'list': (ListNodes, ARGS_NONE,
|
|
532 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, |
|
533 |
SUBMIT_OPT, SYNC_OPT],
|
|
534 |
"", "Lists the nodes in the cluster. The available fields"
|
|
531 |
'list': (ListNodes, ARGS_ANY,
|
|
532 |
[DEBUG_OPT, NOHDR_OPT, SEP_OPT, USEUNITS_OPT, FIELDS_OPT, SYNC_OPT],
|
|
533 |
"[nodes...]",
|
|
534 |
"Lists the nodes in the cluster. The available fields" |
|
535 | 535 |
" are (see the man page for details): %s" |
536 | 536 |
" The default field list is (in order): %s." % |
537 | 537 |
(", ".join(_LIST_HEADERS), ", ".join(_LIST_DEF_FIELDS))), |
Also available in: Unified diff