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 about 8 years ago. Updated about 6 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

Also available in: Atom PDF