lib/chef/sugar/virtualization.rb in chef-sugar-3.1.1 vs lib/chef/sugar/virtualization.rb in chef-sugar-3.2.0
- old
+ new
@@ -68,10 +68,23 @@
# otherwise
#
def vmware?(node)
node.key?('virtualization') && node['virtualization']['system'] == 'vmware'
end
+
+ #
+ # Determine if the current node is running under openvz.
+ #
+ # @param [Chef::Node] node
+ #
+ # @return [Boolean]
+ # true if the machine is currently running under openvz, false
+ # otherwise
+ #
+ def openvz?(node)
+ node.key?('virtualization') && node['virtualization']['system'] == 'openvz'
+ end
end
module DSL
# @see Chef::Sugar::Virtualization#kvm?
def kvm?; Chef::Sugar::Virtualization.kvm?(node); end
@@ -82,8 +95,11 @@
# @see Chef::Sugar::Virtualization#virtualbox?
def virtualbox?; Chef::Sugar::Virtualization.virtualbox?(node); end
# @see Chef::Sugar::Virtualization#vmware?
def vmware?; Chef::Sugar::Virtualization.vmware?(node); end
+
+ # @see Chef::Sugar::Virtualization#openvz?
+ def openvz?; Chef::Sugar::Virtualization.openvz?(node); end
end
end
end