diff options
24 files changed, 71 insertions, 52 deletions
diff --git a/lib/chef/resource/mount.rb b/lib/chef/resource/mount.rb index 1a1f8c0565..f70267fd23 100644 --- a/lib/chef/resource/mount.rb +++ b/lib/chef/resource/mount.rb @@ -21,8 +21,8 @@ require "chef/resource" class Chef class Resource - # Use the mount resource to manage a mounted file system. class Mount < Chef::Resource + description "Use the mount resource to manage a mounted file system." identity_attr :device diff --git a/lib/chef/resource/msu_package.rb b/lib/chef/resource/msu_package.rb index 77eeed898f..fd3290f90b 100644 --- a/lib/chef/resource/msu_package.rb +++ b/lib/chef/resource/msu_package.rb @@ -21,15 +21,15 @@ require "chef/mixin/uris" class Chef class Resource - # Use the msu_package resource to install Microsoft Update(MSU) packages on Microsoft Windows machines. - # - # @since 12.17 class MsuPackage < Chef::Resource::Package include Chef::Mixin::Uris resource_name :msu_package provides :msu_package, os: "windows" + description "Use the msu_package resource to install Microsoft Update(MSU) packages on Microsoft Windows machines." + introduced "12.17" + allowed_actions :install, :remove default_action :install diff --git a/lib/chef/resource/openbsd_package.rb b/lib/chef/resource/openbsd_package.rb index e5cdefe684..85109de9e8 100644 --- a/lib/chef/resource/openbsd_package.rb +++ b/lib/chef/resource/openbsd_package.rb @@ -25,14 +25,14 @@ require "chef/mixin/shell_out" class Chef class Resource - # Use the openbsd_package resource to manage packages for the OpenBSD platform. - # - # @since 12.1 class OpenbsdPackage < Chef::Resource::Package include Chef::Mixin::ShellOut resource_name :openbsd_package provides :package, os: "openbsd" + + description "Use the openbsd_package resource to manage packages for the OpenBSD platform." + introduced "12.1" end end end diff --git a/lib/chef/resource/osx_profile.rb b/lib/chef/resource/osx_profile.rb index 1d13a8851e..56eca90a7e 100644 --- a/lib/chef/resource/osx_profile.rb +++ b/lib/chef/resource/osx_profile.rb @@ -24,15 +24,16 @@ class Chef # on the macOS platform. The osx_profile resource installs profiles by using # the uuidgen library to generate a unique ProfileUUID, and then using the # profiles command to install the profile on the system. - # - # @since 12.7 class OsxProfile < Chef::Resource provides :osx_profile, os: "darwin" provides :osx_config_profile, os: "darwin" identity_attr :profile_name + description "12.7" + default_action :install + allowed_actions :install, :remove property :profile_name, String, name_property: true diff --git a/lib/chef/resource/pacman_package.rb b/lib/chef/resource/pacman_package.rb index 73d8afb0de..be86498ca2 100644 --- a/lib/chef/resource/pacman_package.rb +++ b/lib/chef/resource/pacman_package.rb @@ -20,10 +20,11 @@ require "chef/resource/package" class Chef class Resource - # Use the pacman_package resource to manage packages (using pacman) on the Arch Linux platform. class PacmanPackage < Chef::Resource::Package resource_name :pacman_package provides :pacman_package, os: "linux" + + description "Use the pacman_package resource to manage packages (using pacman) on the Arch Linux platform." end end end diff --git a/lib/chef/resource/paludis_package.rb b/lib/chef/resource/paludis_package.rb index 6bc598e4ee..df9c274298 100644 --- a/lib/chef/resource/paludis_package.rb +++ b/lib/chef/resource/paludis_package.rb @@ -21,13 +21,13 @@ require "chef/provider/package/paludis" class Chef class Resource - # Use the paludis_package resource to manage packages for the Paludis platform. - # - # @since 12.1 class PaludisPackage < Chef::Resource::Package resource_name :paludis_package provides :paludis_package, os: "linux" + description "Use the paludis_package resource to manage packages for the Paludis platform." + introduced "12.1" + allowed_actions :install, :remove, :upgrade property :timeout, default: 3600 diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb index a2bc516711..a12039b555 100644 --- a/lib/chef/resource/portage_package.rb +++ b/lib/chef/resource/portage_package.rb @@ -20,9 +20,10 @@ require "chef/resource/package" class Chef class Resource - # Use the portage_package resource to manage packages for the Gentoo platform. class PortagePackage < Chef::Resource::Package resource_name :portage_package + description "Use the portage_package resource to manage packages for the Gentoo platform." + def initialize(name, run_context = nil) super @provider = Chef::Provider::Package::Portage diff --git a/lib/chef/resource/powershell_package.rb b/lib/chef/resource/powershell_package.rb index 441ad76f01..fb1034a6e5 100644 --- a/lib/chef/resource/powershell_package.rb +++ b/lib/chef/resource/powershell_package.rb @@ -23,14 +23,14 @@ class Chef # Use the powershell_package resource to install and manage packages via the Powershell Package Manager for the # Microsoft Windows platform. The powershell_package resource requires administrative access, and a source must be # configured in the Powershell Package Manager via the Register-PackageSource command - # - # @since 12.16 class PowershellPackage < Chef::Resource::Package include Chef::Mixin::Uris resource_name :powershell_package provides :powershell_package, os: "windows" + introduced "12.16" + allowed_actions :install, :remove property :package_name, [String, Array], coerce: proc { |x| [x].flatten } diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb index e93c7f53c5..9879c05395 100644 --- a/lib/chef/resource/reboot.rb +++ b/lib/chef/resource/reboot.rb @@ -27,11 +27,11 @@ class Chef # In using this resource via notifications, it's important to *only* use # immediate notifications. Delayed notifications produce unintuitive and # probably undesired results. - # - # @since 12.0 class Reboot < Chef::Resource resource_name :reboot + introduced "12.0" + allowed_actions :request_reboot, :reboot_now, :cancel default_action :nothing # make sure people are quite clear what they want diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb index 922535f885..63079f997a 100644 --- a/lib/chef/resource/route.rb +++ b/lib/chef/resource/route.rb @@ -21,11 +21,12 @@ require "chef/resource" class Chef class Resource - # Use the route resource to manage the system routing table in a Linux environment. class Route < Chef::Resource default_action :add allowed_actions :add, :delete + description "Use the route resource to manage the system routing table in a Linux environment." + property :target, String, identity: true, name_property: true property :netmask, [String, nil] property :gateway, [String, nil] diff --git a/lib/chef/resource/rpm_package.rb b/lib/chef/resource/rpm_package.rb index 3760412a77..503f9abfda 100644 --- a/lib/chef/resource/rpm_package.rb +++ b/lib/chef/resource/rpm_package.rb @@ -21,11 +21,12 @@ require "chef/provider/package/rpm" class Chef class Resource - # Use the rpm_package resource to manage packages for the RPM Package Manager platform. class RpmPackage < Chef::Resource::Package resource_name :rpm_package provides :rpm_package, os: %w{linux aix} + description "Use the rpm_package resource to manage packages for the RPM Package Manager platform." + property :allow_downgrade, [ true, false ], default: false, desired_state: false end diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb index dc23155b59..07473c9709 100644 --- a/lib/chef/resource/service.rb +++ b/lib/chef/resource/service.rb @@ -22,12 +22,13 @@ require "shellwords" class Chef class Resource - # Use the service resource to manage a service. class Service < Chef::Resource identity_attr :service_name state_attrs :enabled, :running, :masked + description "Use the service resource to manage a service." + default_action :nothing allowed_actions :enable, :disable, :start, :stop, :restart, :reload, :mask, :unmask diff --git a/lib/chef/resource/smartos_package.rb b/lib/chef/resource/smartos_package.rb index 9e79cace3f..c509438689 100644 --- a/lib/chef/resource/smartos_package.rb +++ b/lib/chef/resource/smartos_package.rb @@ -21,10 +21,11 @@ require "chef/provider/package/smartos" class Chef class Resource - # Use the smartos_package resource to manage packages for the SmartOS platform. class SmartosPackage < Chef::Resource::Package resource_name :smartos_package provides :package, os: "solaris2", platform_family: "smartos" + + description "Use the smartos_package resource to manage packages for the SmartOS platform." end end end diff --git a/lib/chef/resource/solaris_package.rb b/lib/chef/resource/solaris_package.rb index 24215bb456..77232b0642 100644 --- a/lib/chef/resource/solaris_package.rb +++ b/lib/chef/resource/solaris_package.rb @@ -22,11 +22,12 @@ require "chef/provider/package/solaris" class Chef class Resource - # The solaris_package resource is used to manage packages for the Solaris platform. class SolarisPackage < Chef::Resource::Package resource_name :solaris_package provides :package, os: "solaris2", platform_family: "nexentacore" provides :package, os: "solaris2", platform_family: "solaris2", platform_version: "<= 5.10" + + description "The solaris_package resource is used to manage packages for the Solaris platform." end end end diff --git a/lib/chef/resource/subversion.rb b/lib/chef/resource/subversion.rb index 473a48cefd..5fa730a6cb 100644 --- a/lib/chef/resource/subversion.rb +++ b/lib/chef/resource/subversion.rb @@ -21,10 +21,12 @@ require "chef/resource/scm" class Chef class Resource - # Use the subversion resource to manage source control resources that exist in a Subversion repository. class Subversion < Chef::Resource::Scm allowed_actions :force_export + description "Use the subversion resource to manage source control resources that"\ + " exist in a Subversion repository." + def initialize(name, run_context = nil) super @svn_arguments = "--no-auth-cache" diff --git a/lib/chef/resource/systemd_unit.rb b/lib/chef/resource/systemd_unit.rb index baf7e4cfa8..72ae12a8a7 100644 --- a/lib/chef/resource/systemd_unit.rb +++ b/lib/chef/resource/systemd_unit.rb @@ -21,12 +21,12 @@ require "iniparse" class Chef class Resource - # Use the systemd_unit resource to create, manage, and run systemd units. - # - # @since 12.11 class SystemdUnit < Chef::Resource resource_name :systemd_unit + description "Use the systemd_unit resource to create, manage, and run systemd units." + introduced "12.11" + default_action :nothing allowed_actions :create, :delete, :preset, :revert, diff --git a/lib/chef/resource/windows_env.rb b/lib/chef/resource/windows_env.rb index d25fe9326b..f5f0bd126d 100644 --- a/lib/chef/resource/windows_env.rb +++ b/lib/chef/resource/windows_env.rb @@ -19,13 +19,15 @@ class Chef class Resource - # Use the env resource to manage environment keys in Microsoft Windows. After an environment key is set, Microsoft - # Windows must be restarted before the environment key will be available to the Task Scheduler. class WindowsEnv < Chef::Resource resource_name :windows_env provides :windows_env, os: "windows" provides :env, os: "windows" + description "Use the env resource to manage environment keys in Microsoft Windows."\ + " After an environment key is set, Microsoft Windows must be restarted"\ + " before the environment key will be available to the Task Scheduler." + default_action :create allowed_actions :create, :delete, :modify diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb index d373e1f19c..3aa3e32b42 100644 --- a/lib/chef/resource/windows_package.rb +++ b/lib/chef/resource/windows_package.rb @@ -23,8 +23,6 @@ require "chef/win32/error" if RUBY_PLATFORM =~ /mswin|mingw|windows/ class Chef class Resource - # Use the windows_package resource to manage Microsoft Installer Package (MSI) packages for the Microsoft Windows - # platform. class WindowsPackage < Chef::Resource::Package include Chef::Mixin::Uris @@ -32,6 +30,10 @@ class Chef provides :windows_package, os: "windows" provides :package, os: "windows" + description "Use the windows_package resource to manage Microsoft Installer Package"\ + " (MSI) packages for the Microsoft Windows platform." + introduced "11.12" + allowed_actions :install, :remove def initialize(name, run_context = nil) diff --git a/lib/chef/resource/windows_path.rb b/lib/chef/resource/windows_path.rb index 7da24a3c06..afe8b43ad9 100644 --- a/lib/chef/resource/windows_path.rb +++ b/lib/chef/resource/windows_path.rb @@ -20,13 +20,13 @@ require "chef/resource" class Chef class Resource - # Use the windows_path resource to manage the path environment variable on Microsoft Windows. - # - # @since 13.4 class WindowsPath < Chef::Resource resource_name :windows_path provides :windows_path + description "Use the windows_path resource to manage the path environment variable on Microsoft Windows." + introduced "13.4" + allowed_actions :add, :remove default_action :add diff --git a/lib/chef/resource/windows_service.rb b/lib/chef/resource/windows_service.rb index 4e14b18c20..8a76a716aa 100644 --- a/lib/chef/resource/windows_service.rb +++ b/lib/chef/resource/windows_service.rb @@ -21,9 +21,6 @@ require "chef/win32_service_constants" class Chef class Resource - # Use the windows_service resource to manage a service on the Microsoft Windows platform. - # - # @since 12.0 class WindowsService < Chef::Resource::Service include Chef::Win32ServiceConstants @@ -39,6 +36,9 @@ class Chef provides :windows_service, os: "windows" provides :service, os: "windows" + description "Use the windows_service resource to manage a service on the Microsoft Windows platform." + introduced "12.0" + allowed_actions :configure_startup, :create, :delete, :configure identity_attr :service_name diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb index 1b2c331e36..6f6b38e662 100644 --- a/lib/chef/resource/windows_task.rb +++ b/lib/chef/resource/windows_task.rb @@ -20,14 +20,14 @@ require "chef/resource" class Chef class Resource - # Use the windows_task resource to create, delete or run a Windows scheduled task. Requires Windows Server 2008 - # or later due to API usage. - # @since 13.0 class WindowsTask < Chef::Resource - resource_name :windows_task provides :windows_task, os: "windows" + description "Use the windows_task resource to create, delete or run a Windows"\ + " scheduled task. Requires Windows Server 2008 or later due to API usage." + introduced "13.0" + allowed_actions :create, :delete, :run, :end, :enable, :disable default_action :create diff --git a/lib/chef/resource/yum_repository.rb b/lib/chef/resource/yum_repository.rb index 7c30bc5457..76dad75084 100644 --- a/lib/chef/resource/yum_repository.rb +++ b/lib/chef/resource/yum_repository.rb @@ -20,14 +20,16 @@ require "chef/resource" class Chef class Resource - # Use the yum_repository resource to manage a Yum repository configuration file located at /etc/yum.repos.d/repositoryid.repo - # on the local machine. This configuration file specifies which repositories to reference, how to handle cached data, etc. - # - # @since 12.14 class YumRepository < Chef::Resource resource_name :yum_repository provides :yum_repository + description "Use the yum_repository resource to manage a Yum repository configuration"\ + " file located at /etc/yum.repos.d/repositoryid.repo on the local machine."\ + " This configuration file specifies which repositories to reference, how to"\ + " handle cached data, etc." + introduced "12.14" + # http://linux.die.net/man/5/yum.conf as well as # http://dnf.readthedocs.io/en/latest/conf_ref.html property :baseurl, [String, Array] diff --git a/lib/chef/resource/zypper_package.rb b/lib/chef/resource/zypper_package.rb index f412d59988..2e48caef55 100644 --- a/lib/chef/resource/zypper_package.rb +++ b/lib/chef/resource/zypper_package.rb @@ -20,12 +20,14 @@ require "chef/resource/package" class Chef class Resource - # Use the zypper_package resource to install, upgrade, and remove packages with Zypper for the SUSE Enterprise and - # OpenSUSE platforms. + class ZypperPackage < Chef::Resource::Package resource_name :zypper_package provides :package, platform_family: "suse" + description "Use the zypper_package resource to install, upgrade, and remove"\ + " packages with Zypper for the SUSE Enterprise and OpenSUSE platforms." + property :gpg_check, [ TrueClass, FalseClass ], default: lazy { Chef::Config[:zypper_check_gpg] } property :allow_downgrade, [ true, false ], default: false end diff --git a/lib/chef/resource/zypper_repository.rb b/lib/chef/resource/zypper_repository.rb index 72e0074b2a..298373b87d 100644 --- a/lib/chef/resource/zypper_repository.rb +++ b/lib/chef/resource/zypper_repository.rb @@ -20,15 +20,16 @@ require "chef/resource" class Chef class Resource - # The zypper_repository resource allows for the creation of Zypper package repositories on SUSE Enterprise Linux and - # openSUSE systems. This resource maintains full compatibility with the zypper_repository resource in the existing - # zypper cookbook. - # - # @since 13.3 class ZypperRepository < Chef::Resource resource_name :zypper_repository provides :zypper_repo + description "Use the zypper_repository resource to create Zypper package repositories"\ + " on SUSE Enterprise Linux and openSUSE systems. This resource maintains"\ + " full compatibility with the zypper_repository resource in the existing"\ + " zypper cookbook." + introduced "13.3" + property :repo_name, String, name_property: true property :description, String property :type, String, default: "NONE" |