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:
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.
Created redmine issue http://projects.theforeman.org/issues/14068 from this bug
Moving to POST since upstream bug http://projects.theforeman.org/issues/14068 has been closed ------------- Anonymous Applied in changeset commit:hammer-cli-katello|80f7b892cc02ba4b50da6ce06a29eda6f7023211.
*** Bug 1254977 has been marked as a duplicate of this bug. ***
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
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