Project

General

Profile

Bug #15458

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

Added by Walden Raines almost 6 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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:
-----------------------

Associated revisions

Revision d74ddffb (diff)
Added by Walden Raines almost 6 years ago

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

Revision 58f66c09
Added by Christine Fouant almost 6 years ago

Merge pull request #412 from waldenraines/15458

Fixes #15458: allow org id for activation key host collections.

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Project changed from Hammer CLI to Katello

#2 Updated by The Foreman Bot almost 6 years ago

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

#3 Updated by Walden Raines almost 6 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

#4 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF