Bug 1576429

Summary: API content-view version info does not require mandatory organization
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: API - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: chrobert
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-02 17:53:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Peter Vreman 2018-05-09 12:41:35 UTC
Description of problem:
The API of content-view version info (called from hammer) does not require the mandatory organization.
This results in wrong behaviour: 
- Specifying incorrect version is specified then an incorrect error because the filter is missing the organization.
- Specifying a version that is also in an other content view version available it returns error that more than one found

Without organization
-----------------------------------------------
[crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view sat-6.3-ci --version 999
Error: one of content_view_versions not found

[crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view sat-6.3-ci --version 2
Error: found more than one content_view_version

# Now (with luck) a version that is unique for all CVV returns the data:
crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view sat-6.3-ci --version 19 | grep '^[^ ]'
ID:                     1244
Name:                   hgp-crash:sat-6.3-ci 19.0
Version:                19.0
Description:
Content View ID:        126
Content View Name:      hgp-crash:sat-6.3-ci
Content View Label:     hgp-crash_sat-6_3-ci
Lifecycle Environments:
Repositories:
Puppet Modules:
-----------------------------------------------

Now adding the correct Organization:
-----------------------------------------------
[crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view sat-6.3-ci --version 999 --organization Hilti
Error: content_view not found

[crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view sat-6.3-ci --version 2 --organization Hilti
Error: content_view not found
-----------------------------------------------


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


How reproducible:


Steps to Reproduce:
1. See calls in description
2.
3.

Actual results:
Unexpected results or incorrect errors

Expected results:
Correct results and errors

Additional info:

Comment 1 Peter Vreman 2018-05-09 12:47:20 UTC
Note that in the tests i even made a typo in the content_view name and it returned the content_view_vesions messages instead of the content_view missing

A correct test that has valid error of content_view_versions was:


[crash/LI] root@li-lc-1578:~# sudo -u hoici hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view version info --content-view hgp-crash:sat-6.3-ci --version 999 --organization Hilti
Error: one of content_view_versions not found

Comment 3 Bryan Kearney 2019-07-02 17:53:26 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.