Commit 43d51ef2 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

gnt-job list: Add option to include archived jobs

This provides a convenience option to include archived jobs in the
output list. It's equivalent to using “-o +archived”, but tab completion
is nicer.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 0422250e
......@@ -87,6 +87,9 @@ def ListJobs(opts, args):
selected_fields = ParseFields(opts.output, _LIST_DEF_FIELDS)
if opts.archived and "archived" not in selected_fields:
fmtoverride = {
"status": (_FormatStatus, False),
"summary": (lambda value: ",".join(str(item) for item in value), False),
......@@ -387,12 +390,17 @@ _FINISHED_OPT = \
help="Show finished jobs only")
cli_option("--archived", default=False,
action="store_true", dest="archived",
help="Include archived jobs in list (slow and expensive)")
commands = {
"list": (
ListJobs, [ArgJobId()],
"[job_id ...]",
"Lists the jobs and their status. The available fields can be shown"
" using the \"list-fields\" command (see the man page for details)."
......@@ -81,6 +81,9 @@ fields will be added to the default list. This allows one to quickly
see the default list plus a few other fields, instead of retyping
the entire list of fields.
To include archived jobs in the list the ``--archived`` option can be
The following options can be used to show only specific jobs:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment