-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1468 from chef/blocklist
Remove an internal reference to blacklist
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# Author:: Bryan McLellan (<[email protected]>) | ||
# Author:: Claire McQuin (<[email protected]>) | ||
# Author:: James Gartrell (<[email protected]>) | ||
# Copyright:: Copyright (c) 2008-2018 Chef Software, Inc. | ||
# Copyright:: Copyright (c) Chef Software, Inc. | ||
# Copyright:: Copyright (c) 2009 Bryan McLellan | ||
# License:: Apache License, Version 2.0 | ||
# | ||
|
@@ -137,11 +137,12 @@ def pc_system_type_decode(type) | |
end | ||
end | ||
|
||
# see if a WMI name is blacklisted so we can avoid writing out | ||
# useless data to ohai | ||
# see if a WMI name is in the blocked list so we can avoid writing | ||
# out useless data to ohai | ||
# | ||
# @param [String] name the wmi name to check | ||
# @return [Boolean] is the wmi name blacklisted | ||
def blacklisted_wmi_name?(name) | ||
# @return [Boolean] is the wmi name in the blocked list | ||
def blocked_wmi_name?(name) | ||
[ | ||
"creation_class_name", # this is just the wmi name | ||
"cs_creation_class_name", # this is just the wmi name | ||
|
@@ -262,7 +263,7 @@ def blacklisted_wmi_name?(name) | |
host = wmi.first_of("Win32_OperatingSystem") | ||
kernel[:os_info] = Mash.new | ||
host.wmi_ole_object.properties_.each do |p| | ||
next if blacklisted_wmi_name?(p.name.wmi_underscore) | ||
next if blocked_wmi_name?(p.name.wmi_underscore) | ||
|
||
kernel[:os_info][p.name.wmi_underscore.to_sym] = host[p.name.downcase] | ||
end | ||
|
@@ -277,7 +278,7 @@ def blacklisted_wmi_name?(name) | |
kernel[:cs_info] = Mash.new | ||
host = wmi.first_of("Win32_ComputerSystem") | ||
host.wmi_ole_object.properties_.each do |p| | ||
next if blacklisted_wmi_name?(p.name.wmi_underscore) | ||
next if blocked_wmi_name?(p.name.wmi_underscore) | ||
|
||
kernel[:cs_info][p.name.wmi_underscore.to_sym] = host[p.name.downcase] | ||
end | ||
|