diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-03 19:38:50 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-02-05 11:10:05 -0800 |
commit | a7b879ac9c07b7658f37e9a127d3cd845c35ed74 (patch) | |
tree | 0b63640b06a413510c620d33cfbc5dc6ca496586 | |
parent | 126c886d569ae7aeb9e90612b582317adddac188 (diff) | |
download | chef-a7b879ac9c07b7658f37e9a127d3cd845c35ed74.tar.gz |
Update yard for better snippet generation
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | chef-utils/lib/chef-utils/dsl/cloud.rb | 2 | ||||
-rw-r--r-- | chef-utils/lib/chef-utils/dsl/virtualization.rb | 18 |
2 files changed, 20 insertions, 0 deletions
diff --git a/chef-utils/lib/chef-utils/dsl/cloud.rb b/chef-utils/lib/chef-utils/dsl/cloud.rb index 6aba9d1b51..24f09d638c 100644 --- a/chef-utils/lib/chef-utils/dsl/cloud.rb +++ b/chef-utils/lib/chef-utils/dsl/cloud.rb @@ -71,6 +71,7 @@ module ChefUtils def eucalyptus?(node = __getnode) node.key?("eucalyptus") end + # chef-sugar backcompat method alias_method :euca?, :eucalyptus? # Return true if the current current node is in Linode @@ -113,6 +114,7 @@ module ChefUtils def digital_ocean?(node = __getnode) node.key?("digital_ocean") end + # chef-sugar backcompat method alias_method :digitalocean?, :digital_ocean? # Return true if the current current node is in SoftLayer diff --git a/chef-utils/lib/chef-utils/dsl/virtualization.rb b/chef-utils/lib/chef-utils/dsl/virtualization.rb index df3a1ac3eb..e04805151e 100644 --- a/chef-utils/lib/chef-utils/dsl/virtualization.rb +++ b/chef-utils/lib/chef-utils/dsl/virtualization.rb @@ -25,6 +25,7 @@ module ChefUtils # Determine if the current node is a KVM guest. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -35,6 +36,7 @@ module ChefUtils # Determine if the current node is a KVM host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -45,6 +47,7 @@ module ChefUtils # Determine if the current node is running in a linux container. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -55,6 +58,7 @@ module ChefUtils # Determine if the current node is a linux container host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -65,6 +69,7 @@ module ChefUtils # Determine if the current node is running under Parallels Desktop. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # true if the machine is currently running under Parallels Desktop, false @@ -77,6 +82,7 @@ module ChefUtils # Determine if the current node is a Parallels Desktop host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # true if the machine is currently running under Parallels Desktop, false @@ -89,6 +95,7 @@ module ChefUtils # Determine if the current node is a VirtualBox guest. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -99,6 +106,7 @@ module ChefUtils # Determine if the current node is a VirtualBox host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -106,11 +114,13 @@ module ChefUtils node.dig("virtualization", "system") == "vbox" && node.dig("virtualization", "role") == "host" end + # chef-sugar backcompat method alias_method :virtualbox?, :vbox? # Determine if the current node is a VMWare guest. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -121,6 +131,7 @@ module ChefUtils # Determine if the current node is VMware host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -131,6 +142,7 @@ module ChefUtils # Determine if the current node is an openvz guest. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -141,6 +153,7 @@ module ChefUtils # Determine if the current node is an openvz host. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -151,6 +164,7 @@ module ChefUtils # Determine if the current node is running under any virutalization environment # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -158,11 +172,13 @@ module ChefUtils node.dig("virtualization", "role") == "guest" end + # chef-sugar backcompat method alias_method :virtual?, :guest? # Determine if the current node supports running guests under any virtualization environment # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -173,6 +189,7 @@ module ChefUtils # Determine if the current node is NOT running under any virtualization environment (plain metal or hypervisor on metal) # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # @@ -186,6 +203,7 @@ module ChefUtils # vagrantup.com domain in the hostname, which is the best API we have. # # @param [Chef::Node] node + # @since 15.8 # # @return [Boolean] # true if the machine is currently running vagrant, false |