Bug 2106256

Summary: hammer host create doesn't support --lifecycle-environment option
Product: Red Hat Satellite Reporter: Jan Senkyrik <jsenkyri>
Component: Hosts - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Cole Higgins <chiggins>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: ahumbe, apatel, gformisa, jlenz, kgaikwad, ofedoren, paji, rlavi, snemeth, visawant
Target Milestone: 6.15.0Keywords: Reopened, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:12:26 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:

Description Jan Senkyrik 2022-07-12 08:15:57 UTC
Description of problem:
`hammer host create` doesn't support --lifecycle-environment option, but it should:

# hammer host create --help | grep lifecycle
 --lifecycle-environment[-id] VALUE/NUMBER 

Users are forced to use --lifecycle-environment-id instead because the host creation fails with:

Could not create the host:
  Error: lifecycle_environment not found.



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



Additional info:
This seems to be specific to `hammer host create` as `hammer host update` works just fine:


# hammer lifecycle-environment list --organization-id 1
---|---------|--------
ID | NAME    | PRIOR  
---|---------|--------
1  | Library |        
2  | test    | Library
---|---------|--------


# hammer host update --lifecycle-environment test --name jsenkyri-rhel8-sat611.sysmgmt.lan --organization-id 1
Host updated.

Comment 9 Partha Aji 2023-11-13 21:19:09 UTC
Not able to reproduce this issue and may be fixed by  https://github.com/Katello/hammer-cli-katello/pull/879 . Closing it as works for me. Feel free to reopen

Comment 17 errata-xmlrpc 2024-04-23 17:12:26 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 (Important: Satellite 6.15.0 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/RHSA-2024:2010

Comment 18 Red Hat Bugzilla 2024-08-22 04:25:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days