Project

Profile

Help

Story #929

As a user, I can machine-parse pulp-admin output

Added by bkearney@redhat.com over 4 years ago. Updated 9 months ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
pulp-admin
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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

Duplicated by Pulp - Story #205: [RFE] add option to make pulp-admin output machine-readable CLOSED - DUPLICATE Actions
Duplicated by Pulp - Issue #1696: pulp-admin's line wrapping makes it difficult to process its output without using my soft, human brain CLOSED - DUPLICATE Actions

History

#1 Updated by rbarlow over 4 years ago

+MAXINT

#2 Updated by mhrivnak over 4 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

#3 Updated by mhrivnak over 4 years ago

  • Duplicated by Story #205: [RFE] add option to make pulp-admin output machine-readable added

#4 Updated by bmbouter almost 4 years ago

  • Duplicated by Issue #1696: pulp-admin's line wrapping makes it difficult to process its output without using my soft, human brain added

#5 Updated by rbarlow almost 4 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.

#6 Updated by bmbouter almost 4 years ago

+1 to raising the Priority to High and making it a Story

#7 Updated by bmbouter almost 4 years ago

  • Tracker changed from Issue to Story
  • Groomed set to No
  • Sprint Candidate set to No

#10 Updated by bmbouter 10 months ago

  • Status changed from NEW to CLOSED - WONTFIX

#11 Updated by bmbouter 10 months 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.

#12 Updated by bmbouter 9 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF