Bug 1831066

Summary: hammer full-help returns misleading output
Product: Red Hat Satellite Reporter: Sergei Petrosian <spetrosi>
Component: HammerAssignee: Oleh Fedorenko <ofedoren>
Status: CLOSED ERRATA QA Contact: Akhil Jha <akjha>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: apatel, egolov, kgaikwad, mshira, ofedoren, rabajaj
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli-0.20.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:32:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1826495    

Description Sergei Petrosian 2020-05-04 14:46:03 UTC
Description of problem:
At the output of the `hammer full-help --md` command, some hammer commands have the note `Unfortunately the server does not support such operation.`

The note is misleading because the commands are supported.

There are 8 of such commands:
hammer content-view purge
hammer host errata 
hammer host package
hammer host package-group
hammer host subscription
hammer host-collection erratum
hammer host-collection package
hammer host-collection package-group

Version-Release number of selected component (if applicable):
6.7

How reproducible:
Always

Steps to Reproduce:
1. hammer full-help --md
2. In the output, locate "Unfortunately the server does not support such operation."

Actual results:
The note should note be displayed for the commands.

Expected results:
The note is displayed and is misleading

Additional information:
At the same time, running these individual commands with `--help` does not show this message in the output. For example:
~~~
[root@dell-r430-7 ~]# hammer content-view purge --help
Usage:
    hammer content-view purge [OPTIONS]

Options:
 --async                                 Do not wait for the task
 --count COUNT                           Count of unused versions to keep
                                         Default: 3
 --id ID                                 Content View numeric identifier
 --name NAME                             Content View name
 --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
~~~

Comment 3 Oleh Fedorenko 2020-05-05 08:37:15 UTC
Created redmine issue https://projects.theforeman.org/issues/29697 from this bug

Comment 4 Bryan Kearney 2020-05-05 11:55:48 UTC
Upstream bug assigned to ofedoren

Comment 5 Bryan Kearney 2020-05-05 11:55:53 UTC
Upstream bug assigned to ofedoren

Comment 6 Bryan Kearney 2020-05-12 16:05:59 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29697 has been resolved.

Comment 7 Akhil Jha 2020-06-05 10:58:37 UTC
Verified.

Version Tested:  Satellite-6.8.0 Snap 3.0

Steps followed:
1. hammer full-help --md > /dev/null (To check stderr)
2. hammer full-help --md | sed -n '/Unfortunately the server does not support such operation/p'

Observation:
Both commands resulted in warnings for command deprecation only

Comment 10 errata-xmlrpc 2020-10-27 13:32:10 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.8 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-2020:4367