Module: Kitchen::Transport
- Defined in:
- lib/kitchen/transport.rb,
lib/kitchen/transport/ssh.rb,
lib/kitchen/transport/base.rb,
lib/kitchen/transport/dummy.rb,
lib/kitchen/transport/winrm.rb
Overview
A transport is responsible for the communication with an instance, that is remote comands and other actions such as file transfer, login, etc.
Defined Under Namespace
Classes: Base, Dummy, Ssh, SshFailed, TransportFailed, Winrm, WinrmFailed
Constant Summary collapse
- DEFAULT_PLUGIN =
Default transport to use
"ssh".freeze
Class Method Summary collapse
-
.for_plugin(plugin, config) ⇒ Transport::Base
Returns an instance of a transport given a plugin type string.
Class Method Details
.for_plugin(plugin, config) ⇒ Transport::Base
Returns an instance of a transport given a plugin type string.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/kitchen/transport.rb', line 39 def self.for_plugin(plugin, config) first_load = require("kitchen/transport/#{plugin}") str_const = Thor::Util.camel_case(plugin) klass = const_get(str_const) object = klass.new(config) object.verify_dependencies if first_load object rescue LoadError, NameError raise ClientError, "Could not load the '#{plugin}' transport from the load path." \ " Please ensure that your transport is installed as a gem or" \ " included in your Gemfile if using Bundler." end |