Bug 1998477

Summary: Add Simple content access status API to check whether SCA is enabled or disabled in Satellite
Product: Red Hat Satellite Reporter: Avnish Kumar <avnkumar>
Component: Subscription ManagementAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Cole Higgins <chiggins>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.10.0CC: apatel, chrobert, paji, zhunting
Target Milestone: 6.12.0Keywords: 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-11-16 13:32:46 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 Avnish Kumar 2021-08-27 10:37:48 UTC
Description of problem:
[RFE] Add Simple content access status API to check whether SCA is enabled or disabled in Satellite

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

How reproducible:
Satellite 6.10

Steps to Reproduce:
1. Login to Satellite Web UI
2. Open https://satellite.example.com/apidoc
3. Navigate to Simple content access API resources

Actual results:
We don't have API for simple content access status check

Expected results:
Should able to check simple content access status via API: Enable/Disable

Additional info:
Also request # hammer simple-content-access status

Comment 2 Jonathon Turel 2021-08-30 20:00:30 UTC
Hey Avnish,

You can currently check if an organization has simple content access mode enabled with the /api/organizations/$ID endpoint:

[vagrant@centos7-katello-devel foreman]$ hammer organization show --id 1 | grep "Simple Content Access"
[Foreman] Password for admin: 
Simple Content Access:  Disabled


Is that sufficient enough? I'm concerned about giving multiple ways to discover the same piece of information ie duplication

Comment 4 Jonathon Turel 2021-08-31 13:44:18 UTC
Avnish, you make a good point! I think this RFE is valid because it's cumbersome to have to use two hammer commands for this workflow. Thanks for raising it

Comment 6 Bryan Kearney 2022-07-08 00:04:10 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35102 has been resolved.

Comment 7 Partha Aji 2022-09-29 17:31:34 UTC
# hammer simple-content-access status --organization-id=1
---------------------
SIMPLE CONTENT ACCESS
---------------------
yes                  
---------------------

# curl -k https://`hostname`/katello/api/organizations/1/simple_content_access/status -u admin:changeme
{"simple_content_access":true}

Comment 11 errata-xmlrpc 2022-11-16 13:32:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506