summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-06-17 10:51:35 -0700
committerGitHub <noreply@github.com>2020-06-17 10:51:35 -0700
commit9174496daf80c518a5d6c01c334671cd5c6390d6 (patch)
treec0bf29fa83608599efe1850f95f03860c57d92d0
parentc01c03fba0834bcebb7f90c9c27dd720ab8b4a58 (diff)
parent09946ce4a07459765dfb00608bfc260ea5934fa0 (diff)
downloadohai-9174496daf80c518a5d6c01c334671cd5c6390d6.tar.gz
Merge pull request #1468 from chef/blocklist
Remove an internal reference to blacklist
-rw-r--r--Gemfile2
-rw-r--r--lib/ohai/plugins/kernel.rb15
2 files changed, 9 insertions, 8 deletions
diff --git a/Gemfile b/Gemfile
index 2eceb4d4..61650f8c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,6 +22,6 @@ end
group :debug do
gem "pry"
gem "pry-byebug"
- gem "pry-stack_explorer"
+ gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6
gem "rb-readline"
end
diff --git a/lib/ohai/plugins/kernel.rb b/lib/ohai/plugins/kernel.rb
index 7a1e85e7..7dc273fa 100644
--- a/lib/ohai/plugins/kernel.rb
+++ b/lib/ohai/plugins/kernel.rb
@@ -4,7 +4,7 @@
# Author:: Bryan McLellan (<btm@loftninjas.org>)
# Author:: Claire McQuin (<claire@chef.io>)
# Author:: James Gartrell (<jgartrel@gmail.com>)
-# 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 @@ Ohai.plugin(:Kernel) do
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 @@ Ohai.plugin(:Kernel) do
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 @@ Ohai.plugin(:Kernel) do
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