-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #36797 - Update API in preparation for SCA-only #10760
Conversation
Issues: #36797 |
param :organization_id, :number, :desc => N_("Organization ID"), :required => true | ||
def status | ||
status = @organization.simple_content_access? | ||
render json: { simple_content_access: status } | ||
end | ||
|
||
api :PUT, "/organizations/:organization_id/simple_content_access/enable", | ||
N_("Enable simple content access for a manifest") | ||
N_("Enable simple content access for a manifest. %s") % sca_only_deprecation_text, deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the warning text here (when you're enabling) might be confusing. I'd keep it deprecated but don't add the sca_only_deprecation_text for this one.
@@ -47,6 +48,7 @@ def create | |||
def update | |||
return if params[:simple_content_access].nil? | |||
sca_param = ::Foreman::Cast.to_bool(params[:simple_content_access]) | |||
Rails.logger.warn "DEPRECATION WARNING: Simple Content Access will be required for all organizations in Katello 4.12." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use ::Foreman::Deprecation.api_deprecation_warning
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For both update
and create
?
[test katello] |
Local test passed. |
[test katello] |
@@ -17,6 +17,12 @@ def current_user | |||
User.current | |||
end | |||
|
|||
class_methods do | |||
def sca_only_deprecation_text | |||
N_("WARNING: Entitlement-based subscription management is deprecated and will be removed in Katello 4.12.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N_("WARNING: Entitlement-based subscription management is deprecated and will be removed in Katello 4.12.") | |
N_("WARNING: Simple Content Access will be required for all organizations in Katello 4.12.") |
I feel like in the API context it's more clear to just stick with this wording everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
thanks @lfu !
What are the changes introduced in this pull request?
Prepare API endpoints and params for the retirement of entitlement mode in Katello 4.12.
Considerations taken when implementing this change?
What are the testing steps for this pull request?
2023-10-03T20:04:59 [W|app|19e3e9b9] DEPRECATION WARNING: Simple Content Access will be required for all organizations in Katello 4.12.