Bug 1883715

Summary: hammer content-view filter create is missing '-original-module-streams'
Product: Red Hat Satellite Reporter: gtaylor
Component: Content ViewsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: apatel, kgaikwad, ofedoren, rabajaj, sajha
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: 2022-12-02 17:25:56 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:

Description gtaylor 2020-09-30 00:46:59 UTC
Description of problem:
When creating a module filter to 'Include all modules without errata' the hammer option '--original-module-streams' is missing.  The GUI has a checkbox and when clicking the checkbox, production.log has verbage about the option: 

2020-09-29T16:53:37 [I|app|85a96c3c]   Parameters: {"inclusion"=>true, "original_module_streams"=>true,
<additional log text deleted> 

The option works when using the GUI. 

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

How reproducible:
Always. 


Steps to Reproduce:
1. Get the repository IDs for RHEL 8 Base OS and AppStream for use in the next command.  
# hammer repository list --organization acme | egrep 'BaseOS RPMs 8|AppStream RPMs 8'

2. # hammer content-view create --name rhel8-module-test-1 --repository-ids 3,4 --organization acme 

3. # hammer content-view filter create --content-view rhel8-module-test  --name  "include all modules without errata"  --type modulemd --inclusion true --original-module-streams true --organization acme


Actual results:
Could not create the filter:
  Error: Unrecognised option '--original-module-streams'.


Expected results:
Works without error when using hammer.


Additional info:
The option '--original-packages true' seems like it might be an option, but fails.  That is for RPMs:
# hammer content-view filter create --content-view rhel8-module-test  --name  "include all modules without errata"  --type modulemd --inclusion true --original-packages true --organization acme
Could not create the filter:
  setting original_packages not supported for Katello::ContentViewModuleStreamFilter




Works in Satellite 6.8:
[root@sat68fips ~]# hammer content-view filter create --content-view rhel8-module-test-1 --name "include all modules without errata"  --type modulemd --inclusion true --original-module-streams true --organization acme
Filter created.

Satellite 6.8 includes help with the option present(--original-module-streams ORIGINAL_MODULE_STREAMS). See below.  
[root@sat68fips ~]# hammer content-view filter create --help
Usage:
    hammer content-view filter create [OPTIONS]
 
Options:
 --content-view[-id]                               Set the current content view context for the request. Name/Id can be used
 --description DESCRIPTION                         Description of the filter
 --inclusion INCLUSION                             Specifies if content should be included or excluded, default:
                                                   Inclusion=false
                                                   One of true/false, yes/no, 1/0.
 --name NAME                                       Name of the filter
 --organization ORGANIZATION_NAME                  Organization name to search by
 --organization-id ORGANIZATION_ID                 Organization ID to search by
 --organization-label ORGANIZATION_LABEL           Organization label to search by
 --original-module-streams ORIGINAL_MODULE_STREAMS Add all module streams without errata to the included/excluded list.           <=============== this option
                                                   (module stream filter only)
                                                   One of true/false, yes/no, 1/0.
 --original-packages ORIGINAL_PACKAGES             Add all packages without errata to the included/excluded list. (package
                                                   Filter only)
                                                   One of true/false, yes/no, 1/0.
 --product[-id]                                    Set the current product context for the request. Name/Id can be used
 --repositor[ies|y-ids]                            List of repository Names/Ids
                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                   JSON is acceptable and preferred way for complex parameters
 --type TYPE                                       Type of filter (e.g. rpm, package_group, erratum, docker, modulemd)
 -h, --help                                        Print help

This text(--original-module-streams ORIGINAL_MODULE_STREAMS) is not in 6.7.3:

Comment 1 Samir Jha 2021-01-04 19:36:16 UTC
Could you run the hammer command with the `-r` option? The --original-module-streams option is available in the API based on UI behavior. Hammer likely is using  the old api cache. You could also try running `foreman-rake apipie:cache` to regenerate the api cache.

Comment 2 gtaylor 2021-01-08 21:20:41 UTC
I cannot duplicate the issue on 6.7.5 and the 6.7.3 system doesn't exist now.  If I understand what you're saying, if I install a fresh 6.7.3 system the issue may not exist anyway because the api cache would be clean?  

So I believe it is not worth installing 6.7.3.  Correct?

Comment 3 Samir Jha 2021-01-11 17:38:57 UTC
(In reply to gtaylor from comment #2)
> I cannot duplicate the issue on 6.7.5 and the 6.7.3 system doesn't exist
> now.  If I understand what you're saying, if I install a fresh 6.7.3 system
> the issue may not exist anyway because the api cache would be clean?  
> 
> So I believe it is not worth installing 6.7.3.  Correct?
 
That is correct. An out of date Apipie cache on hammer would cause this issue and can be fixed with the -r flag or refreshing cache.

Comment 6 Brad Buckingham 2022-11-03 21:47:41 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 7 Brad Buckingham 2022-12-02 17:25:56 UTC
Thank you for your interest in Red Hat Satellite. 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 feel free to contact your Red Hat Account Team. Thank you.