Bug 1254977 - hammer content-view create doesn't accept repositories names
hammer content-view create doesn't accept repositories names
Status: CLOSED DUPLICATE of bug 1213097
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.1.0
Unspecified Unspecified
high Severity high (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Lukas Pramuk
:
: 1255560 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-19 07:23 EDT by Lukas Pramuk
Modified: 2017-02-23 14:22 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-18 10:00:19 EDT
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)

  None (edit)
Description Lukas Pramuk 2015-08-19 07:23:39 EDT
Description of problem:
hammer content-view create doesn't accept repositories names
Using --repositories option you are unable to create CV.
But using --repository-ids option it works.

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

How reproducible:
100%

Steps to Reproduce:
0.Setup vars:
# product="Red Hat Enterprise Linux Server"
# reposet="Red Hat Enterprise Linux 7 Server (RPMs)"
# reponame="Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server"

1.Enable repository:
# hammer repository-set enable --organization-id 1 --product "$product" --name "$reposet" --releasever 7Server --basearch x86_64
Repository enabled

2.Create CV
# hammer content-view create --organization-id 1 --name CV --repositories "$reponame"
Could not create the content view:
  Error: Could not find repository, please set one of options --repositories, --repository-ids.

But using --repository-ids option it works:
# repoid=$(hammer --csv repository info --organization-id 1 --product "$product" --name "$reponame" | awk -F, 'NR>1{print $1}')
# echo $repoid
71
# hammer content-view create --organization-id 1 --name CV_ids --repository-ids "$repoid"
Content view created


Actual results:
Error: Could not create the content view

Expected results:
CV is created even with using --repositories

Additional info:
possibly it would require to introduce new option '--product' to uniquely specify repository by its name
Comment 1 Lukas Pramuk 2015-08-19 07:28:17 EDT
there is a related bug #1228890, but it is for creating CV filter
(hammer content-view filter create ...)
Comment 4 Stephen Clayton 2015-10-29 13:09:08 EDT
This also does not work with hammer content-view update ...
Comment 5 Brad Buckingham 2015-11-18 15:17:33 EST
*** Bug 1255560 has been marked as a duplicate of this bug. ***
Comment 7 Brad Buckingham 2016-04-18 10:00:19 EDT
This bug has been solved by bug 1213097 and is being delivered in Satellite 6.2; therefore, going to close this one as a duplicate.

E.g. output with the above fix:

hammer> content-view create --organization-id 1 --name cli-cv --product zoo --repositories zoo
Content view created

hammer> content-view info --organization-id 1 --name cli-cv
ID:                     15
Name:                   cli-cv
Label:                  cli-cv
Composite:              false
Description:            
Content Host Count:     0
Organization:           Default Organization
Yum Repositories:       
 1) ID:    40
    Name:  zoo
    Label: zoo
Docker Repositories:    

OSTree Repositories:    

Puppet Modules:         

Lifecycle Environments: 

Versions:               

Components:             

Activation Keys:

hammer>

*** This bug has been marked as a duplicate of bug 1213097 ***

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