Class | Chef::Node |
In: |
lib/chef/node/attribute.rb
lib/chef/node.rb |
Parent: | Object |
DESIGN_DOCUMENT | = | { "version" => 11, "language" => "javascript", "views" => { "all" => { "map" => <<-EOJS function(doc) { if (doc.chef_type == "node") { emit(doc.name, doc); } } EOJS |
automatic_attrs | [RW] | |
cookbook_collection | [RW] | TODO: 5/18/2010 cw/timh. cookbook_collection should be removed from here and for any place it‘s needed, it should be accessed through a Chef::RunContext |
couchdb | [RW] | |
couchdb_id | [R] | |
couchdb_rev | [RW] | |
default_attrs | [RW] | |
normal_attrs | [RW] | |
override_attrs | [RW] | |
recipe_list | [RW] | |
run_list | [RW] | |
run_state | [RW] |
List all the Chef::Node objects in the CouchDB. If inflate is set to true, you will get the full list of all Nodes, fully inflated.
Apply the default and overrides attributes from the expansion passed in, which came from roles.
Return true if this Node has a given attribute, false if not. Takes either a symbol or a string.
Only works on the top level. Preferred way is to use the normal [] style lookup and call attribute?()
Extracts the run list from attrs and applies it. Returns the remaining attributes
Find a recipe for this Chef::Node by fqdn. Will search first for Chef::Config["node_path"]/fqdn.rb, then hostname.rb, then default.rb.
Returns a new Chef::Node object.
Raises an ArgumentError if it cannot find the node.
Encouraged to only get used for lookups - while you can do sets from here, it‘s not as explicit as using the normal/default/override interface.
Returns true if this Node expects a given recipe, false if not.
First, the run list is consulted to see whether the recipe is explicitly included. If it‘s not there, it looks in run_state[:seen_recipes], which is populated by include_recipe statements in the DSL (and thus would not be in the run list).
NOTE: It‘s used by cookbook authors