This file holds "in progress" release notes for the current release under development and is intended for consumption by the Chef Documentation team.
Please see https://docs.chef.io/release/<major>-<minor>/release_notes.html
for the official Chef release notes.
On the node object:
-
node.read("foo", "bar", "baz")
equalsnode["foo"]["bar"]["baz"]
but with safety (nil instead of exception) -
node.read!("foo", "bar", "baz")
equalsnode["foo"]["bar"]["baz"]
and does raises NoMethodError -
node.write(:default, "foo", "bar", "baz")
equalsnode.default["foo"]["bar"] = "baz"
and autovivifies and replaces intermediate non-hash objects (very safe) -
node.write!(:default, "foo", "bar", "baz")
equalsnode.default["foo"]["bar"] = "baz"
and while it autovivifies it can raise if you hit a non-hash on an intermediate key (NoMethodError) -
there is still no non-autovivifying writer, and i don't think anyone really wants one.
-
node.exist?("foo", "bar")
can be used to see ifnode["foo"]["bar"]
exists
On node levels:
node.default.read/read!("foo")
operates similarly tonode.read("foo")
but only on default levelnode.default.write/write!("foo", "bar")
isnode.write/write!(:default, "foo", "bar")
node.default.unlink/unlink!("foo")
isnode.unlink/unlink!(:default, "foo")
node.default.exist?("foo", "bar")
can be used to see ifnode.default["foo"]["bar"]
exists
Deprecations:
- node.set is deprecated
- node.set_unless is deprecated
- Adds
node
to thedata_collector
message data_collector
reports on all resources and not just those that have been processed