Bug 907658 - bkr job-list output is neither human-friendly nor shell-friendly
Summary: bkr job-list output is neither human-friendly nor shell-friendly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.12
Assignee: Amit Saha
QA Contact: Qixiang Wan
URL:
Whiteboard: CommandLineEnhancement
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-04 22:49 UTC by Dan Callaghan
Modified: 2018-02-06 00:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-11 04:55:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Dan Callaghan 2013-02-04 22:49:54 UTC
I wanted to use the output of bkr job-list in my shell (to pass on to bkr job-modify) but it returns JSON/Python which I have no easy way to parse in bash. It's also not easy to read for humans, if the list of jobs is more than a handful long.

It would probably make more sense if it output one job id per line (and no count). Then it would be possible to do things like:

    bkr job-modify --retention-tag=scratch $(bkr job-list --mine)

We could also add a --format option like we have for bkr distros-list.

Comment 3 Qixiang Wan 2013-03-27 09:03:59 UTC
Verified with beaker-0.11.3-1.git.210.bda2c22.

new option --format is supported by the updated client command 'job-list':
$ bkr job-list --format=json
["J:8", "J:7", "J:6", "J:5", "J:4", "J:3", "J:2", "J:1"]

$ bkr job-list --format=list
J:8
J:7
J:6
J:5
J:4
J:3
J:2
J:1

$ bkr job-list
["J:8", "J:7", "J:6", "J:5", "J:4", "J:3", "J:2", "J:1"]

Comment 4 Dan Callaghan 2013-04-11 04:55:46 UTC
Beaker 0.12 has been released.


Note You need to log in before you can comment on or make changes to this bug.