Class: TrainPlugins::WinRM::Transport
- Inherits:
-
Object
- Object
- TrainPlugins::WinRM::Transport
- Defined in:
- lib/train-winrm/transport.rb
Overview
A Transport which uses WinRM to execute commands and transfer files.
Constant Summary collapse
- SUPPORTED_WINRM_TRANSPORTS =
i{negotiate ssl plaintext kerberos}.freeze
Instance Method Summary collapse
- #connection(state = nil, &block) ⇒ Object
-
#initialize(opts) ⇒ Transport
constructor
A new instance of Transport.
Constructor Details
#initialize(opts) ⇒ Transport
80 81 82 83 |
# File 'lib/train-winrm/transport.rb', line 80 def initialize(opts) super(opts) load_needed_dependencies! end |
Instance Method Details
#connection(state = nil, &block) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/train-winrm/transport.rb', line 86 def connection(state = nil, &block) opts = (, state || {}) (opts) conn_opts = (opts) if @connection && == conn_opts reuse_connection(&block) else create_new_connection(conn_opts, &block) end end |