lib/ohai/plugins/kernel.rb in ohai-15.9.1 vs lib/ohai/plugins/kernel.rb in ohai-15.12.0

- old
+ new

@@ -2,11 +2,11 @@ # Author:: Adam Jacob (<adam@chef.io>) # Author:: Benjamin Black (<nostromo@gmail.com>) # 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 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -135,15 +135,16 @@ when 8 then "Maximum" else nil 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 "oem_logo_bitmap", # this is the entire OEM bitmap file "total_swap_space_size", # already in memory plugin @@ -260,11 +261,11 @@ kernel Mash.new 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 kernel[:name] = (kernel[:os_info][:caption]).to_s @@ -275,10 +276,10 @@ kernel[:server_core] = server_core?(kernel[:os_info][:operating_system_sku]) 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 kernel[:machine] = arch_lookup((kernel[:cs_info][:system_type]).to_s)