Sha256: c4e82eed45651219a9e2ecfba3e34c6e753ecfc20435a701470e08fa77764b54

Contents?: true

Size: 570 Bytes

Versions: 13

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

module ForemanAcd
  # AcdProxy Selector implementing a RemoteExecutionProxySelector which
  # only returns the Smart Proxy of the given host
  class AcdProxyProxySelector < ::RemoteExecutionProxySelector
    def determine_proxy(*args)
      host, _provider = args

      # We already did the determine_proxy in app_configurator. We want that REX
      # isn't doing the determination of the proxy twice.
      # Therefore, we will just return the host, which is the proxy!

      ::SmartProxy.find_by(:name => host.name)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
foreman_acd-0.11.0 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.10.0 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.7 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.5 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.4 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.3 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.2.3 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.2.2 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.2.1 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.2 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.1 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.9.0 app/services/foreman_acd/acd_proxy_proxy_selector.rb
foreman_acd-0.7.0 app/services/foreman_acd/acd_proxy_proxy_selector.rb