Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1254977 - hammer content-view create doesn't accept repositories names
Summary: hammer content-view create doesn't accept repositories names
Keywords:
Status: CLOSED DUPLICATE of bug 1213097
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Katello Bug Bin
QA Contact: Lukas Pramuk
URL:
Whiteboard:
: 1255560 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 11:23 UTC by Lukas Pramuk
Modified: 2019-11-14 06:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-18 14:00:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lukas Pramuk 2015-08-19 11:23:39 UTC
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 11:28:17 UTC
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 17:09:08 UTC
This also does not work with hammer content-view update ...

Comment 5 Brad Buckingham 2015-11-18 20:17:33 UTC
*** Bug 1255560 has been marked as a duplicate of this bug. ***

Comment 7 Brad Buckingham 2016-04-18 14:00:19 UTC
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.