lib/kitchen/driver/vsphere.rb in chef-provisioning-vsphere-0.6.0.dev.1 vs lib/kitchen/driver/vsphere.rb in chef-provisioning-vsphere-0.6.0
- old
+ new
@@ -37,23 +37,10 @@
driver.ready_machine(action_handler, machine_spec, config[:machine_options])
state[:server_id] = machine_spec.location['server_id']
state[:hostname] = machine_spec.location['ipaddress']
machine_spec.save(action_handler)
end
-
- node_dir = File.join(instance.verifier[:test_base_path], "nodes")
- Dir.mkdir(node_dir) unless Dir.exist?(node_dir)
- node_file = File.join(node_dir, "#{instance.suite.name}.json")
- node = {
- :id => instance.suite.name,
- :automatic => {
- :ipaddress => state[:hostname]
- }
- }
- File.open(node_file, 'w') do |out|
- out << JSON.pretty_generate(node)
- end
end
def destroy(state)
return if state[:server_id].nil?
@@ -64,12 +51,9 @@
end
state.delete(:server_id)
state.delete(:hostname)
state.delete(:vsphere_name)
-
- node_file = File.join(instance.verifier[:test_base_path], "nodes/#{instance.suite.name}.json")
- File.delete(node_file) if File.exist?(node_file)
end
def with_provisioning_driver(state, &block)
config[:machine_options][:convergence_options] = {:chef_server => chef_server}
machine_spec = Chef::Provisioning.chef_managed_entry_store(chef_server).get(:machine, state[:vsphere_name])