Class: RemoteExecutionProxySelector
- Inherits:
-
ForemanTasks::ProxySelector
- Object
- ForemanTasks::ProxySelector
- RemoteExecutionProxySelector
show all
- Defined in:
- app/services/remote_execution_proxy_selector.rb
Constant Summary
collapse
- INTERNAL_PROXY =
'internal'.freeze
Instance Method Summary
collapse
Instance Method Details
#available_proxies(host, provider, capability: nil) ⇒ Object
5
6
7
8
9
10
11
12
|
# File 'app/services/remote_execution_proxy_selector.rb', line 5
def available_proxies(host, provider, capability: nil)
proxies = host.remote_execution_proxies(provider)
return proxies if capability.nil?
proxies.reduce({}) do |acc, (strategy, possible_proxies)|
acc.merge(strategy => possible_proxies.select { |proxy| proxy.has_capability?(provider, capability) })
end
end
|