Class: Kitchen::Provisioner::Base
- Inherits:
-
Object
- Object
- Kitchen::Provisioner::Base
- Includes:
- Logging
- Defined in:
- lib/kitchen/provisioner/base.rb
Overview
Base class for a provisioner.
Instance Attribute Summary collapse
-
#instance ⇒ Object
Returns the value of attribute instance.
Instance Method Summary collapse
-
#[](attr) ⇒ Object
Provides hash-like access to configuration keys.
- #cleanup_sandbox ⇒ Object
-
#config_keys ⇒ Array
Returns an array of configuration keys.
- #create_sandbox ⇒ Object
-
#diagnose ⇒ Hash
Returns a Hash of configuration and other useful diagnostic information.
- #init_command ⇒ Object
-
#initialize(config = {}) ⇒ Base
constructor
A new instance of Base.
- #install_command ⇒ Object
-
#name ⇒ String
Returns the name of this driver, suitable for display in a CLI.
- #prepare_command ⇒ Object
- #run_command ⇒ Object
Constructor Details
Instance Attribute Details
#instance ⇒ Object
Returns the value of attribute instance.
32 33 34 |
# File 'lib/kitchen/provisioner/base.rb', line 32 def instance @instance end |
Instance Method Details
#[](attr) ⇒ Object
Provides hash-like access to configuration keys.
52 53 54 |
# File 'lib/kitchen/provisioner/base.rb', line 52 def [](attr) config[attr] end |
#cleanup_sandbox ⇒ Object
73 |
# File 'lib/kitchen/provisioner/base.rb', line 73 def cleanup_sandbox ; end |
#config_keys ⇒ Array
Returns an array of configuration keys.
59 60 61 |
# File 'lib/kitchen/provisioner/base.rb', line 59 def config_keys config.keys end |
#create_sandbox ⇒ Object
67 |
# File 'lib/kitchen/provisioner/base.rb', line 67 def create_sandbox ; end |
#diagnose ⇒ Hash
Returns a Hash of configuration and other useful diagnostic information.
78 79 80 81 82 |
# File 'lib/kitchen/provisioner/base.rb', line 78 def diagnose result = Hash.new config_keys.sort.each { |k| result[k] = config[k] } result end |
#init_command ⇒ Object
65 |
# File 'lib/kitchen/provisioner/base.rb', line 65 def init_command ; end |
#install_command ⇒ Object
63 |
# File 'lib/kitchen/provisioner/base.rb', line 63 def install_command ; end |
#name ⇒ String
Returns the name of this driver, suitable for display in a CLI.
44 45 46 |
# File 'lib/kitchen/provisioner/base.rb', line 44 def name self.class.name.split('::').last end |
#prepare_command ⇒ Object
69 |
# File 'lib/kitchen/provisioner/base.rb', line 69 def prepare_command ; end |
#run_command ⇒ Object
71 |
# File 'lib/kitchen/provisioner/base.rb', line 71 def run_command ; end |