Bug 1730400

Summary: `hammer puppet-class info --environment ...` complains: Error: Unrecognised option '--environment'.
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: HammerAssignee: Oleh Fedorenko <ofedoren>
Status: CLOSED ERRATA QA Contact: vijsingh
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: apatel, kgaikwad, ktordeur, mbacovsk, mmccune, mshira, ofedoren, rabajaj, vsedmik, zhunting
Target Milestone: 6.6.0Keywords: PrioBumpQA, Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_foreman-0.17.0.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:52:05 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: 1710260    

Description Jan Hutař 2019-07-16 15:27:36 UTC
Description of problem:
`hammer puppet-class info --environment ...` complains: Error: Unrecognised option '--environment'.


Version-Release number of selected component (if applicable):
tfm-rubygem-hammer_cli-0.17.1-2.el7sat.noarch
tfm-rubygem-hammer_cli_foreman-0.17.0.3-1.el7sat.noarch
tfm-rubygem-hammer_cli_katello-0.18.0.2-1.el7sat.noarch
satellite-6.6.0-5.beta.el7sat.noarch


How reproducible:
always


Steps to Reproduce:
1. # hammer puppet-class info --puppet-environment production --name access_insights_client
2. # hammer puppet-class info --environment production --name access_insights_client


Actual results:
First command works fine, but:

[root@satellite ~]# hammer puppet-class info --environment production --name access_insights_client
Error: Unrecognised option '--environment'.

See: 'hammer puppet-class info --help'.


Expected results:
[root@satellite ~]# hammer puppet-class info --environment production --name access_insights_client
Id:                     2
Name:                   access_insights_client
[...]

Comment 3 Oleh Fedorenko 2019-07-17 15:21:58 UTC
Created redmine issue https://projects.theforeman.org/issues/27323 from this bug

Comment 4 Bryan Kearney 2019-07-18 16:02:51 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27323 has been resolved.

Comment 6 vijsingh 2019-08-19 09:13:02 UTC
ON_QA Verified:

@Satellite 6.6.0 snap 16.0

Steps/Observation:
_____________________________________________________________________________________________________

[root@qe-sat6-bm1 ~]# hammer puppet-class info --environment production --name access_insights_client
Warning: Option --environment is deprecated. Use --puppet-environment instead
Id:                     1
Name:                   access_insights_client
Smart variables:        

Smart class parameters: 
    authmethod
    auto_config
    auto_update
    base_url
    cert_verify
    gpg
    log_level
    obfuscate
    obfuscate_hostname
    password
    proxy
    upload_schedule
    username
Hostgroups:             

Environments:           
    production

[root@qe-sat6-bm1 ~]# hammer puppet-class info --puppet-environment production --name access_insights_client
Id:                     1
Name:                   access_insights_client
Smart variables:        

Smart class parameters: 
    authmethod
    auto_config
    auto_update
    base_url
    cert_verify
    gpg
    log_level
    obfuscate
    obfuscate_hostname
    password
    proxy
    upload_schedule
    username
Hostgroups:             

Environments:           
    production
_____________________________________________________________________________________________________

Comment 7 Bryan Kearney 2019-10-22 19:52: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, 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/RHSA-2019:3172