Story #929
closedAs a user, I can machine-parse pulp-admin output
0%
Description
I don't think that this is unique to pulp-admin, but my report is specifically for that. Anyway, pulp-admin automatically linewraps output, which is pretty, but makes it difficult to parse and make use of the data that it outputs since it's often truncated and completed on multiple lines. Since we use excessively long labels by default, it makes it quite difficult to work with:
<snip>
[root@garabaldi pulp]# pulp-admin repo list --details | head -n 20
------------------------------------------------------------------------------
Repositories
----------------------------------------------------------------------------
Id: Maunet_org-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Serv
er_-_Extras_RPMs_x86_64
Display Name: Red Hat Enterprise Linux 6 Server - Extras RPMs x86_64
Description: None
Content Unit Counts:
Erratum: 4
Rpm: 13
Notes:
Importers:
Config:
Feed: https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/extras/os
SSL CA Cert: -----BEGIN CERTIFICATE-----
MIIG/TCCBOWgAwIBAgIBNzANBgkqhkiG9w0BAQUFADCBsTELMAkGA1UEBhMCVVMx
FzAVBgNVBAgMDk5vcnRoIENhcm9saW5hMRYwFAYDVQQKDA1SZWQgSGF0LCBJbmMu
MRgwFgYDVQQLDA9SZWQgSGF0IE5ldHdvcmsxMTAvBgNVBAMMKFJlZCBIYXQgRW50
aXRsZW1lbnQgT3BlcmF0aW9ucyBBdXRob3JpdHkxJDAiBgkqhkiG9w0BCQEWFWNh
...
</snip>
This makes human parsing a bit challenging at times and makes automatic parsing of the output quite difficult. It also breaks format of SSL CA Cert keys.
One can work around this in an ugly way by specifying:
wrap_to_terminal = false
wrap_width = <some arbitrary long value longer than the longest field>
...which is unappealing, and also has us create really, really long dividers and the like in our attempt to prettify the output. I put a hack in to limit the dividers to 80 characters, but that's not really a fix. It'd be nice if we could just disable line-wrapping as an option here.
Version-Release number of selected component (if applicable):
pulp-admin-client-2.4.3-1.el7sat.noarch
Related issues
Updated by mhrivnak over 9 years ago
- Tracker changed from Issue to Story
- Subject changed from pulp-admin line wrapping makes output difficult to parse to As a user, I can machine-parse pulp-admin output
Updated by mhrivnak over 9 years ago
- Has duplicate Story #205: [RFE] add option to make pulp-admin output machine-readable added
Updated by bmbouter almost 9 years ago
- Has duplicate Issue #1696: pulp-admin's line wrapping makes it difficult to process its output without using my soft, human brain added
Updated by rbarlow almost 9 years ago
- Tracker changed from Story to Issue
- Severity set to 2. Medium
- Triaged set to No
I think this should be an issue instead of a story, especially since it is making pulp-smash especially difficult to work on. I think we should consider raising the priority considering pulp-smash and that it has now been reported three times.
Updated by bmbouter almost 9 years ago
+1 to raising the Priority to High and making it a Story
Updated by bmbouter over 8 years ago
- Tracker changed from Issue to Story
- Groomed set to No
- Sprint Candidate set to No
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.