summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-09-06 21:17:00 -0700
committerTim Smith <tsmith@chef.io>2018-09-06 21:17:00 -0700
commit8b352f2eb76fbda54a8fd59a493e0e7257ac4b90 (patch)
treec2ae8ec0e14b99f4fb2d7077ccbe127adae5222c
parentf16adbaa17ea1a6664e3e9514fd9e9e3e4bf4157 (diff)
downloadchef-8b352f2eb76fbda54a8fd59a493e0e7257ac4b90.tar.gz
Add introduced versions for properties and more descriptions
Getting the auto generated docs ready 1 fix at a time. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/apt_package.rb1
-rw-r--r--lib/chef/resource/apt_repository.rb2
-rw-r--r--lib/chef/resource/chocolatey_package.rb3
-rw-r--r--lib/chef/resource/ohai.rb2
-rw-r--r--lib/chef/resource/route.rb2
-rw-r--r--lib/chef/resource/systemd_unit.rb3
-rw-r--r--lib/chef/resource/windows_font.rb2
-rw-r--r--lib/chef/resource/yum_package.rb50
-rw-r--r--lib/chef/resource/zypper_package.rb2
9 files changed, 40 insertions, 27 deletions
diff --git a/lib/chef/resource/apt_package.rb b/lib/chef/resource/apt_package.rb
index 4738d0cbbe..3f4a36489d 100644
--- a/lib/chef/resource/apt_package.rb
+++ b/lib/chef/resource/apt_package.rb
@@ -31,6 +31,7 @@ class Chef
desired_state: false
property :overwrite_config_files, [TrueClass, FalseClass],
+ introduced: "14.0",
description: "Overwrite existing config files with those in the package if prompted by apt.",
default: false
diff --git a/lib/chef/resource/apt_repository.rb b/lib/chef/resource/apt_repository.rb
index a0d24a646b..7ff337ec7c 100644
--- a/lib/chef/resource/apt_repository.rb
+++ b/lib/chef/resource/apt_repository.rb
@@ -36,7 +36,7 @@ class Chef
regex: [/^[^\/]+$/],
description: "The name of the repository to configure, if it differs from the name of the resource block. The value of this setting must not contain spaces.",
validation_message: "repo_name property cannot contain a forward slash '/'",
- name_property: true
+ introduced: "14.1", name_property: true
property :uri, String,
description: "The base of the Debian distribution."
diff --git a/lib/chef/resource/chocolatey_package.rb b/lib/chef/resource/chocolatey_package.rb
index 0aa8a41613..c7d5a8a680 100644
--- a/lib/chef/resource/chocolatey_package.rb
+++ b/lib/chef/resource/chocolatey_package.rb
@@ -43,7 +43,8 @@ class Chef
property :returns, [Integer, Array],
description: "The exit code(s) returned a chocolatey package that indicate success.",
- default: [ 0 ], desired_state: false
+ default: [ 0 ], desired_state: false,
+ introduced: "12.18"
end
end
end
diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb
index 291c82c7b7..6cd60de9f4 100644
--- a/lib/chef/resource/ohai.rb
+++ b/lib/chef/resource/ohai.rb
@@ -27,7 +27,7 @@ class Chef
description "Use the ohai resource to reload the Ohai configuration on a node. This allows recipes that change system attributes (like a recipe that adds a user) to refer to those attributes later on during the chef-client run."
- property :ohai_name, name_property: true
+ property :ohai_name, name_property: true, introduced: "12.17"
property :plugin, String
default_action :reload
diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb
index b64dcf26c6..8c14394ace 100644
--- a/lib/chef/resource/route.rb
+++ b/lib/chef/resource/route.rb
@@ -28,7 +28,7 @@ class Chef
description "Use the route resource to manage the system routing table in a Linux environment."
property :target, String, identity: true, name_property: true
- property :comment, [String, nil]
+ property :comment, [String, nil], introduced: "14.0"
property :metric, [Integer, nil]
property :netmask, [String, nil]
property :gateway, [String, nil]
diff --git a/lib/chef/resource/systemd_unit.rb b/lib/chef/resource/systemd_unit.rb
index a4c3c3f180..fe4d88ccd2 100644
--- a/lib/chef/resource/systemd_unit.rb
+++ b/lib/chef/resource/systemd_unit.rb
@@ -52,7 +52,8 @@ class Chef
default: true, desired_state: false
property :unit_name, String, desired_state: false,
identity: true,
- name_property: true
+ name_property: true,
+ introduced: "13.7"
def to_ini
case content
diff --git a/lib/chef/resource/windows_font.rb b/lib/chef/resource/windows_font.rb
index 2f61876e9a..4c895321c0 100644
--- a/lib/chef/resource/windows_font.rb
+++ b/lib/chef/resource/windows_font.rb
@@ -29,7 +29,7 @@ class Chef
introduced "14.0"
property :font_name, String,
- description: "The file name of the font file name to install if different than the resource name.",
+ description: "The name of the font file to install, if it differs from the resource name.",
name_property: true
property :source, String,
diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb
index 905cacc477..f0ea7dbf50 100644
--- a/lib/chef/resource/yum_package.rb
+++ b/lib/chef/resource/yum_package.rb
@@ -38,28 +38,38 @@ class Chef
# its own arguments as unintended side-effects (and why functional languages that don't allow modifcations
# of variables eliminate entire classes of bugs).
# </lecture>
- property :package_name, [ String, Array ], identity: true, coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
- property :version, [ String, Array ], coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
- property :arch, [ String, Array ], coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
+ property :package_name, [ String, Array ],
+ description: "One of the following: the name of a package, the name of a package and its architecture, the name of a dependency.",
+ identity: true, coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
- property :flush_cache,
- Hash,
- default: { before: false, after: false },
- coerce: proc { |v|
- if v.is_a?(Hash)
- v
- elsif v.is_a?(Array)
- v.each_with_object({}) { |arg, obj| obj[arg] = true }
- elsif v.is_a?(TrueClass) || v.is_a?(FalseClass)
- { before: v, after: v }
- elsif v == :before
- { before: true, after: false }
- elsif v == :after
- { after: true, before: false }
- end
- }
+ property :version, [ String, Array ],
+ description: "The version of a package to be installed or upgraded. This property is ignored when using the ':upgrade' action.",
+ coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
- property :allow_downgrade, [ true, false ], default: false
+ property :arch, [ String, Array ],
+ description: "The architecture of the package to be installed or upgraded. This value can also be passed as part of the package name.",
+ coerce: proc { |x| x.is_a?(Array) ? x.to_a : x }
+
+ property :flush_cache, Hash,
+ description: "Flush the in-memory cache before or after a Yum operation that installs, upgrades, or removes a package. Accepts a Hash in the form: { :before => true/false, :after => true/false } or an Array in the form [ :before, :after ].\nYum automatically synchronizes remote metadata to a local cache. The chef-client creates a copy of the local cache, and then stores it in-memory during the chef-client run. The in-memory cache allows packages to be installed during the chef-client run without the need to continue synchronizing the remote metadata to the local cache while the chef-client run is in-progress.",
+ default: { before: false, after: false },
+ coerce: proc { |v|
+ if v.is_a?(Hash)
+ v
+ elsif v.is_a?(Array)
+ v.each_with_object({}) { |arg, obj| obj[arg] = true }
+ elsif v.is_a?(TrueClass) || v.is_a?(FalseClass)
+ { before: v, after: v }
+ elsif v == :before
+ { before: true, after: false }
+ elsif v == :after
+ { after: true, before: false }
+ end
+ }
+
+ property :allow_downgrade, [ true, false ],
+ description: "Downgrade a package to satisfy requested version requirements.",
+ default: false
property :yum_binary, String
end
diff --git a/lib/chef/resource/zypper_package.rb b/lib/chef/resource/zypper_package.rb
index 6738b32eda..6caa14c1a3 100644
--- a/lib/chef/resource/zypper_package.rb
+++ b/lib/chef/resource/zypper_package.rb
@@ -33,7 +33,7 @@ class Chef
property :allow_downgrade, [ TrueClass, FalseClass ],
description: "Allow downgrading a package to satisfy requested version requirements.",
- default: false
+ default: false, introduced: "13.6"
end
end
end