Bug 1213097 - Creating content-view with repository name does not work
Summary: Creating content-view with repository name does not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Adam Ruzicka
QA Contact: Lukas Pramuk
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1254977 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-18 20:50 UTC by Johan Swensson
Modified: 2019-11-14 06:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:05:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14068 0 Normal Closed Creating content-view with repository name does not work 2020-06-01 15:08:51 UTC

Description Johan Swensson 2015-04-18 20:50:49 UTC
Description of problem:
Creating a repository and specifying repositories does not work.

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

How reproducible:
100%

Steps to Reproduce:

[root@satellite ~]# hammer repository list --organization Lab
---|---------------|-------------|--------------|---------------------------------------------
ID | NAME          | PRODUCT     | CONTENT TYPE | URL                                         
---|---------------|-------------|--------------|---------------------------------------------
2  | rhel7-common  | rhel7Server | yum          | http://192.168.100.1/cdn/repos/rhel7-common/
1  | rhel7-updates | rhel7Server | yum          | http://192.168.100.1/cdn/repos/rhel7Server/ 
---|---------------|-------------|--------------|---------------------------------------------


[root@satellite ~]# hammer content-view create --name RHEL7 --repositories rhel7-updates,rhel7-common --organization Lab
Content view created
[root@satellite ~]# hammer content-view create --name RHEL7-b --repository-ids 1,2 --organization Lab
Content view created

[root@satellite ~]# hammer content-view list --organization Lab
----------------|---------------------------|--------------------------------------|-----------|---------------
CONTENT VIEW ID | NAME                      | LABEL                                | COMPOSITE | REPOSITORY IDS
----------------|---------------------------|--------------------------------------|-----------|---------------
2               | Default Organization View | 4fe07366-b798-4a63-997d-b9f143444797 |           |               
7               | RHEL7                     | RHEL7                                |           |               
6               | RHEL7-b                   | RHEL7-b                              |           | 1, 2          
----------------|---------------------------|--------------------------------------|-----------|---------------


Actual results:
Content view created but the repos are not added.

Expected results:
The repos should be added.

Additional info:

Comment 1 RHEL Program Management 2015-04-18 21:18:04 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 5 Adam Ruzicka 2016-03-07 10:25:41 UTC
Created redmine issue http://projects.theforeman.org/issues/14068 from this bug

Comment 6 Bryan Kearney 2016-04-05 02:09:52 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14068 has been closed
-------------
Anonymous
Applied in changeset commit:hammer-cli-katello|80f7b892cc02ba4b50da6ce06a29eda6f7023211.

Comment 7 Brad Buckingham 2016-04-18 14:00:19 UTC
*** Bug 1254977 has been marked as a duplicate of this bug. ***

Comment 8 Lukas Pramuk 2016-05-09 12:01:04 UTC
VERIFIED.

@Sat6.2.0-Snap10.1
tfm-rubygem-hammer_cli_katello-0.0.22.8-1.el7sat.noarch

used reproducer in comment #0:

# hammer repository list --organization-id 1
---|--------------------------|----------------|--------------|------
ID | NAME                     | PRODUCT        | CONTENT TYPE | URL                                                                             
---|--------------------------|----------------|--------------|------
2  | Satellite 6.2-Beta RHEL7 | Custom Product | yum          | <URL>
1  | Satellite 6.1.8 RHEL7    | Custom Product | yum          | <URL>
---|--------------------------|----------------|--------------|------

# hammer content-view create --name Satellites --product 'Custom Product' --repositories 'Satellite 6.2-Beta RHEL7,Satellite 6.1.8 RHEL7' --organization-id 1
Content view created

# hammer content-view create --name Satellites-Ids --repository-ids 1,2 --organization-id 1
Content view created

# hammer content-view list --organization-id 1
----------------|---------------------------|---------------------------|-----------|---------------
CONTENT VIEW ID | NAME                      | LABEL                     | COMPOSITE | REPOSITORY IDS
----------------|---------------------------|---------------------------|-----------|---------------
4               | Satellites-Ids            | Satellites-Ids            |           | 1, 2          
3               | Satellites                | Satellites                |           | 1, 2          
1               | Default Organization View | Default_Organization_View |           |               
----------------|---------------------------|---------------------------|-----------|---------------
>>> both CVs have the specified repos added

>>> Now you can associate a repsitories by names but you have to specify one additional param --product(-id) as repo names are not unique

Comment 9 Bryan Kearney 2016-07-27 11:05:37 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.