Bug 795520

Summary: Add support for --noheading option to suppress all output headings for easier CLI parsing
Product: Red Hat Satellite Reporter: James Laska <jlaska>
Component: katello-agentAssignee: Lukas Zapletal <lzap>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.0.0CC: jturner, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-02 11:28:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
0001-795520-Add-support-for-noheading-option.patch none

Description James Laska 2012-02-20 19:01:57 UTC
Description of problem:

The katello command always emits the headings which makes parsing command output slightly more annoying.  It would be nice for katello sub-commands to support a --noheading option to suppress all column headers and row separators.

Version-Release number of selected component (if applicable):
 * katello-cli-0.1.54-2.el6.noarch
 * katello-0.1.238-4.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. katello -u admin -p admin product list --noheading
  
Actual results:

> --------------------------------------------------------------------------------
>            Product List For Organization redhat, Environment 'Stage'
> 
>  Id              Name                              Provider Id   Provider Name   Sync Plan Name   GPG key  
> --------------------------------------------------------------------------------
>  69              Red Hat Enterprise Linux Server   2             Red Hat         None                      
>  1329490964767   Tools                             3             CloudForms      None                      
>  1329490960529   System Engine                     3             CloudForms      None                      
>  1329490955541   Cloud Engine                      3             CloudForms      None                      

Expected results:

>  69              Red Hat Enterprise Linux Server   2             Red Hat         None                      
>  1329490964767   Tools                             3             CloudForms      None                      
>  1329490960529   System Engine                     3             CloudForms      None                      
>  1329490955541   Cloud Engine                      3             CloudForms      None

Comment 1 James Laska 2012-02-20 19:03:07 UTC
Created attachment 564504 [details]
0001-795520-Add-support-for-noheading-option.patch

Tested proposed patch

Comment 3 Lukas Zapletal 2012-08-02 10:02:24 UTC
Nice patch, going to test.

Comment 4 Lukas Zapletal 2012-08-02 11:28:15 UTC
Had to rewrite the patch, there has been big refactoring in this area. Also added man page. Thanks!

https://github.com/Katello/katello/pull/417