Sha256: a17802cbed502f17a565e7de4fbcdbccc03a41440060acf744e18dc13698f5fc

Contents?: true

Size: 913 Bytes

Versions: 27

Compression:

Stored size: 913 Bytes

Contents

require "chef/chef_fs/data_handler/data_handler_base"
require "chef/node"

class Chef
  module ChefFS
    module DataHandler
      class NodeDataHandler < DataHandlerBase
        def normalize(node, entry)
          result = normalize_hash(node, {
            "name" => remove_dot_json(entry.name),
            "json_class" => "Chef::Node",
            "chef_type" => "node",
            "chef_environment" => "_default",
            "override" => {},
            "normal" => {},
            "default" => {},
            "automatic" => {},
            "run_list" => [],
          })
          result["run_list"] = normalize_run_list(result["run_list"])
          result
        end

        def preserve_key?(key)
          key == "name"
        end

        def chef_class
          Chef::Node
        end

        # Nodes do not support .rb files
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
chef-14.13.11-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.12.9-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.12.3-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.12.14-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.11.21-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.10.9-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.9.13-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.8.12-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.7.17-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.12.3-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.6.47-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.11.3-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.5.33-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.10.4-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.3.37-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.10.0-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-13.9.4-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.2.0-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.1.12-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-14.1.1-universal-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb