class Bcome::Ssh::Driver
Attributes
config[R]
context_node[R]
Public Class Methods
new(config, context_node)
click to toggle source
# File lib/objects/ssh/driver.rb, line 14 def initialize(config, context_node) @config = config @context_node = context_node end
Public Instance Methods
connection_wrangler()
click to toggle source
# File lib/objects/ssh/driver.rb, line 19 def connection_wrangler @connection_wrangler ||= set_connection_wrangler end
has_multi_hop_proxy?()
click to toggle source
# File lib/objects/ssh/driver.rb, line 54 def has_multi_hop_proxy? !multi_hop_proxy_config.nil? end
has_proxy?()
click to toggle source
# File lib/objects/ssh/driver.rb, line 58 def has_proxy? return connection_wrangler.has_hop? end
multi_hop_proxy_config()
click to toggle source
# File lib/objects/ssh/driver.rb, line 50 def multi_hop_proxy_config @config[:multi_hop_proxy] end
pretty_ssh_config()
click to toggle source
# File lib/objects/ssh/driver.rb, line 31 def pretty_ssh_config config = { user: user, timeout: timeout_in_seconds } if has_proxy? config[:proxy] = connection_wrangler.proxy_details else config[:host_or_ip] = node_host_or_ip end config end
proxy_chain()
click to toggle source
# File lib/objects/ssh/driver.rb, line 23 def proxy_chain @proxy_chain ||= ::Bcome::Ssh::ProxyChain.new(connection_wrangler) end
proxy_config_value()
click to toggle source
# File lib/objects/ssh/driver.rb, line 46 def proxy_config_value @config[:proxy] end
set_connection_wrangler()
click to toggle source
# File lib/objects/ssh/driver.rb, line 27 def set_connection_wrangler @connection_wrangler = ::Bcome::Ssh::ConnectionWrangler.new(self) end