    # File lib/chef/node.rb, line 466
        def to_hash
          index_hash = Hash.new
          index_hash["chef_type"] = "node"
          index_hash["name"] = name
          index_hash["chef_environment"] = chef_environment
          attribute.each do |key, value|
            index_hash[key] = value
          end
          index_hash["recipe"] = run_list.recipe_names if run_list.recipe_names.length > 0
          index_hash["role"] = run_list.role_names if run_list.role_names.length > 0
          index_hash["run_list"] = run_list.run_list if run_list.run_list.length > 0
          index_hash
        end