<commit_before>require 'benchmark'
require 'kitchen'
require 'chef_metal_vsphere/vsphere_driver'
require 'chef_metal/chef_machine_spec'

module Kitchen
  module Driver
  	module VsphereCommon
      def create(state)
        config[:server_name] ||= "kitchen-#{instance.name}-#{SecureRandom.hex}"
        state[:username] = config[:machine_options][:bootstrap_options][:ssh][:user]
        state[:password] = config[:machine_options][:bootstrap_options][:ssh][:password]
        
        machine = with_metal_driver(config[:server_name]) do | action_handler, driver, machine_spec|
      	  driver.allocate_machine(action_handler, machine_spec, config[:machine_options])
      	  driver.ready_machine(action_handler, machine_spec, config[:machine_options])
          state[:server_id] = machine_spec.location['server_id']
          state[:hostname] = machine_spec.location['ipaddress']
          state[:vsphere_name] = config[:server_name]
        end<commit_msg>change machine naming strategy so that we dont have conflicts<commit_after>require 'benchmark'
require 'kitchen'
require 'chef_metal_vsphere/vsphere_driver'
require 'chef_metal/chef_machine_spec'

module Kitchen
  module Driver
  	module VsphereCommon
      def create(state)
        config[:server_name] ||= "kitchen-#{SecureRandom.hex}-#{instance.name}"
        state[:username] = config[:machine_options][:bootstrap_options][:ssh][:user]
        state[:password] = config[:machine_options][:bootstrap_options][:ssh][:password]
        
        machine = with_metal_driver(config[:server_name]) do | action_handler, driver, machine_spec|
      	  driver.allocate_machine(action_handler, machine_spec, config[:machine_options])
      	  driver.ready_machine(action_handler, machine_spec, config[:machine_options])
          state[:server_id] = machine_spec.location['server_id']
          state[:hostname] = machine_spec.location['ipaddress']
          state[:vsphere_name] = config[:server_name]
        end
{'fraction_non_alphanumeric': 0.11776649746192894, 'fraction_numerical': 0.0, 'mean_word_length': 4.729651162790698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6026796', 'n_tokens_mistral': 581, 'n_tokens_neox': 571, 'n_words': 90}