Bug 1337746 - hammer content-view create fails when component-ids are specified
Summary: hammer content-view create fails when component-ids are specified
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer   
(Show other bugs)
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Keywords: Triaged
: 1355894 (view as bug list)
Depends On:
Blocks: 1325124
TreeView+ depends on / blocked
 
Reported: 2016-05-20 01:10 UTC by Brad Buckingham
Modified: 2019-04-01 20:27 UTC (History)
5 users (show)

Fixed In Version: rubygem-katello-3.0.0.61-1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 11:15:27 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15678 None None None 2016-07-13 15:49 UTC

Description Brad Buckingham 2016-05-20 01:10:54 UTC
Description of problem:

This bug is to address one of the issues raised by bug 1317814 (specifically bug 1317814#c1).

The issue is that it is not currently possible to create a composite content view using hammer when specifying the component content view version IDs as part of the create command.

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

Satellite 6.2 Snap 12

How reproducible:

Always

Steps to Reproduce:

1. observe that a couple of content view versions exist

hammer> content-view version list --organization-id 1
---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
3  | zoo2 1.0                      | 1.0     | Library               
2  | zoo1 1.0                      | 1.0     | Library               
1  | Default Organization View 1.0 | 1.0     | Library               
---|-------------------------------|---------|-----------------------

2. attempt to create a composite content view, containing 1 component ID

hammer> content-view create --name test-ccv --organization-label Default_Organization --composite --component-ids 2
Could not create the content view:
  undefined method `composite?' for nil:NilClass

3. attempt to create a composite content view, containing 2 component IDs

hammer> content-view create --name test-ccv --organization-label Default_Organization --composite --component-ids 2,3
Could not create the content view:
  undefined method `composite?' for nil:NilClass

Actual results:

creation of the composite content views in steps 2 & 3 fails

Expected results:

creation of the composite content views in steps 2 & 3 succeeds

Additional info:

Comment 2 Brad Buckingham 2016-05-20 01:12:35 UTC
WORKAROUND:

Create the composite content view and then update it to include the components.  For example:

content-view create --name test-ccv --organization-id 1 --composite --component-ids 2
content-view update --name test-ccv --organization-id 1 --component-ids 2

Comment 4 Bryan Kearney 2016-07-08 20:41:52 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 6 Mike McCune 2016-07-12 22:14:54 UTC
*** Bug 1355894 has been marked as a duplicate of this bug. ***

Comment 7 Lukas Pramuk 2016-07-13 07:47:21 UTC
This BZ blocks blocker+ BZ 1325124 so we should prioritize this BZ the same way as the blocked BZ.

Comment 8 Brad Buckingham 2016-07-13 15:49:00 UTC
Created redmine issue http://projects.theforeman.org/issues/15678 from this bug

Comment 9 Brad Buckingham 2016-07-13 17:17:35 UTC
Upstream Katello PR: https://github.com/Katello/katello/pull/6186

Comment 10 Lukas Pramuk 2016-07-18 10:58:58 UTC
VERIFIED.

satellite-6.2.0-20.1.el7sat.noarch

1) # hammer content-view version list --organization-id 3
---|--------------------------------------------------------------|---------|-----------------------
ID | NAME                                                         | VERSION | LIFECYCLE ENVIRONMENTS
---|--------------------------------------------------------------|---------|-----------------------
9  | Red Hat Enterprise Linux Server (v. 7 for 64-bit x86_64) 1.0 | 1.0     | Library               
8  | RHN Tools for RHEL Server (v. 7 for x86_64) 1.0              | 1.0     | Library               
7  | Default Organization View 1.0                                | 1.0     | Library               
---|--------------------------------------------------------------|---------|-----------------------

2) # hammer content-view create --name Composite1 --organization-id 3 --composite --component-ids 9
Content view created

3) # hammer content-view create --name Composite2 --organization-id 3 --composite --component-ids 8,9
Content view created

4) # hammer content-view info --name Composite1 -organization-id 3
ID:                     8
Name:                   Composite1
...
Components:             
 1) ID:   9
    Name: Red Hat Enterprise Linux Server (v. 7 for 64-bit x86_64) 1.0
...

5) # hammer content-view info --name Composite1 --organization-id 3
ID:                     9
Name:                   Composite2
...
Components:             
 1) ID:   8
    Name: RHN Tools for RHEL Server (v. 7 for x86_64) 1.0
 2) ID:   9
    Name: Red Hat Enterprise Linux Server (v. 7 for 64-bit x86_64) 1.0

>>> CCV creation with component id or with multiple components ids succeeds

Comment 11 Bryan Kearney 2016-07-27 11:15:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501


Note You need to log in before you can comment on or make changes to this bug.