Class: Kitchen::Driver::Base
- Inherits:
-
Plugin::Base
- Object
- Plugin::Base
- Kitchen::Driver::Base
- Includes:
- Configurable, Logging, ShellOut
- Defined in:
- lib/kitchen/driver/base.rb
Overview
Base class for a driver.
Instance Attribute Summary
Attributes included from Configurable
Class Method Summary collapse
-
.kitchen_driver_api_version(version) ⇒ Object
Sets the API version for this driver.
Instance Method Summary collapse
-
#cache_directory ⇒ Object
Cache directory that a driver could implement to inform the provisioner that it can leverage it internally.
-
#create(state) ⇒ Object
Creates an instance.
-
#destroy(state) ⇒ Object
Destroys an instance.
-
#doctor(state) ⇒ Object
Check system and configuration for common errors.
-
#initialize(config = {}) ⇒ Base
constructor
Creates a new Driver object using the provided configuration data which will be merged with any default configuration.
-
#package(state) ⇒ Object
Package an instance.
Methods included from ShellOut
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?
Methods inherited from Plugin::Base
Constructor Details
#initialize(config = {}) ⇒ Base
Creates a new Driver object using the provided configuration data which will be merged with any default configuration.
34 35 36 |
# File 'lib/kitchen/driver/base.rb', line 34 def initialize(config = {}) init_config(config) end |
Class Method Details
.kitchen_driver_api_version(version) ⇒ Object
Sets the API version for this driver. If the driver does not set this value, then nil will be used and reported.
Sets the API version for this driver
85 86 87 |
# File 'lib/kitchen/driver/base.rb', line 85 def self.kitchen_driver_api_version(version) @api_version = version end |
Instance Method Details
#cache_directory ⇒ Object
Cache directory that a driver could implement to inform the provisioner that it can leverage it internally
93 |
# File 'lib/kitchen/driver/base.rb', line 93 def cache_directory; end |
#create(state) ⇒ Object
Creates an instance.
42 43 44 |
# File 'lib/kitchen/driver/base.rb', line 42 def create(state) # rubocop:disable Lint/UnusedMethodArgument pre_create_command end |
#destroy(state) ⇒ Object
Destroys an instance.
50 |
# File 'lib/kitchen/driver/base.rb', line 50 def destroy(state); end |
#doctor(state) ⇒ Object
Check system and configuration for common errors.
62 63 64 |
# File 'lib/kitchen/driver/base.rb', line 62 def doctor(state) false end |
#package(state) ⇒ Object
Package an instance.
56 |
# File 'lib/kitchen/driver/base.rb', line 56 def package(state); end |