Class: ForemanAcd::AcdProxyProxySelector

Inherits:
RemoteExecutionProxySelector
  • Object
show all
Defined in:
app/services/foreman_acd/acd_proxy_proxy_selector.rb

Overview

AcdProxy Selector implementing a RemoteExecutionProxySelector which only returns the Smart Proxy of the given host

Instance Method Summary collapse

Instance Method Details

#determine_proxy(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'app/services/foreman_acd/acd_proxy_proxy_selector.rb', line 7

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