Project

General

Profile

Actions

Feature #20978

closed

Allow hiding headers from output of list actions

Added by Tomáš Strachota over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Low
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

This will enable easier grepping of the output in the scripts. This feature should be supported by table and csv output adaptors. It should be possible to switch this behavior via both settings and an option.

Example usage:

> hammer host list
---|-------------------------------------|------------------|-------------|----------------|-------------------|--------------|----------------------
ID | NAME                                | OPERATING SYSTEM | HOST GROUP  | IP             | MAC               | CONTENT VIEW | LIFECYCLE ENVIRONMENT
---|-------------------------------------|------------------|-------------|----------------|-------------------|--------------|----------------------
1  | devel.tstrachota.example.com        | CentOS 7.2.1511  |             | 192.168.122.51 | 52:54:00:ce:b2:b9 |              |                      
2  | myra-madaras.tstrachota.example.com | CentOS 7.2.1511  | parent/Test | 192.168.122.50 | 00:11:22:33:44:55 |              |                      
7  | test3.tstrachota.example.com        | CentOS 6         | parent/Test | 192.168.122.53 | 00:11:22:33:44:55 |              |                      
8  | test4.tstrachota.example.com        | CentOS 6         | parent/Test | 192.168.122.54 | 00:11:22:33:44:55 |              |                      
---|-------------------------------------|------------------|-------------|----------------|-------------------|--------------|----------------------
> hammer --no-headers host list
1 | devel.tstrachota.example.com        | CentOS 7.2.1511 |             | 192.168.122.51 | 52:54:00:ce:b2:b9 | |   
2 | myra-madaras.tstrachota.example.com | CentOS 7.2.1511 | parent/Test | 192.168.122.50 | 00:11:22:33:44:55 | |   
7 | test3.tstrachota.example.com        | CentOS 6        | parent/Test | 192.168.122.53 | 00:11:22:33:44:55 | |   
8 | test4.tstrachota.example.com        | CentOS 6        | parent/Test | 192.168.122.54 | 00:11:22:33:44:55 | |   


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Tracker #14914: Tracker for output related issuesClosed

Actions
Actions #1

Updated by Tomáš Strachota over 6 years ago

  • Description updated (diff)
Actions #2

Updated by Tomáš Strachota over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Oleh Fedorenko
Actions #3

Updated by The Foreman Bot over 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/253 added
Actions #4

Updated by Tomáš Strachota over 6 years ago

Actions #5

Updated by Oleh Fedorenko about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Lukáš Hellebrandt about 6 years ago

Verified on nightly, tfm-rubygem-hammer_cli-0.12.0-1.el7

$ hammer organization list
---|----------------------|----------------------|-------------|----------------------|------------
ID | TITLE | NAME | DESCRIPTION | LABEL | DESCRIPTION
---|----------------------|----------------------|-------------|----------------------|------------
1 | Default Organization | Default Organization | | Default_Organization |
---|----------------------|----------------------|-------------|----------------------|------------

$ hammer --no-headers organization list
1 | Default Organization | Default Organization | | Default_Organization |

Actions

Also available in: Atom PDF