Revision f1de3563 scripts/gnt-job
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" |
Also available in: Unified diff