Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: CLOSED DUPLICATE of bug 1922972
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-10-06 18:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-10-06 18:40:15 UTC
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.

Comment 6 Brad Buckingham 2023-09-01 21:10:52 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 8 Brad Buckingham 2023-10-04 21:18:07 UTC
Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration.

Comment 9 Brad Buckingham 2023-10-04 21:19:24 UTC
Samir,

Can you confirm if this is indeed in 6.14.0?  If so, is this bugzilla a duplicate of another?

Thanks!

Comment 10 Samir Jha 2023-10-06 17:32:02 UTC
Ack.The BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1922972 that lands in 6.14 should take care of this. Hammer will have a way to display applied filters for versions. 

*Note: Versions published before 6.14 will not have historical data on filters against those versions.*

Comment 11 Brad Buckingham 2023-10-06 18:40:15 UTC
Thanks Samir!

Based upon the feedback, I am going to close this one as a duplicate of bug 1922972.

If there are any concerns, please feel free to re-open.

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


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