Revision 43d51ef2 lib/client/gnt_job.py
b/lib/client/gnt_job.py | ||
---|---|---|
87 | 87 |
""" |
88 | 88 |
selected_fields = ParseFields(opts.output, _LIST_DEF_FIELDS) |
89 | 89 |
|
90 |
if opts.archived and "archived" not in selected_fields: |
|
91 |
selected_fields.append("archived") |
|
92 |
|
|
90 | 93 |
fmtoverride = { |
91 | 94 |
"status": (_FormatStatus, False), |
92 | 95 |
"summary": (lambda value: ",".join(str(item) for item in value), False), |
... | ... | |
387 | 390 |
const=constants.JOBS_FINALIZED, |
388 | 391 |
help="Show finished jobs only") |
389 | 392 |
|
393 |
_ARCHIVED_OPT = \ |
|
394 |
cli_option("--archived", default=False, |
|
395 |
action="store_true", dest="archived", |
|
396 |
help="Include archived jobs in list (slow and expensive)") |
|
397 |
|
|
390 | 398 |
|
391 | 399 |
commands = { |
392 | 400 |
"list": ( |
393 | 401 |
ListJobs, [ArgJobId()], |
394 | 402 |
[NOHDR_OPT, SEP_OPT, FIELDS_OPT, VERBOSE_OPT, FORCE_FILTER_OPT, |
395 |
_PENDING_OPT, _RUNNING_OPT, _ERROR_OPT, _FINISHED_OPT], |
|
403 |
_PENDING_OPT, _RUNNING_OPT, _ERROR_OPT, _FINISHED_OPT, _ARCHIVED_OPT],
|
|
396 | 404 |
"[job_id ...]", |
397 | 405 |
"Lists the jobs and their status. The available fields can be shown" |
398 | 406 |
" using the \"list-fields\" command (see the man page for details)." |
Also available in: Unified diff