Bug #15458
closed[6.2 Beta] Adding a host collection to activation key using --host-collection option with hammer fails
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.
- hammer organization list
---|----------------------|----------------------|------------
ID | NAME | LABEL | DESCRIPTION
---|----------------------|----------------------|------------
1 | Default Organization | Default_Organization |
---|----------------------|----------------------|------------
- hammer host-collection list --organization-id 1
---|---------------|-------|------------
ID | NAME | LIMIT | DESCRIPTION
---|---------------|-------|------------
2 | ESS Dev Hosts | None |
---|---------------|-------|------------
~~~
- 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 -~~~
- 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:
-----------------------
Updated by Dominic Cleal about 8 years ago
- Project changed from Hammer CLI to Katello
Updated by The Foreman Bot about 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/hammer-cli-katello/pull/412 added
Updated by Walden Raines about 8 years ago
- Status changed from Ready For Testing to Resolved
commit 58f66c097d475e063fedb9b97c6ef33c78c25611
Merge: 8a8057e d74ddff
Author: cfouant <cfouant@redhat.com>
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 <walden@waldenraines.com>
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
Updated by Eric Helms about 8 years ago
- Translation missing: en.field_release set to 166