Chef/Deprecations/WindowsVersionHelpers
The Cookstyle cops department: Chef/Deprecations
Enabled by default | Supports autocorrection | Target Chef Version |
---|---|---|
Enabled | Yes | 14.0+ |
Use node[‘platform_version’] and node[‘kernel’] data instead of the deprecated Windows::VersionHelper helpers from the Windows cookbook.
Examples
incorrect
Windows::VersionHelper.nt_version
Windows::VersionHelper.server_version?
Windows::VersionHelper.core_version?
Windows::VersionHelper.workstation_version?
correct
node['platform_version'].to_f
node['kernel']['product_type'] == 'Server'
node['kernel']['server_core']
node['kernel']['product_type'] == 'Workstation'
Configurable attributes
Name | Default value | Configurable values |
---|---|---|
Version Added | 5.4.0 | String |
Include | Array |