From 990cca06ffee547aeda6a543e3cbf256f0b32bce Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 6 Sep 2018 15:14:24 -0700 Subject: Add additional resource descriptions Filling in more of the missing resource descriptions using the descriptions straight from the docs site. Signed-off-by: Tim Smith --- lib/chef/resource/mount.rb | 63 +++++++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 18 deletions(-) (limited to 'lib/chef/resource/mount.rb') diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb index dffb96cb53..68ecee2335 100644 --- a/lib/chef/resource/mount.rb +++ b/lib/chef/resource/mount.rb @@ -29,32 +29,59 @@ class Chef # this is a poor API please do not re-use this pattern property :supports, Hash, - default: lazy { { remount: false } }, - coerce: proc { |x| x.is_a?(Array) ? x.each_with_object({}) { |i, m| m[i] = true } : x } + description: "Specify a Hash of supported mount features.", + default: lazy { { remount: false } }, + coerce: proc { |x| x.is_a?(Array) ? x.each_with_object({}) { |i, m| m[i] = true } : x } - property :password, String, sensitive: true + property :password, String, + description: "Windows only:. Use to specify the password for username.", + sensitive: true - property :mount_point, String, name_property: true - property :device, String, identity: true + property :mount_point, String, name_property: true, + description: "The directory (or path) in which the device is to be mounted. Defaults to the name of the resource block if not provided." + + property :device, String, identity: true, + description: "Required for :umount and :remount actions (for the purpose of checking the mount command output for presence). The special block device or remote node, a label, or a uuid to be mounted." property :device_type, [String, Symbol], - coerce: proc { |arg| arg.kind_of?(String) ? arg.to_sym : arg }, - default: :device, - equal_to: RUBY_PLATFORM =~ /solaris/i ? %i{ device } : %i{ device label uuid } + description: "The type of device: :device, :label, or :uuid", + coerce: proc { |arg| arg.kind_of?(String) ? arg.to_sym : arg }, + default: :device, + equal_to: RUBY_PLATFORM =~ /solaris/i ? %i{ device } : %i{ device label uuid } + + # @todo this should get refactored away: https://github.com/chef/chef/issues/7621 + property :mounted, [TrueClass, FalseClass], default: false - property :fsck_device, String, default: "-" - property :fstype, [String, nil], default: "auto" + property :fsck_device, String, + description: "Solaris only: The fsck device.", + default: "-" + + property :fstype, [String, nil], + description: "The file system type (fstype) of the device.", + default: "auto" property :options, [Array, String, nil], - coerce: proc { |arg| arg.kind_of?(String) ? arg.split(",") : arg }, - default: %w{defaults} + description: "An array or comma separated list of options for the mount.", + coerce: proc { |arg| arg.kind_of?(String) ? arg.split(",") : arg }, + default: %w{defaults} - property :dump, [Integer, FalseClass], default: 0 - property :pass, [Integer, FalseClass], default: 2 - property :mounted, [TrueClass, FalseClass], default: false - property :enabled, [TrueClass, FalseClass], default: false - property :username, String - property :domain, String + property :dump, [Integer, FalseClass], + description: "The dump frequency (in days) used while creating a file systems table (fstab) entry.", + default: 0 + + property :pass, [Integer, FalseClass], + description: "The pass number used by the file system check (fsck) command while creating a file systems table (fstab) entry.", + default: 2 + + property :enabled, [TrueClass, FalseClass], + description: "Use to specify if a mounted file system is enabled.", + default: false + + property :username, String, + description: "Windows only: Use to specify the user name." + + property :domain, String, + description: "Windows only: Use to specify the domain in which the username and password are located." private -- cgit v1.2.1