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 2211328

Summary: When simple content access is enabled, "--content-access-mode-all true" parameter should be passed to list the product content associated with the activation key
Product: Red Hat Satellite Reporter: Satyajit Das <sadas>
Component: Activation KeysAssignee: Aneta Šteflová Petrová <apetrova>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: bangelic, chrobert
Target Milestone: UnspecifiedKeywords: Documentation, 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: 2023-06-26 14:51:29 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 Satyajit Das 2023-05-31 06:31:50 UTC
Document URL: 

https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Managing_Activation_Keys_content-management


Section Number and Name: 

In the CLI procedure to create an activation key, using the hammer command

5. List the product content associated with the activation key:

Describe the issue: 

Entitlement-based Subscription Management is deprecated and it is recommended to use Simple Content Access, however, the command mentioned in the doc returns nothing if SCA is enabled in the Satellite.

Steps suggested in the doc:-

4. Attach the Red Hat Enterprise Linux subscription UUID to the activation key:

# hammer activation-key add-subscription \
--name "My_Activation_Key" \
--subscription-id My_Subscription_ID \
--organization "My_Organization"
5. List the product content associated with the activation key:

# hammer activation-key product-content \
--name "My_Activation_Key" \
--organization "My_Organization"

For ex.  If SCA is enabled in the satellite it returns nothing.

# hammer activation-key product-content --name Test --organization-id 1
---|------|------|-----|---------|-------|------------------|---------
ID | NAME | TYPE | URL | GPG KEY | LABEL | DEFAULT ENABLED? | OVERRIDE
---|------|------|-----|---------|-------|------------------|---------


Suggestions for improvement: 
After point 5, we should add a new point on how to list the product content associated with the activation key, if SCA is enabled.


If SCA is enabled in the satellite, to list product content using the hammer "--content-access-mode-all true" parameter should be passed.

For ex.  

# hammer activation-key product-content  --content-access-mode-all true  --name Test --organization-id 1
------|-----------------------------------------------------------------------|---------------------------------------------|------------------|---------
ID    | NAME                                                                  | LABEL                                       | DEFAULT ENABLED? | OVERRIDE
------|-----------------------------------------------------------------------|---------------------------------------------|------------------|---------
10742 | CentOS                                                                | RedHat_CentOS_CentOS                        | yes              |         
8134  | Centos 8 PowerTools                                                   | RedHat_EPEL-03138983_Centos_8_PowerTools    | yes              |         
10743 | Convert2RHEL                                                          | RedHat_CentOS_Convert2RHEL                  | yes              |         
7807  | epel-7                                                                | RedHat_EPEL-03138983_epel-7                 | yes              |         
7808  | epel-8                                                                | RedHat_EPEL-03138983_epel-8                 | yes              |         
10772 | jfrog                                                                 | RedHat_CentOS_jfrog                         | yes              |         
10739 | nagios-8                                                              | RedHat_ak-Reg_To_Crash1234444_nagios-8      | yes              |         
10740 | nagiosxi-deps                                                         | RedHat_ak-Reg_To_Crash1234444_nagiosxi-deps | yes              |         
5638  | Red Hat Ansible Engine 2.9 for RHEL 8 x86_64 (RPMs)                   | ansible-2.9-for-rhel-8-x86_64-rpms          | no               |         
5622  | Red Hat Ansible Engine 2.9 RPMs for Red Hat Enterprise Linux 7 Server | rhel-7-server-ansible-2.9-rpms              | no               |         
2590  | Red Hat Enterprise Linux 7 Server (Debug RPMs)                        | rhel-7-server-debug-rpms                    | no               |         
2588  | Red Hat Enterprise Linux 7 Server (Kickstart)                         | rhel-7-server-kickstart                     | no               |         
2587  | Red Hat Enterprise Linux 7 Server (RPMs)                              | rhel-7-server-rpms                          | yes              |         
335   | Red Hat Enterprise Linux 8 for x86_64 - AppStream (Kickstart)         | rhel-8-for-x86_64-appstream-kickstart       | no               |         
330   | Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)              | rhel-8-for-x86_64-appstream-rpms            | yes              |         
358   | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (Kickstart)            | rhel-8-for-x86_64-baseos-kickstart          | no               |         
365   | Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                 | rhel-8-for-x86_64-baseos-rpms               | yes              |         
4924  | Red Hat Enterprise Linux 8 for x86_64 - High Availability (RPMs)      | rhel-8-for-x86_64-highavailability-rpms     | no               |         
7011  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (Kickstart)         | rhel-9-for-x86_64-appstream-kickstart       | no               |         
7010  | Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)              | rhel-9-for-x86_64-appstream-rpms            | yes              |         
------|-----------------------------------------------------------------------|---------------------------------------------|------------------|---------


Additional information: 

Update the steps in the doc for all Satellite versions starting from 6.11 till the latest.

Comment 1 Marie Hornickova 2023-05-31 11:47:18 UTC
Hello Satyajit,
Many thanks for reporting this suggestion for improvement.
The BZ will go through proper team triage,and relevant updates about the progress on the implementation  will be shared in this ticket.
Thank you!

Comment 2 Aneta Šteflová Petrová 2023-06-22 12:55:31 UTC
PR submitted for review: https://github.com/theforeman/foreman-documentation/pull/2253

Comment 4 Red Hat Bugzilla 2023-10-25 04:25:13 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days