Class: Kitchen::Provisioner::ChefZeroNodes

Inherits:
ChefZero
  • Object
show all
Defined in:
lib/kitchen/provisioner/chef_zero_nodes.rb

Instance Method Summary collapse

Instance Method Details

#create_sandboxObject



164
165
166
167
168
169
170
171
# File 'lib/kitchen/provisioner/chef_zero_nodes.rb', line 164

def create_sandbox
  if config[:nodes_path].nil?
    info("Provisioner setting 'nodes_path' is not defined! Using 'test/fixtures/nodes' for node objects!")
    config[:nodes_path] = 'test/fixtures/nodes'
  end
  FileUtils.rm(ext_node_file) if File.exist?(ext_node_file)
  create_chefzero_sandbox
end

#ext_node_fileObject



173
174
175
# File 'lib/kitchen/provisioner/chef_zero_nodes.rb', line 173

def ext_node_file
  File.join(config[:nodes_path], "#{instance.name}.json")
end

#unix_int_node_fileObject



177
178
179
# File 'lib/kitchen/provisioner/chef_zero_nodes.rb', line 177

def unix_int_node_file
  File.join(config[:root_path], 'nodes', "#{instance.name}.json")
end

#win_int_node_fileObject



181
182
183
# File 'lib/kitchen/provisioner/chef_zero_nodes.rb', line 181

def win_int_node_file
  File.join(config[:root_path], 'nodes', "#{instance.name}.json").tr('/', '\\')
end