Class: Kitchen::Provisioner::Cinc::CommonSandbox Private

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/kitchen/provisioner/cinc/common_sandbox.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Internal object to manage common sandbox preparation for Cinc-related provisioners.

Author:

  • Cinc Project

Instance Method Summary collapse

Constructor Details

#initialize(config, sandbox_path, instance) ⇒ CommonSandbox

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Constructs a new object, taking config, a sandbox path, and an instance.

Parameters:

  • config (Hash)

    configuration hash

  • sandbox_path (String)

    path to local sandbox directory

  • instance (Instance)

    an instance



36
37
38
39
40
# File 'lib/kitchen/provisioner/cinc/common_sandbox.rb', line 36

def initialize(config, sandbox_path, instance)
  @config = config
  @sandbox_path = sandbox_path
  @instance = instance
end

Instance Method Details

#populateObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Populate the sandbox.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/kitchen/provisioner/cinc/common_sandbox.rb', line 43

def populate
  prepare_json
  prepare_cache
  prepare_cookbooks
  prepare(:data)
  prepare(:data_bags)
  prepare(:environments)
  prepare(:nodes)
  prepare(:roles)
  prepare(:clients)
  prepare(
    :secret,
    type: :file,
    dest_name: "encrypted_data_bag_secret",
    key_name: :encrypted_data_bag_secret_key_path
  )
end