Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2062774

Summary: [RFE] hammer activation-key product-content does not have --page and --per-page
Product: Red Hat Satellite Reporter: Karishma <kdeshpan>
Component: Activation KeysAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, bkielhol, chrobert, dsinglet, kgaikwad, ofedoren, paji, pbadguja
Target Milestone: UnspecifiedKeywords: FutureFeature, 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: 2024-03-20 19:53:09 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 Karishma 2022-03-10 14:59:10 UTC
1. Proposed title of this feature request

==> [RFE] Add --page and --per-page flag to list hammer activation-key with product-content option

=============================================================
hammer activation-key product-content --help
Usage:
    hammer activation-key product-content [OPTIONS]

Options:
 --content-access-mode-all CONTENT_ACCESS_MODE_ALL Get all content available, not just that provided by subscriptions
                                                   One of true/false, yes/no, 1/0.
 --content-access-mode-env CONTENT_ACCESS_MODE_ENV Limit content to just that available in the activation key's content view version
                                                   One of true/false, yes/no, 1/0.
 --fields FIELDS                                   Show specified fields or predefined field sets only. (See below)
                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                   JSON is acceptable and preferred way for complex parameters
 --id ID                                           Id of the activation key
 --name NAME                                       Activation key name to search by
 --organization[-id|-title|-label]                 Name/Title/Label/Id of associated organization
 -h, --help                                        Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Name             | x   | x       | x
  Type             | x   | x       |
  Url              | x   | x       |
  Gpg key          | x   | x       |
  Label            | x   | x       |
  Default enabled? | x   | x       |
  Override         | x   | x       |
  -----------------|-----|---------|-----

=============================================================

2. What are the nature and description of the request? 
==> Customer is using anisble playbook hence looking for hammer commands to get it executed using cli

3. How would you like to achieve this? (List the functional requirements here). 

Add the option of --page and --per-page to get the details of activation-key with product-content option.

Comment 1 Benjamin Kielhold 2022-04-25 20:10:23 UTC
It should be noted that hammer will suggest these page options exist when they really don't, for example:

$ sudo hammer activation-key product-content --name <name> --organization <org_name> --fields Name,Label,Override --content-access-mode-all true --content-access-mode-env true

----------------------------------|-------------------------------------------------|----------
NAME                              | LABEL                                           | OVERRIDE
----------------------------------|-------------------------------------------------|----------
Product one                       | product_one                                     | enabled:0
...
Product 20                        | product_20                                      | enabled:1
----------------------------------|-------------------------------------------------|----------
Page 1 of 2 (use --page and --per-page for navigation).


$ sudo hammer activation-key product-content --name <name> --organization <org_name> --fields Name,Label,Override --content-access-mode-all true --content-access-mode-env true --per-page 200

Error: Unrecognised option '--per-page'.


The pagination issue can be worked around by changing the "Entries per page" setting on the Satellite webui to the desired amount which is located in Administer -> Settings -> General tab.

Comment 4 Brad Buckingham 2024-02-11 20:37:14 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 6 Brad Buckingham 2024-03-20 19:53:09 UTC
Based upon feedback this was as addressed by https://github.com/Katello/katello/pull/10318 which was delivered in a previous release of Satellite; therefore, moving it to CLOSED:CURRENTRELEASE.

Comment 7 Red Hat Bugzilla 2024-07-19 04:25:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days