Module: Katello::KatelloUrlsHelper
- Included in:
- Concerns::HostManagedExtensions
- Defined in:
- app/helpers/katello/katello_urls_helper.rb
Instance Method Summary collapse
Instance Method Details
#host(url) ⇒ Object
4 5 6 |
# File 'app/helpers/katello/katello_urls_helper.rb', line 4 def host(url) URI(url).host unless url.nil? end |
#subscription_manager_configuration_url(host = nil, rpm = true) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/katello/katello_urls_helper.rb', line 8 def subscription_manager_configuration_url(host = nil, rpm = true) prefix = if host && host.content_source "http://#{@host.content_source.hostname}" else Setting[:foreman_url].sub(/\Ahttps/, 'http') end config = rpm ? SETTINGS[:katello][:consumer_cert_rpm] : SETTINGS[:katello][:consumer_cert_sh] "#{prefix}/pub/#{config}" end |