Class: Kitchen::Transport::Winrm
- Defined in:
- lib/kitchen/transport/winrm.rb
Overview
A Transport which uses WinRM to execute commands and transfer files.
Defined Under Namespace
Classes: Connection
Instance Attribute Summary
Attributes included from Configurable
Instance Method Summary collapse
-
#connection(state, &block) ⇒ Connection
Creates a new Connection, configured by a merging of configuration and state data.
Methods inherited from Base
#initialize, kitchen_transport_api_version
Methods included from Logging
#banner, #debug, #error, #fatal, #info, #warn
Methods included from Configurable
#[], #bourne_shell?, #calculate_path, #config_keys, #diagnose, #diagnose_plugin, #finalize_config!, included, #name, #powershell_shell?, #remote_path_join, #unix_os?, #verify_dependencies, #windows_os?
Constructor Details
This class inherits a constructor from Kitchen::Transport::Base
Instance Method Details
#connection(state, &block) ⇒ Connection
Creates a new Connection, configured by a merging of configuration and state data. Depending on the implementation, the Connection could be saved or cached to speed up multiple calls, given the same state hash as input.
56 57 58 59 60 61 62 63 64 |
# File 'lib/kitchen/transport/winrm.rb', line 56 def connection(state, &block) = (config.to_hash.merge(state)) if @connection && @connection_options == reuse_connection(&block) else create_new_connection(, &block) end end |