diff options
author | Adam Edwards <adamed@opscode.com> | 2014-08-08 13:55:41 -0700 |
---|---|---|
committer | Jay Mundrawala <jdmundrawala@gmail.com> | 2014-09-19 12:47:29 -0700 |
commit | cb503c72ea1e07f670d5c20830463e3469283298 (patch) | |
tree | ead922e0111d215391a2cefc2697c3f2d0c39931 /spec/support/platform_helpers.rb | |
parent | 5534b5d0f781188e0398d5b1ade7ceba568e4b45 (diff) | |
download | chef-cb503c72ea1e07f670d5c20830463e3469283298.tar.gz |
Initial dsc_configuration resource implementation
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r-- | spec/support/platform_helpers.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb index a7c616d7a7..984bd12e8a 100644 --- a/spec/support/platform_helpers.rb +++ b/spec/support/platform_helpers.rb @@ -52,6 +52,18 @@ def windows_win2k3? (host['version'] && host['version'].start_with?("5.2")) end +def windows_2008r2_or_later? + return false unless windows? + wmi = WmiLite::Wmi.new + host = wmi.first_of('Win32_OperatingSystem') + version = host['version'] + return false unless version + components = version.split('.').map do | component | + component.to_i + end + components.length >=2 && components[0] >= 6 && components[1] >= 1 +end + def mac_osx_106? if File.exists? "/usr/bin/sw_vers" result = shell_out("/usr/bin/sw_vers") |