Bug 1872783 - Mismatches between hammer full-help and hammer <command> --help
Summary: Mismatches between hammer full-help and hammer <command> --help
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.10.0
Assignee: Oleh Fedorenko
QA Contact: Shweta Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-26 15:40 UTC by Mirek Długosz
Modified: 2021-11-16 14:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:39:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30996 0 Normal Ready For Testing Mismatches between hammer full-help and hammer <command> --help 2021-02-02 15:49:17 UTC
Red Hat Product Errata RHBA-2021:4701 0 None None None 2021-11-16 14:39:12 UTC

Description Mirek Długosz 2020-08-26 15:40:31 UTC
`hammer full-help` and `hammer <command> --help` give different options in handful of cases. Usually `full-help` contains some option that is missing in `--help`.

This requires manual workaround on QE side, hence adding "AutomationBlocker" keyword.

Excerpt from `hammer full-help`:
#v+
hammer > content-view > add-version
-----------------------------------
Add a content view version to a composite view

Usage:
    hammer content-view add-version [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   Content view numeric identifier to search by
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   Content view version identifier
 --id ID                                             Content view numeric identifier
 --name NAME                                         Content view name to search by
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   Organization ID to search by
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 -h, --help                                          Print help
#v-

`hammer content-view add-version --help` for comparison:
#v+
Usage:
    hammer content-view add-version [OPTIONS]

Options:
 --content-view-id CONTENT_VIEW_ID                   Content view numeric identifier to search by
 --content-view-version[-id]                         Set the current content view version context for the request. Version/Id can be used
 --id ID                                             Content view numeric identifier
 --name NAME                                         Content view name to search by
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   Organization ID to search by
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 -h, --help                                          Print help
#v-


As you can see, `full-help` mentions option `--content-view`, which is not present in `--help` output.



Full list of differences:
Present in `full-help` only:
hammer content-view add-version
	option --content-view
hammer content-view remove
	option --content-view-versions
	option --lifecycle-environments
hammer discovery provision
	option --partition-table
hammer file info
	option --repository
	option --content-view-version
hammer module-stream info
	option --repository
hammer organization create
	option --organization-label
hammer organization delete
	option --organization-label
hammer organization info
	option --organization-label
hammer organization list
	option --organization-label
hammer organization update
	option --organization-label
hammer user-group update
	option --id

Present in `--help` only:
hammer user-group update
	option user-group--id


Side note:
`hammer user-group update --help` reports `--user-group[s|--id]`, which looks like `--user-groups` and `--id` grouped in single command. However, that would make the only instance in entire Satellite where string inside square bracket is NOT appended to part before square bracket.



Found on:
Satellite 6.8 snap 12
katello-3.16.0-0.4.rc4.el7sat.noarch
satellite-6.8.0-1.el7sat.noarch
pulp-server-2.21.2-1.el7sat.noarch
foreman-2.1.1-1.el7sat.noarch
tfm-rubygem-hammer_cli-2.1.1-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.22.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-2.1.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_discovery-1.0.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.14-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_admin-0.0.9-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_ansible-0.3.2-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.3.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.6-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_templates-0.2.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_azure_rm-0.2.0-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.6.4-1.el7sat.noarch
tfm-rubygem-hammer_cli_foreman_openscap-0.1.10-1.el7sat.noarch

Comment 1 Brad Buckingham 2020-08-27 14:09:17 UTC
Is this a regression from Satellite 6.7?

Comment 2 Mirek Długosz 2020-08-27 18:33:51 UTC
Unfortunately, test in question was broken for most of 6.7 cycle due to failure on our (QE) part.
It did work work in 6.6, though. So yes, we can call it regression in 6.8.

Comment 3 Oleh Fedorenko 2020-10-05 23:42:58 UTC
Created redmine issue https://projects.theforeman.org/issues/30996 from this bug

Comment 4 Bryan Kearney 2020-10-26 17:00:53 UTC
Upstream bug assigned to ofedoren

Comment 5 Bryan Kearney 2020-10-26 17:00:55 UTC
Upstream bug assigned to ofedoren

Comment 7 Bryan Kearney 2021-05-02 20:04:13 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30996 has been resolved.

Comment 8 Shweta Singh 2021-06-17 07:08:33 UTC
Verified. 

Version Tested : Satellite 6.10 Snap 4

Steps followed: 
1. Execute hammer help command "hammer content-view add-version --help"
2. Execute "hammer full-help" and search for "hammer > content-view > add-version"

Observation:
All the options for "content-view > add-version" are present in both help commands.

Trace:
# hammer content-view add-version --help
Usage:
    hammer content-view add-version [OPTIONS]

Options:
 --content-view[-id]                                 Content view name/id to search by
 --content-view-version[-id]                         Content view version identifier
 --id ID                                             Content view numeric identifier
 --name NAME                                         Content view name to search by
 --organization[-id|-label]                          Organization name/label/id to search by
 -h, --help                                          Print help


hammer full-help

hammer > content-view > add-version
-----------------------------------
Add a content view version to a composite view

Usage:
    hammer content-view add-version [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   Content view id to search by
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   Content view version identifier
 --id ID                                             Content view numeric identifier
 --name NAME                                         Content view name to search by
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   Organization ID to search by
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 -h, --help   

Note:
There is a minor issue in "hammer content-view add-version --help". One of the option of "--content-view-version CONTENT_VIEW_VERSION_VERSION" is not present in the --help command but present in full-help. I have created different Bugzilla for this issue and can be tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1973031

Comment 11 errata-xmlrpc 2021-11-16 14:39:05 UTC
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


Note You need to log in before you can comment on or make changes to this bug.