Module: Kitchen::Driver

Defined in:
lib/kitchen/driver.rb,
lib/kitchen/driver/base.rb,
lib/kitchen/driver/exec.rb,
lib/kitchen/driver/dummy.rb,
lib/kitchen/driver/proxy.rb,
lib/kitchen/driver/ssh_base.rb

Overview

A driver is responsible for carrying out the lifecycle activities of an instance, such as creating and destroying an instance.

Author:

Defined Under Namespace

Classes: Base, Dummy, Exec, Proxy, SSHBase

Constant Summary collapse

DEFAULT_PLUGIN =

Default driver plugin to use

"dummy".freeze

Class Method Summary collapse

Class Method Details

.for_plugin(plugin, config) ⇒ Driver::Base

Returns an instance of a driver given a plugin type string.

Parameters:

  • plugin (String)

    a driver plugin type, which will be constantized

  • config (Hash)

    a configuration hash to initialize the driver

Returns:

Raises:

  • (ClientError)

    if a driver instance could not be created

  • (UserError)

    if the driver’s dependencies could not be met



36
37
38
# File 'lib/kitchen/driver.rb', line 36

def self.for_plugin(plugin, config)
  Kitchen::Plugin.load(self, plugin, config)
end