Bug #14174
closedcontent-view add-repository silently fails if product is not provided
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1223953
Description of problem:
content-view add-repository silently fails if product is not provided
Version-Release number of selected component (if applicable):
Sat 6.1 GA Snap 5
How reproducible:
Always
Steps to Reproduce:
hammer> content-view add-repository --name=sat6toolscustomrepo1 --organization-id=1 --name=rhel7partialcv
The repository has been associated
But looking at content-view info shows that the repo is not associated:
hammer> content-view info --name=rhel7partialcv --organization-id=1ID: 4
...
Yum Repositories:
1) ID: 2
Name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
Label: Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server
Docker Repositories:
Puppet Modules:
...
Actual results:
If product option is not provided, Repo is not associated as shown above.
Expected results:
If product option is not provided, show an error message and not a success message.
Additional info:
Alternatively, passing product option makes this scenario work fine:
hammer> content-view add-repository --name=sat6toolscustomrepo1 --organization-id=1 --name=rhel7partialcv --product=sat6toolscustom
The repository has been associated
hammer> content-view info --name=rhel7partialcv --organization-id=1ID: 4
Name: rhel7partialcv
...
Yum Repositories:
1) ID: 2
Name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
Label: Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server
2) ID: 16
Name: sat6toolscustomrepo1
Label: sat6toolscustomrepo1
...