Sha256: cc093f66ad43b2d6a585263ac1a6e3dcb512af1bfccf3231b9085ced85e27e64
Contents?: true
Size: 819 Bytes
Versions: 35
Compression:
Stored size: 819 Bytes
Contents
class DefaultProxyProxySelector < ::RemoteExecutionProxySelector def initialize # TODO: Remove this once we have a reliable way of determining the internal proxy without katello # Tracked as https://projects.theforeman.org/issues/29840 raise _('Internal proxy selector can only be used if Katello is enabled') unless defined?(::Katello) super end def available_proxies(host, provider) # TODO: Once we have a internal proxy marker/feature on the proxy, we can # swap the implementation raise _('default_capsule method missing from SmartProxy') unless ::SmartProxy.respond_to?(:default_capsule) internal_proxy = ::SmartProxy.default_capsule super.reduce({}) do |acc, (key, proxies)| acc.merge(key => proxies.select { |proxy| proxy == internal_proxy }) end end end
Version data entries
35 entries across 35 versions & 1 rubygems