Skip to content

Commit

Permalink
Fixes #32835 - Add RHSM and content URL as info providers
Browse files Browse the repository at this point in the history
This exposes the RHSM and content URL as info providers. This allows
clients to use the ENC API to (re)configure subscription-manager. This
all becomes more important when the host subscription RPM is phased out.
  • Loading branch information
ekohl committed Jan 6, 2022
1 parent 9f13ead commit 6b31eee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/models/katello/host/info_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ def host_info
if host.content_facet.present?
info['parameters']['kickstart_repository'] = host.content_facet.kickstart_repository.try(:label)
end

if (rhsm_url = host.content_source&.rhsm_url)
info['parameters']['rhsm_url'] = rhsm_url.to_s
end

if (content_url = host.content_source&.pulp_content_url)
info['parameters']['content_url'] = content_url.to_s
end

info
end

Expand Down

0 comments on commit 6b31eee

Please sign in to comment.