Sha256: ca347458b7df0a6d8db4d9813723dea8274e5c8e52df34b2c809ff5aca49f1c5

Contents?: true

Size: 882 Bytes

Versions: 78

Compression:

Stored size: 882 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)
          return key == 'name'
        end

        def chef_class
          Chef::Node
        end

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

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
chef-11.18.12-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.18.12 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.18.6-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.18.6 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.18.0-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.18.0 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.4-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.4 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.2-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.2 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.0-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.0 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.16.0.rc.0 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-12.0.0.alpha.1-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-12.0.0.alpha.1 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.14.6-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.14.6 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.14.2-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-11.14.2 lib/chef/chef_fs/data_handler/node_data_handler.rb
chef-12.0.0.alpha.0-x86-mingw32 lib/chef/chef_fs/data_handler/node_data_handler.rb