Bug 2109699 - [RFE] Add optional filter options to hammer command "hammer content-view version"
Summary: [RFE] Add optional filter options to hammer command "hammer content-view vers...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.9.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 20:51 UTC by Jessica Richards
Modified: 2023-07-21 19:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-18734 0 None None None 2023-06-30 13:17:57 UTC

Description Jessica Richards 2022-07-21 20:51:28 UTC
1. Proposed title of this feature request

[RFE] Add optional filter options to hammer command "hammer content-view version"

2. Who is the customer behind the request?

sysmgmt team

3. What is the nature and description of the request?

I'd like to request that the options be added to hammer:

hammer > content-view > version > filter
hammer > content-view > version > filter > add-repository
hammer > content-view > version > filter > create
hammer > content-view > version > filter > delete
hammer > content-view > version > filter > info
hammer > content-view > version > filter > list
hammer > content-view > version > filter > remove-repository
hammer > content-view > version > filter > rule
hammer > content-view > version > filter > rule > create
hammer > content-view > version > filter > rule > delete
hammer > content-view > version > filter > rule > info
hammer > content-view > version > filter > rule > list
hammer > content-view > version > filter > rule > update
hammer > content-view > version > filter > update

4. Why does the customer need this? (List the business requirements here)

Sometimes customers ask us for help figuring out why their hosts can't see certain content provided by their content views. We can use either hammer or the web interface to see filters that have been applied to the latest version of the content view, but we can't see filters that were applied to older versions of a content view, and that do not apply to the current content view.  If the customer is using multiple content view versions (eg one version for production and one version for non-production), then those versions could have different filters.

However, if we only add the list and info options to content-view > version, then hammer commands will be inconsistent, so I've copied all of the options I see under "content-view > filter" here.

5. How would the customer like to achieve this? (List the functional requirements here)

It would probably require updates to the foreman API.

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

Run the new commands and compare the results to what we see in the web interface.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

no

8. Does the customer have any specific time-line dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

no

9. Is the sales team involved in this request and do they have any additional input?

no

10. List any affected packages or components.

foreman

11. Would the customer be able to assist in testing this functionality if implemented?

yes

Comment 3 Samir Jha 2023-07-20 18:17:00 UTC
The filter subcommands live under content-view subcommand in hammer. That is logically consistent as filters live on content views. CV versions get filters applied at run time when publishing. 
We have a new flag on hammer-content version info --include-applied-filters which can be used to see filters that were applied at the time of publishing that version.

Jessica, does that resolve this RFE request? Let us know if you expect any more additions to hammer around this. If not, recommend closing this ticket as duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1922972.

Comment 4 Jessica Richards 2023-07-20 19:13:40 UTC
Samir,

Yes, the option "--include-applied-filters" would definitely give us the information we need, but it doesn't seem to work for me in Satellite 6.13.2:

# hammer content-view version info --id 41 --include-applied-filters
Error: Unrecognised option '--include-applied-filters'.

See: 'hammer content-view version <info|show> --help'.


Do you know in what version will that option be made available?

Comment 5 Samir Jha 2023-07-21 19:54:41 UTC
This will be available in 6.14.0.


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