Feature #20978
closedAllow hiding headers from output of list actions
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 | |
Updated by Tomáš Strachota almost 7 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
Updated by The Foreman Bot almost 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/253 added
Updated by Tomáš Strachota almost 7 years ago
- Related to Tracker #14914: Tracker for output related issues added
Updated by Oleh Fedorenko over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d5dff2d7b76e68825e8727da0ba28cebf56cabad.
Updated by Lukáš Hellebrandt over 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 |