Project

General

Profile

Bug #16034

[Sat6.2] command "hammer activation-key add-host-collection" fails if using option "--host-collection" with organization_id set to default 1

Added by Andrew Kofink almost 3 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1364876
Description of problem:

Using hammer command "hammer activation-key add-host-collection" with organization_id set to default 1 fails if using option "--host-collection".
Version-Release number of selected component (if applicable):
6.2
How reproducible: Always
Steps to Reproduce:
1. Set default organization_id to value 1
  1. hammer defaults add --param-name=organization_id --param-value=1
    Added organization_id default-option with value 1.
2. hammer "activation-key add-host-collection" if using name option "--host-collection fails:
  1. hammer activation-key add-host-collection --name 'rhel7_ak' --host-collection 'test'
    Could not add host collection:
    Error: Could not find organization, please set one of options --organization, --organization-label, --organization-id.
Actual results:
Error when using name option for host-collection, "--host-collection"
Expected results:
It should work like --host-collection-id:
  1. hammer activation-key add-host-collection --name 'rhel7_ak' --host-collection-id 1
    The host collection has been associated
Additional info:
This bug is suppose to be fix in:
https://bugzilla.redhat.com/show_bug.cgi?id=1335783
Bug 1335783 - [6.2 Beta] Adding a host collection to activation key using --host-collection option with hammer fails
but we are still getting error with option "--host-collection" with preset
default organization-id to 1

Associated revisions

Revision 34ae3d3d (diff)
Added by Andrew Kofink almost 3 years ago

Fixes #16034 - Org resolution in AK add-host-coll (#439)

Ensure organization ID resolution behaves properly in `hammer
activation-key add/remove-host-collection`

History

#1 Updated by The Foreman Bot almost 3 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/439 added

#2 Updated by Anonymous almost 3 years ago

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

#3 Updated by Justin Sherrill almost 3 years ago

  • Subject changed from [Sat6.2] command "hammer activation-key add-host-collection" fails if using option "--host-collection" with organization_id set to default 1 to [Sat6.2] command "hammer activation-key add-host-collection" fails if using option "--host-collection" with organization_id set to default 1
  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to easy

Also available in: Atom PDF