Bug 1255560 - assigning a repo to content-view using 'content-view update' option is not possible by --name
assigning a repo to content-view using 'content-view update' option is not po...
Status: CLOSED DUPLICATE of bug 1254977
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.1.0
All Linux
medium Severity medium (vote)
: 6.1.2
: 6.1
Assigned To: Katello Bug Bin
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-20 20:17 EDT by Anand Vaddarapu
Modified: 2015-12-03 10:45 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-18 15:17:33 EST
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 Anand Vaddarapu 2015-08-20 20:17:46 EDT
Description of problem:

In satellite 6.1

-----------------------

 hammer content-view update --help
Usage:
    hammer content-view update [OPTIONS]

Options:
 --component-ids COMPONENT_IDS           List of component content view version ids for composite views
                                         Comma separated list of values.
 --description DESCRIPTION               Description for the content view
 --id ID                                 Content view identifier
 --name NAME                             Content view name
 --new-name NEW_NAME                     New name for the content view
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --repositories REPOSITORY_NAMES         Comma separated list of values.   <----- repo_name 
 --repository-ids REPOSITORY_IDS         repository ID
                                         Comma separated list of values.
 -h, --help                              print help

1. Creating content view 'Foo'
hammer> content-view create --organization Brisbane --name Foo
Content view created

2. Checking repo list.
hammer> repository list --organization Brisbane
---|-------------------------------------------------------|---------------------------------|--------------|-----------------------------------------------------------------------
ID | NAME                                                  | PRODUCT                         | CONTENT TYPE | URL                                                                   
---|-------------------------------------------------------|---------------------------------|--------------|-----------------------------------------------------------------------
10 | JBoss Enterprise Application Platform                 | jboss channels                  | yum          |                                                                       
3  | motd-repo                                             | motd                            | puppet       | https://yum.puppetlabs.com/?_ga=1.37220005.488448745.1437627233       
2  | puppet-repo                                           | puppet                          | puppet       |                                                                       
4  | Red Hat Enterprise Linux 6 Server RPMs x86_64 6.6     | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/6/6.6/x86_64/os       
8  | Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os   
1  | Red Hat Virt V2V Tool for RHEL 7 RPMs x86_64 7.1      | Red Hat Enterprise Linux Server | yum          | https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/v2vwin/os
---|-------------------------------------------------------|---------------------------------|--------------|-----------------------------------------------------------------------

3. Assign repo to the content-view by name
hammer> content-view add-repository --organization Brisbane --name Foo --repository "Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server" 
The repository has been associated 

It works.

> content-view list --organization Brisbane
----------------|---------------------------|---------------------------|-----------|---------------
CONTENT VIEW ID | NAME                      | LABEL                     | COMPOSITE | REPOSITORY IDS
----------------|---------------------------|---------------------------|-----------|---------------
1               | Default Organization View | Default_Organization_View |           |               
5               | Foo                       | Foo                       |           | 8             
4               | RHEL Repo                 | RHEL_Repo                 |           | 4, 8          
3               | v2v                       | v2v                       |           | 1             
----------------|---------------------------|---------------------------|-----------|---------------

I don't think "content-view update" option works. This is more looks like a bug.

hammer> content-view update --organization Brisbane --name Foo --repositories "Red Hat Enterprise Linux 6 Server RPMs x86_64 6.6"
Could not update the content view:
  Error: Could not find repository, please set one of options --repositories, --repository-ids.

hammer> content-view update --organization Brisbane --name Foo --repositories "Red Hat Virt V2V Tool for RHEL 7 RPMs x86_64 7.1"
Could not update the content view:
  Error: Could not find repository, please set one of options --repositories, --repository-ids.

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


Actual results:
Could not update the content view:
  Error: Could not find repository, please set one of options --repositories, --repository-ids.

Expected results:
The repository has been associated

Additional info:
Comment 1 Brad Buckingham 2015-11-18 15:17:33 EST
This issue was also raised as part of bug 1254977.  That bug was created in the context of 'content-view create'; however, 1254977#4 also raised the issue with 'content-view update'.  In order to ensure that both issues are fixed at the same time, I am going to close this one as a duplicate.

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

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