Project

General

Profile

Bug #15678

hammer content-view create fails when component-ids are specified

Added by Brad Buckingham almost 3 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Category:
Hammer
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1337746
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:

Associated revisions

Revision d9551dc8 (diff)
Added by Brad Buckingham almost 3 years ago

fixes #15678 - move validation to content view model

This commit moves one of the validations performed by the
content_view_component to the content_view model.

This is to address an error that was observed on older
rails (4.1) where attempting to create a content view
with components would result an error.

The following is an example of the error when using
hammer-cli:

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

Revision 41425fa6
Added by Brad Buckingham almost 3 years ago

Merge pull request #6186 from bbuckingham/issue-15678

fixes #15678 - move validation to content view model

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Brad Buckingham
  • Pull request https://github.com/Katello/katello/pull/6186 added

#2 Updated by Brad Buckingham almost 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Justin Sherrill almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to easy

Also available in: Atom PDF