Description of problem: hammer subscription list does not show ID and UUID if requested via --fields option [root@dhcp-2-31 ~]# hammer subscription list --fields "ID,UUID,Name,Type" ----------------------------------------------|--------- NAME | TYPE ----------------------------------------------|--------- Red Hat Beta Access | Physical Red Hat Enterprise Linux High Touch Beta | Physical Red Hat Satellite Employee Subscription | Physical Red Hat Satellite Infrastructure Subscription | Physical ----------------------------------------------|--------- [root@dhcp-2-31 ~]# hammer subscription list --help Usage: hammer subscription list [OPTIONS] Options: ... --fields FIELDS Show specified fileds or predefined filed sets only. (See below) Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters ... Predefined field sets: -----------|-----|-------- FIELDS | ALL | DEFAULT -----------|-----|-------- ID | x | x UUID | x | x Name | x | x Type | x | x Contract | x | x Account | x | x Support | x | x Start Date | x | x End Date | x | x Quantity | x | x Consumed | x | x -----------|-----|-------- Version-Release number of selected component (if applicable): Satellite 6.7.0 tfm-rubygem-hammer_cli-0.19.2.1-1.el7sat.noarch How reproducible: always Steps to Reproduce: 1. hammer subscription list --fields "ID,UUID,Name,Type" Actual results: ID and UUID is not listed Expected results: ID and UUID being listed Additional info:
Hi Vladimír, Actually this works, but probably not how would you expect. To specify fields with --field option you need to specify them in lowercase or capitalized, so > hammer subscription list --fields "id,uuid,Name,Type" will work. Upcase is reserved for field sets such as ALL, DEFAULT, etc.
Hello Oleh, yes, you are right, lowercase or capitals work fine. I just went exactly according to the help description. Perhaps we could update the description to avoid confusion and resolve this. Thank you, Vlad.
I guess we could update the description for commands such as info and list to be more explicit with --field option arguments. Could you please change the title/description of the bug, so I'll create a redmine issue from this?
Title changed and set the DocType, as appropriate change should be also done in [1]. [1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.7/html/hammer_cli_guide/reference#hammer-subscription-list
Created redmine issue https://projects.theforeman.org/issues/29732 from this bug
(In reply to Vladimír Sedmík from comment #6) > Title changed and set the DocType, as appropriate change should be also done > in [1]. > > [1] > https://access.redhat.com/documentation/en-us/red_hat_satellite/6.7/html/ > hammer_cli_guide/reference#hammer-subscription-list Hi that part of the guide is created by a script. So once hammer is fixed, ask docs team to regenerate the guide. adding spetrosi to c.c. for awareness Thank you
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/29732 has been resolved.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Satellite 6.10 Satellite Tools Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4701