Feature #12293

Control the attributes which are returned from a list command

Added by Bryan Kearney over 2 years ago. Updated 8 days ago.

Status:New
Priority:Normal
Assignee:-
Category:Hammer core
Target version:-
Difficulty: Team Backlog:Marek
Triaged: Fixed in Releases:
Bugzilla link:1267445 Found in Releases:
Pull request:

Description

Users would like to pass in a set of attributes for an object, and use that control the output of the list commands. For example

hammer foo list --attribtues A,B,C,D --csv

would return

A,B,C,D
foo1.A, foo1.B, foo1.C, foo1.D
foo2.A, foo2.B, foo2.C, foo2.D


Related issues

Related to Foreman - Feature #16314: Generate a custom report of specific fields Duplicate 08/26/2016

History

#1 Updated by Bryan Kearney over 2 years ago

  • Bugzilla link set to 1267445

#2 Updated by Ondřej Pražák almost 2 years ago

  • Related to Feature #16314: Generate a custom report of specific fields added

#3 Updated by Tomáš Strachota over 1 year ago

  • Subject changed from [RFE] Control the attributes which are returned from a list command to Control the attributes which are returned from a list command
  • Category set to Hammer core
  • Target version set to 115

#4 Updated by Thomas McKay over 1 year ago

@marek - I would suggest moving this to hammer csv category. I have this working already for content-hosts (which could also dump out custom host info too, of course). If you're agreeable, assign to me and switch category. Thanks!

#5 Updated by Tomáš Strachota over 1 year ago

Hi Tom, it's great you have it working in csv already. I vote for keeping the issue in hammer core and implement it in generic manner so that other output adapters can use it and all plugins can take advantage of optional columns. Hopefully it will be possible to re-use code from your solution.

Also available in: Atom PDF