Project

General

Profile

Bug #17619

Hostgroup create/update does not accept --lifecycle-environment parameter

Added by Andrew Kofink over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1395254
Description of problem:
It is not possible to provide LIFECYCLE_ENVIRONMENT_NAME to 'hammer hostgroup create' as it complains that organization not found though organization id is provided, only LIFECYCLE_ENVIRONMENT_ID is accepted.

On 6.2 it was possible to specify '--organization-id' parameter but it is not available anymore. Parameter '--lifecycle-environment-organization-id' that was used in upstream also not available. So it is not possible to use '--lifecycle-environment' at all.
1. Provide LCE name and organization id
> hammer> hostgroup create --lifecycle-environment="TS3A9O" --organization-ids="47" --name="test"
> Could not create the hostgroup:
> Error: Could not find organization, please set one of options --organizations, --organization-ids.
2. Check LCE id
> hammer> lifecycle-environment info --name="TS3A9O" --organization-id=47
> ID: 54
> Name: TS3A9O
3. Provide LCE id via --lifecycle-environment-id parameter
> hammer> hostgroup create --lifecycle-environment-id=54 --organization-ids=47 --name="inCpTB"
> Hostgroup created
Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 3.0, Foreman 1.13.1-1
How reproducible:
Always
Steps to Reproduce:
1.
2.
3.
Actual results:
Hostgroup is not created when providing LIFECYCLE_ENVIRONMENT_NAME.
Hammer complains that --organizations or --organization-ids parameter was not provided but they was.
Expected results:
Hostgroup should be created with both available options (with '--lifecycle-environment' just as with --lifecycle-environment-id if organization id/name was provided)
Additional info:

Associated revisions

Revision 6581e356 (diff)
Added by Andrew Kofink over 4 years ago

Fixes #17619 - Provide correct org options in msg (#467)

Provide the correct organization options to the user when trying to
resolve lifecycle environment name when creating/updating a hostgroup

History

#1 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Andrew Kofink
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/467 added

#2 Updated by Brad Buckingham over 4 years ago

  • Subject changed from Hostgroup create/update does not accept --lifecycle-environment parameter to Hostgroup create/update does not accept --lifecycle-environment parameter
  • Target version set to 147

#3 Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Justin Sherrill over 4 years ago

  • Legacy Backlogs Release (now unused) set to 188

Also available in: Atom PDF