Class: Chef::ChefFS::DataHandler::NodeDataHandler
Instance Method Summary
collapse
#chef_object, #default, #from_ruby, #minimize, #normalize_for_post, #normalize_for_put, #normalize_hash, #normalize_run_list, #remove_file_extension, #to_ruby, #to_ruby_keys, #verify_integrity
Instance Method Details
#chef_class ⇒ Object
28
29
30
|
# File 'lib/chef/chef_fs/data_handler/node_data_handler.rb', line 28
def chef_class
Chef::Node
end
|
#normalize(node, entry) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/chef/chef_fs/data_handler/node_data_handler.rb', line 8
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
|
#preserve_key?(key) ⇒ Boolean
24
25
26
|
# File 'lib/chef/chef_fs/data_handler/node_data_handler.rb', line 24
def preserve_key?(key)
key == "name"
end
|