Project

General

Profile

Actions

Bug #15458

closed

[6.2 Beta] Adding a host collection to activation key using --host-collection option with hammer fails

Added by Walden Raines almost 8 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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

Adding a host collection to activation key using --host-collection option with hammer fails

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

Satellite 6.2 Beta

How reproducible:
-----------------------

Always.

Steps to Reproduce:
------------------------

Satellite 6.2 Beta installed on RHEL 7.2 server.
1.

List all available host collection with ID and name.

  1. hammer organization list

---|----------------------|----------------------|------------
ID | NAME | LABEL | DESCRIPTION
---|----------------------|----------------------|------------
1 | Default Organization | Default_Organization |
---|----------------------|----------------------|------------

  1. hammer host-collection list --organization-id 1

---|---------------|-------|------------
ID | NAME | LIMIT | DESCRIPTION
---|---------------|-------|------------
2 | ESS Dev Hosts | None |
---|---------------|-------|------------

2. Trying to add host collection using host-collection id -
~~~
  1. hammer activation-key add-host-collection --name 'ESS_RHEL7_Dev_Hosts' --host-collection-id 2 --organization-id 1

The host collection has been associated
~~~

Using host collection ID I was able to assign a host collection to the activation key.

3. Trying to add host collection using host-collection name -
~~~
  1. hammer activation-key add-host-collection --name "ESS_RHEL7_Dev_Hosts" --host-collection "ESS Dev Hosts" --organization-id 1

Could not add host collection:
undefined method `id' for nil:NilClass
~~~

Actual results:
-----------------------

Fails with error "Could not add host collection: undefined method `id' for nil:NilClass "

Expected results:
-----------------------

Should add host-collection to the activation key.

Additional info:
-----------------------

Actions #1

Updated by Dominic Cleal almost 8 years ago

  • Project changed from Hammer CLI to Katello
Actions #2

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/412 added
Actions #3

Updated by Walden Raines almost 8 years ago

  • Status changed from Ready For Testing to Resolved

commit 58f66c097d475e063fedb9b97c6ef33c78c25611
Merge: 8a8057e d74ddff
Author: cfouant <>
Date: Tue Jun 21 12:08:01 2016 -0400

Merge pull request #412 from waldenraines/15458
Fixes #15458: allow org id for activation key host collections.

commit d74ddffb41731f159d0aff956b4273154b212748
Author: Walden Raines <>
Date: Fri Jun 17 18:46:26 2016 -0400

Fixes #15458: allow org id for activation key host collections.
The add/remove host collection commands were not allowing
--organization-id. This commit ensures that all organization related
parameters are accepted.
http://projects.theforeman.org/issues/15458
Actions #4

Updated by Eric Helms over 7 years ago

  • translation missing: en.field_release set to 166
Actions

Also available in: Atom PDF