test-kitchen 2.5.3 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -3
- data/bin/kitchen +1 -3
- data/lib/kitchen.rb +2 -5
- data/lib/kitchen/base64_stream.rb +0 -1
- data/lib/kitchen/cli.rb +2 -2
- data/lib/kitchen/collection.rb +0 -1
- data/lib/kitchen/color.rb +0 -1
- data/lib/kitchen/command.rb +0 -3
- data/lib/kitchen/command/action.rb +1 -2
- data/lib/kitchen/command/console.rb +0 -1
- data/lib/kitchen/command/diagnose.rb +3 -4
- data/lib/kitchen/command/doctor.rb +0 -1
- data/lib/kitchen/command/exec.rb +0 -1
- data/lib/kitchen/command/list.rb +1 -2
- data/lib/kitchen/command/login.rb +0 -1
- data/lib/kitchen/command/package.rb +0 -1
- data/lib/kitchen/command/sink.rb +0 -1
- data/lib/kitchen/command/test.rb +1 -2
- data/lib/kitchen/config.rb +1 -2
- data/lib/kitchen/configurable.rb +0 -1
- data/lib/kitchen/data_munger.rb +0 -1
- data/lib/kitchen/diagnostic.rb +0 -1
- data/lib/kitchen/driver.rb +0 -1
- data/lib/kitchen/driver/base.rb +2 -39
- data/lib/kitchen/driver/dummy.rb +0 -1
- data/lib/kitchen/driver/exec.rb +0 -1
- data/lib/kitchen/driver/proxy.rb +0 -1
- data/lib/kitchen/driver/ssh_base.rb +3 -40
- data/lib/kitchen/errors.rb +0 -1
- data/lib/kitchen/generator/init.rb +0 -1
- data/lib/kitchen/instance.rb +41 -15
- data/lib/kitchen/lazy_hash.rb +0 -1
- data/lib/kitchen/lifecycle_hooks.rb +0 -1
- data/lib/kitchen/loader/yaml.rb +2 -3
- data/lib/kitchen/logger.rb +1 -2
- data/lib/kitchen/logging.rb +0 -1
- data/lib/kitchen/login_command.rb +0 -1
- data/lib/kitchen/metadata_chopper.rb +0 -1
- data/lib/kitchen/platform.rb +0 -1
- data/lib/kitchen/plugin.rb +0 -1
- data/lib/kitchen/plugin_base.rb +60 -0
- data/lib/kitchen/provisioner.rb +0 -1
- data/lib/kitchen/provisioner/base.rb +2 -2
- data/lib/kitchen/provisioner/chef/berkshelf.rb +0 -1
- data/lib/kitchen/provisioner/chef/common_sandbox.rb +1 -2
- data/lib/kitchen/provisioner/chef/policyfile.rb +5 -6
- data/lib/kitchen/provisioner/chef_apply.rb +0 -1
- data/lib/kitchen/provisioner/chef_base.rb +16 -11
- data/lib/kitchen/provisioner/chef_solo.rb +4 -1
- data/lib/kitchen/provisioner/chef_zero.rb +0 -1
- data/lib/kitchen/provisioner/dummy.rb +0 -1
- data/lib/kitchen/provisioner/shell.rb +1 -2
- data/lib/kitchen/rake_tasks.rb +0 -1
- data/lib/kitchen/shell_out.rb +1 -2
- data/lib/kitchen/ssh.rb +6 -4
- data/lib/kitchen/state_file.rb +1 -2
- data/lib/kitchen/suite.rb +0 -1
- data/lib/kitchen/thor_tasks.rb +1 -2
- data/lib/kitchen/transport.rb +0 -1
- data/lib/kitchen/transport/base.rb +2 -2
- data/lib/kitchen/transport/dummy.rb +0 -1
- data/lib/kitchen/transport/exec.rb +1 -2
- data/lib/kitchen/transport/ssh.rb +4 -5
- data/lib/kitchen/transport/winrm.rb +3 -4
- data/lib/kitchen/util.rb +1 -2
- data/lib/kitchen/verifier.rb +0 -1
- data/lib/kitchen/verifier/base.rb +2 -2
- data/lib/kitchen/verifier/busser.rb +3 -4
- data/lib/kitchen/verifier/dummy.rb +0 -1
- data/lib/kitchen/verifier/shell.rb +1 -2
- data/lib/kitchen/version.rb +1 -2
- data/lib/vendor/hash_recursive_merge.rb +0 -1
- data/test-kitchen.gemspec +4 -5
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70a2b4e8550bd740b74b498d123705e34431ccc5d5a7e1fe2d103600f6ced214
|
4
|
+
data.tar.gz: 596588c5ab19dd10e06ff8e1ec9781bb79e87d97f9ec55750753302de7ef524d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c41498d1f5900b67cbee755e7b1e2eb127162bd010dc8c391bb74a34945dc915b7b160361b5344f8d96a53fb254c6415bd01327aa821d3ac1407308eccf1c636
|
7
|
+
data.tar.gz: 949dffda64b62446c5de2ed0635c7f17110d4237da2c2ea0419f16bbc58d601ff642fb260e3d641659a82a1476d509e207e4f4b5fe411cd383831090b37ea155
|
data/Rakefile
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
1
|
require "bundler/gem_tasks"
|
4
2
|
|
5
3
|
require "rake/testtask"
|
@@ -44,7 +42,7 @@ desc "Run all quality tasks"
|
|
44
42
|
task quality: %i{style stats}
|
45
43
|
|
46
44
|
begin
|
47
|
-
require "yard"
|
45
|
+
require "yard" unless defined?(YARD)
|
48
46
|
YARD::Rake::YardocTask.new
|
49
47
|
rescue LoadError
|
50
48
|
puts "yard is not available. (sudo) gem install yard to generate yard documentation."
|
data/bin/kitchen
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# -*- encoding: utf-8 -*-
|
3
|
-
|
4
2
|
# Trap interrupts to quit cleanly. See
|
5
3
|
# https://twitter.com/mitchellh/status/283014103189053442
|
6
4
|
Signal.trap("INT") { exit 1 }
|
7
5
|
|
8
6
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), %w{.. lib})
|
9
|
-
require "rubygems"
|
7
|
+
require "rubygems" unless defined?(Gem)
|
10
8
|
require "kitchen/cli"
|
11
9
|
require "kitchen/errors"
|
12
10
|
|
data/lib/kitchen.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -16,9 +15,7 @@
|
|
16
15
|
# See the License for the specific language governing permissions and
|
17
16
|
# limitations under the License.
|
18
17
|
|
19
|
-
require "pathname"
|
20
|
-
require "thread"
|
21
|
-
|
18
|
+
require "pathname" unless defined?(Pathname)
|
22
19
|
require_relative "kitchen/errors"
|
23
20
|
require_relative "kitchen/logger"
|
24
21
|
require_relative "kitchen/logging"
|
@@ -68,7 +65,7 @@ module Kitchen
|
|
68
65
|
#
|
69
66
|
# @return [Pathname] root path of gem
|
70
67
|
def source_root
|
71
|
-
@source_root ||= Pathname.new(File.expand_path("
|
68
|
+
@source_root ||= Pathname.new(File.expand_path("..", __dir__))
|
72
69
|
end
|
73
70
|
|
74
71
|
# Returns a default logger which emits on standard output.
|
data/lib/kitchen/cli.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -16,7 +15,8 @@
|
|
16
15
|
# See the License for the specific language governing permissions and
|
17
16
|
# limitations under the License.
|
18
17
|
|
19
|
-
require
|
18
|
+
# CI tests fail without an explicit unconditional require of Thor
|
19
|
+
require "thor" # rubocop:disable ChefRuby/UnlessDefinedRequire
|
20
20
|
|
21
21
|
require_relative "../kitchen"
|
22
22
|
require_relative "generator/init"
|
data/lib/kitchen/collection.rb
CHANGED
data/lib/kitchen/color.rb
CHANGED
data/lib/kitchen/command.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -16,8 +15,6 @@
|
|
16
15
|
# See the License for the specific language governing permissions and
|
17
16
|
# limitations under the License.
|
18
17
|
|
19
|
-
require "thread"
|
20
|
-
|
21
18
|
module Kitchen
|
22
19
|
module Command
|
23
20
|
# Base class for CLI commands.
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -18,7 +17,7 @@
|
|
18
17
|
|
19
18
|
require_relative "../command"
|
20
19
|
|
21
|
-
require "benchmark"
|
20
|
+
require "benchmark" unless defined?(Benchmark)
|
22
21
|
|
23
22
|
module Kitchen
|
24
23
|
module Command
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -19,7 +18,7 @@
|
|
19
18
|
require_relative "../command"
|
20
19
|
require_relative "../diagnostic"
|
21
20
|
|
22
|
-
|
21
|
+
autoload :YAML, "yaml"
|
23
22
|
|
24
23
|
module Kitchen
|
25
24
|
module Command
|
@@ -33,9 +32,9 @@ module Kitchen
|
|
33
32
|
|
34
33
|
loader = record_failure { load_loader }
|
35
34
|
|
36
|
-
puts Kitchen::Diagnostic.new(
|
35
|
+
puts YAML.dump(Kitchen::Diagnostic.new(
|
37
36
|
loader: loader, instances: instances, plugins: plugins?
|
38
|
-
).read
|
37
|
+
).read)
|
39
38
|
end
|
40
39
|
|
41
40
|
private
|
data/lib/kitchen/command/exec.rb
CHANGED
data/lib/kitchen/command/list.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -17,7 +16,7 @@
|
|
17
16
|
# limitations under the License.
|
18
17
|
|
19
18
|
require_relative "../command"
|
20
|
-
require "json"
|
19
|
+
require "json" unless defined?(JSON)
|
21
20
|
|
22
21
|
module Kitchen
|
23
22
|
module Command
|
data/lib/kitchen/command/sink.rb
CHANGED
data/lib/kitchen/command/test.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -18,7 +17,7 @@
|
|
18
17
|
|
19
18
|
require_relative "../command"
|
20
19
|
|
21
|
-
require "benchmark"
|
20
|
+
require "benchmark" unless defined?(Benchmark)
|
22
21
|
|
23
22
|
module Kitchen
|
24
23
|
module Command
|
data/lib/kitchen/config.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -214,7 +213,7 @@ module Kitchen
|
|
214
213
|
provisioner: Provisioner::DEFAULT_PLUGIN,
|
215
214
|
verifier: Verifier::DEFAULT_PLUGIN,
|
216
215
|
transport: lambda do |_suite, platform|
|
217
|
-
|
216
|
+
/^win/i.match?(platform) ? "winrm" : Transport::DEFAULT_PLUGIN
|
218
217
|
end,
|
219
218
|
},
|
220
219
|
kitchen_root: kitchen_root,
|
data/lib/kitchen/configurable.rb
CHANGED
data/lib/kitchen/data_munger.rb
CHANGED
data/lib/kitchen/diagnostic.rb
CHANGED
data/lib/kitchen/driver.rb
CHANGED
data/lib/kitchen/driver/base.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -20,6 +19,7 @@ require_relative "../configurable"
|
|
20
19
|
require_relative "../errors"
|
21
20
|
require_relative "../lazy_hash"
|
22
21
|
require_relative "../logging"
|
22
|
+
require_relative "../plugin_base"
|
23
23
|
require_relative "../shell_out"
|
24
24
|
|
25
25
|
module Kitchen
|
@@ -27,7 +27,7 @@ module Kitchen
|
|
27
27
|
# Base class for a driver.
|
28
28
|
#
|
29
29
|
# @author Fletcher Nichol <fnichol@nichol.ca>
|
30
|
-
class Base
|
30
|
+
class Base < Kitchen::Plugin::Base
|
31
31
|
include Configurable
|
32
32
|
include Logging
|
33
33
|
include ShellOut
|
@@ -70,43 +70,6 @@ module Kitchen
|
|
70
70
|
false
|
71
71
|
end
|
72
72
|
|
73
|
-
class << self
|
74
|
-
# @return [Array<Symbol>] an array of action method names that cannot
|
75
|
-
# be run concurrently and must be run in serial via a shared mutex
|
76
|
-
attr_reader :serial_actions
|
77
|
-
end
|
78
|
-
|
79
|
-
# Registers certain driver actions that cannot be safely run concurrently
|
80
|
-
# in threads across multiple instances. Typically this might be used
|
81
|
-
# for create or destroy actions that use an underlying resource that
|
82
|
-
# cannot be used at the same time.
|
83
|
-
#
|
84
|
-
# A shared mutex for this driver object will be used to synchronize all
|
85
|
-
# registered methods.
|
86
|
-
#
|
87
|
-
# @example a single action method that cannot be run concurrently
|
88
|
-
#
|
89
|
-
# no_parallel_for :create
|
90
|
-
#
|
91
|
-
# @example multiple action methods that cannot be run concurrently
|
92
|
-
#
|
93
|
-
# no_parallel_for :create, :destroy
|
94
|
-
#
|
95
|
-
# @param methods [Array<Symbol>] one or more actions as symbols
|
96
|
-
# @raise [ClientError] if any method is not a valid action method name
|
97
|
-
def self.no_parallel_for(*methods)
|
98
|
-
action_methods = %i{create setup converge verify destroy}
|
99
|
-
|
100
|
-
Array(methods).each do |meth|
|
101
|
-
next if action_methods.include?(meth)
|
102
|
-
|
103
|
-
raise ClientError, "##{meth} is not a valid no_parallel_for method"
|
104
|
-
end
|
105
|
-
|
106
|
-
@serial_actions ||= []
|
107
|
-
@serial_actions += methods
|
108
|
-
end
|
109
|
-
|
110
73
|
# Sets the API version for this driver. If the driver does not set this
|
111
74
|
# value, then `nil` will be used and reported.
|
112
75
|
#
|
data/lib/kitchen/driver/dummy.rb
CHANGED
data/lib/kitchen/driver/exec.rb
CHANGED
data/lib/kitchen/driver/proxy.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -19,7 +18,8 @@
|
|
19
18
|
require "thor/util"
|
20
19
|
|
21
20
|
require_relative "../lazy_hash"
|
22
|
-
|
21
|
+
require_relative "../plugin_base"
|
22
|
+
require "benchmark" unless defined?(Benchmark)
|
23
23
|
|
24
24
|
module Kitchen
|
25
25
|
module Driver
|
@@ -43,7 +43,7 @@ module Kitchen
|
|
43
43
|
# Transport, and Verifier subsystems may not be picked up in these
|
44
44
|
# Drivers. When legacy Driver::SSHBase support is removed, this class
|
45
45
|
# will no longer be available.
|
46
|
-
class SSHBase
|
46
|
+
class SSHBase < Kitchen::Plugin::Base
|
47
47
|
include ShellOut
|
48
48
|
include Configurable
|
49
49
|
include Logging
|
@@ -180,43 +180,6 @@ module Kitchen
|
|
180
180
|
# documented dependency is missing from the system
|
181
181
|
def verify_dependencies; end
|
182
182
|
|
183
|
-
class << self
|
184
|
-
# @return [Array<Symbol>] an array of action method names that cannot
|
185
|
-
# be run concurrently and must be run in serial via a shared mutex
|
186
|
-
attr_reader :serial_actions
|
187
|
-
end
|
188
|
-
|
189
|
-
# Registers certain driver actions that cannot be safely run concurrently
|
190
|
-
# in threads across multiple instances. Typically this might be used
|
191
|
-
# for create or destroy actions that use an underlying resource that
|
192
|
-
# cannot be used at the same time.
|
193
|
-
#
|
194
|
-
# A shared mutex for this driver object will be used to synchronize all
|
195
|
-
# registered methods.
|
196
|
-
#
|
197
|
-
# @example a single action method that cannot be run concurrently
|
198
|
-
#
|
199
|
-
# no_parallel_for :create
|
200
|
-
#
|
201
|
-
# @example multiple action methods that cannot be run concurrently
|
202
|
-
#
|
203
|
-
# no_parallel_for :create, :destroy
|
204
|
-
#
|
205
|
-
# @param methods [Array<Symbol>] one or more actions as symbols
|
206
|
-
# @raise [ClientError] if any method is not a valid action method name
|
207
|
-
def self.no_parallel_for(*methods)
|
208
|
-
action_methods = %i{create converge setup verify destroy}
|
209
|
-
|
210
|
-
Array(methods).each do |meth|
|
211
|
-
next if action_methods.include?(meth)
|
212
|
-
|
213
|
-
raise ClientError, "##{meth} is not a valid no_parallel_for method"
|
214
|
-
end
|
215
|
-
|
216
|
-
@serial_actions ||= []
|
217
|
-
@serial_actions += methods
|
218
|
-
end
|
219
|
-
|
220
183
|
# Cache directory that a driver could implement to inform the provisioner
|
221
184
|
# that it can leverage it internally
|
222
185
|
#
|
data/lib/kitchen/errors.rb
CHANGED
data/lib/kitchen/instance.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
#
|
3
2
|
# Author:: Fletcher Nichol (<fnichol@nichol.ca>)
|
4
3
|
#
|
@@ -16,8 +15,8 @@
|
|
16
15
|
# See the License for the specific language governing permissions and
|
17
16
|
# limitations under the License.
|
18
17
|
|
19
|
-
require "benchmark"
|
20
|
-
require "fileutils"
|
18
|
+
require "benchmark" unless defined?(Benchmark)
|
19
|
+
require "fileutils" unless defined?(FileUtils)
|
21
20
|
|
22
21
|
module Kitchen
|
23
22
|
# An instance of a suite running on a platform. A created instance may be a
|
@@ -29,7 +28,7 @@ module Kitchen
|
|
29
28
|
include Logging
|
30
29
|
|
31
30
|
class << self
|
32
|
-
# @return [Hash] a hash of
|
31
|
+
# @return [Hash] a hash of mutexes, arranged by Plugin class names
|
33
32
|
# @api private
|
34
33
|
attr_accessor :mutexes
|
35
34
|
|
@@ -323,21 +322,29 @@ module Kitchen
|
|
323
322
|
end
|
324
323
|
end
|
325
324
|
|
326
|
-
#
|
327
|
-
#
|
325
|
+
# If a plugin has declared via .no_parallel_for that it is not
|
326
|
+
# thread-safe for certain actions, create a mutex to track it.
|
328
327
|
#
|
328
|
+
# @param plugin_class[Class] Kitchen::Plugin::Base
|
329
329
|
# @api private
|
330
|
-
def
|
331
|
-
|
332
|
-
|
333
|
-
if driver.class.serial_actions
|
330
|
+
def setup_plugin_mutexes(plugin_class)
|
331
|
+
if plugin_class.serial_actions
|
334
332
|
Kitchen.mutex.synchronize do
|
335
333
|
self.class.mutexes ||= {}
|
336
|
-
self.class.mutexes[
|
334
|
+
self.class.mutexes[plugin_class] = Mutex.new
|
337
335
|
end
|
338
336
|
end
|
339
337
|
end
|
340
338
|
|
339
|
+
# Perform any final configuration or preparation needed for the driver
|
340
|
+
# object carry out its duties.
|
341
|
+
#
|
342
|
+
# @api private
|
343
|
+
def setup_driver
|
344
|
+
@driver.finalize_config!(self)
|
345
|
+
setup_plugin_mutexes(driver.class)
|
346
|
+
end
|
347
|
+
|
341
348
|
# Perform any final configuration or preparation needed for the lifecycle hooks
|
342
349
|
# object carry out its duties.
|
343
350
|
#
|
@@ -352,6 +359,7 @@ module Kitchen
|
|
352
359
|
# @api private
|
353
360
|
def setup_provisioner
|
354
361
|
@provisioner.finalize_config!(self)
|
362
|
+
setup_plugin_mutexes(provisioner.class)
|
355
363
|
end
|
356
364
|
|
357
365
|
# Perform any final configuration or preparation needed for the transport
|
@@ -360,6 +368,7 @@ module Kitchen
|
|
360
368
|
# @api private
|
361
369
|
def setup_transport
|
362
370
|
transport.finalize_config!(self)
|
371
|
+
setup_plugin_mutexes(transport.class)
|
363
372
|
end
|
364
373
|
|
365
374
|
# Perform any final configuration or preparation needed for the verifier
|
@@ -368,6 +377,7 @@ module Kitchen
|
|
368
377
|
# @api private
|
369
378
|
def setup_verifier
|
370
379
|
verifier.finalize_config!(self)
|
380
|
+
setup_plugin_mutexes(verifier.class)
|
371
381
|
end
|
372
382
|
|
373
383
|
# Perform all actions in order from last state to desired state.
|
@@ -542,10 +552,11 @@ module Kitchen
|
|
542
552
|
# @param block [Proc] a block to be called
|
543
553
|
# @api private
|
544
554
|
def synchronize_or_call(what, state)
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
555
|
+
plugin_class = plugin_class_for_action(what)
|
556
|
+
if Array(plugin_class.serial_actions).include?(what)
|
557
|
+
debug("#{to_str} is synchronizing on #{plugin_class}##{what}")
|
558
|
+
self.class.mutexes[plugin_class].synchronize do
|
559
|
+
debug("#{to_str} is messaging #{plugin_class}##{what}")
|
549
560
|
yield(state)
|
550
561
|
end
|
551
562
|
else
|
@@ -553,6 +564,21 @@ module Kitchen
|
|
553
564
|
end
|
554
565
|
end
|
555
566
|
|
567
|
+
# Maps the given action to the plugin class associated with the action
|
568
|
+
#
|
569
|
+
# @param what[Symbol] action
|
570
|
+
# @return [Class] Kitchen::Plugin::Base
|
571
|
+
# @api private
|
572
|
+
def plugin_class_for_action(what)
|
573
|
+
{
|
574
|
+
create: driver,
|
575
|
+
setup: transport,
|
576
|
+
converge: provisioner,
|
577
|
+
verify: verifier,
|
578
|
+
destroy: driver,
|
579
|
+
}[what].class
|
580
|
+
end
|
581
|
+
|
556
582
|
# Writes a high level message for logging and/or output.
|
557
583
|
#
|
558
584
|
# In this case, all instance banner messages will be written to the common
|