ohai 16.3.0 → 16.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b791ee540d095a6bbdca2f681a5b2dbbe8574f2b58e5ba9c274fdaccc210c86f
4
- data.tar.gz: db0fc191334ce76a8c0effc4a66afd1c9f025125e10186feb0f3ebf03dbb1768
3
+ metadata.gz: 7be1477adf0e463ac6149e5e3bb02ea983b8ea39197a84baf414472071b9f829
4
+ data.tar.gz: a928b3b5b11a6230bed0a235cd06210c1d98c1c08f347d85390270d02123cdd5
5
5
  SHA512:
6
- metadata.gz: 9b5f2dfbe7e517ef9f0bb6fa334bb66e8b6623356fabe0211aa895e416a50fbb6b97d39cfc422cc7727d2d943aa3aa8ff4e3f5fe71877f702212b55a83484115
7
- data.tar.gz: d1a23eb7a0cc5aa5619edb4568ae2e4f0e930d4356ecea2356a789c8c37b49ea0660d9c39b11bddb577f78871dc0c383e2af2bb03c8eac6120fe680e89797622
6
+ metadata.gz: 4033840091985804ad19aab09e79c516e2811149f4165d3b904cb497743e552757bf32b0d32f574c2451866f8267bf451c12f8f993677b509c7ab71d0446c9dd
7
+ data.tar.gz: 4b889129b7d4838410f936182615ef4b071ca4edd53fbfd8a374a349f39d6a2e6e842499167fd39aa5ae38b5bd7ebf2d64d25b6564c5fbf8dbbc4b16b40d91c3
data/bin/ohai CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  #
3
- # ./ohai - I'm in ur serverz, showin you the daters
4
- #
5
3
  # Author:: Adam Jacob (<adam@chef.io>)
6
4
  # Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
7
5
  # License:: Apache License, Version 2.0
@@ -40,7 +40,7 @@ module ::Ohai::Mixin::DmiDecode
40
40
  case product
41
41
  when /VirtualBox/
42
42
  return "vbox"
43
- when /OpenStack/ # yes this is here twice. Product catches Redhat's version
43
+ when /OpenStack/ # yes this is here twice. Product catches Red Hat's version
44
44
  return "openstack"
45
45
  when /(KVM|RHEV)/
46
46
  return "kvm"
@@ -29,8 +29,8 @@ Ohai.plugin(:Memory) do
29
29
  memory[:total] = "#{total_in_mb.to_i * 1024}kB"
30
30
  memory[:free] = "#{free_in_mb.to_i * 1024}kB"
31
31
 
32
- swapinfo = shell_out("swap -s").stdout.split # returns swap info in 4K blocks
33
- memory[:swap]["total"] = "#{(swapinfo[2].to_i) * 4}kB"
34
- memory[:swap]["free"] = "#{(swapinfo[10].to_i) * 4}kB"
32
+ swap_info = shell_out("swap -s").stdout.split # returns swap info in 4K blocks
33
+ memory[:swap]["total"] = "#{(swap_info[2].to_i) * 4}kB"
34
+ memory[:swap]["free"] = "#{(swap_info[10].to_i) * 4}kB"
35
35
  end
36
36
  end
@@ -137,7 +137,7 @@ Ohai.plugin(:C) do
137
137
  logger.trace("Plugin C: 'xlc' binary could not be found. Skipping data.")
138
138
  end
139
139
 
140
- def collect_sunpro
140
+ def collect_sun_pro
141
141
  # sun pro
142
142
  collect("cc -V -flags") do |so|
143
143
  output = so.stderr.split
@@ -173,7 +173,7 @@ Ohai.plugin(:C) do
173
173
  @c = Mash.new
174
174
  collect_gcc
175
175
  collect_glibc
176
- collect_sunpro
176
+ collect_sun_pro
177
177
  languages[:c] = @c unless @c.empty?
178
178
  end
179
179
  end
@@ -590,16 +590,16 @@ Ohai.plugin(:Filesystem) do
590
590
  end
591
591
  end
592
592
 
593
- zfs.each do |fsname, attributes|
593
+ zfs.each do |fs_name, attributes|
594
594
  mountpoint = attributes[:mountpoint][:value] if attributes[:mountpoint]
595
- key = "#{fsname},#{mountpoint}"
595
+ key = "#{fs_name},#{mountpoint}"
596
596
  fs[key] ||= Mash.new
597
597
  fs[key][:fs_type] = "zfs"
598
598
  fs[key][:mount] = mountpoint if mountpoint
599
- fs[key][:device] = fsname
599
+ fs[key][:device] = fs_name
600
600
  fs[key][:zfs_properties] = attributes
601
601
  # find all zfs parents
602
- parents = fsname.split("/")
602
+ parents = fs_name.split("/")
603
603
  zfs_parents = []
604
604
  (0..parents.length - 1).to_a.each do |parent_index|
605
605
  next_parent = parents[0..parent_index].join("/")
@@ -99,19 +99,19 @@ Ohai.plugin(:Hostname) do
99
99
  hostname from_cmd("hostname -s")
100
100
  machinename from_cmd("hostname")
101
101
  begin
102
- ourfqdn = resolve_fqdn
102
+ our_fqdn = resolve_fqdn
103
103
  # Sometimes... very rarely, but sometimes, 'hostname --fqdn' falsely
104
104
  # returns a blank string. WTF.
105
- if ourfqdn.nil? || ourfqdn.empty?
105
+ if our_fqdn.nil? || our_fqdn.empty?
106
106
  logger.trace("Plugin Hostname: hostname returned an empty string, retrying once.")
107
- ourfqdn = resolve_fqdn
107
+ our_fqdn = resolve_fqdn
108
108
  end
109
109
 
110
- if ourfqdn.nil? || ourfqdn.empty?
110
+ if our_fqdn.nil? || our_fqdn.empty?
111
111
  logger.trace("Plugin Hostname: hostname returned an empty string twice and will" +
112
112
  "not be set.")
113
113
  else
114
- fqdn ourfqdn
114
+ fqdn our_fqdn
115
115
  end
116
116
  rescue
117
117
  logger.trace(
@@ -132,20 +132,20 @@ Ohai.plugin(:Hostname) do
132
132
  hostname from_cmd("hostname -s")
133
133
  machinename from_cmd("hostname")
134
134
  begin
135
- ourfqdn = from_cmd("hostname --fqdn")
135
+ our_fqdn = from_cmd("hostname --fqdn")
136
136
  # Sometimes... very rarely, but sometimes, 'hostname --fqdn' falsely
137
137
  # returns a blank string. WTF.
138
- if ourfqdn.nil? || ourfqdn.empty?
138
+ if our_fqdn.nil? || our_fqdn.empty?
139
139
  logger.trace("Plugin Hostname: hostname --fqdn returned an empty string, retrying " +
140
140
  "once.")
141
- ourfqdn = from_cmd("hostname --fqdn")
141
+ our_fqdn = from_cmd("hostname --fqdn")
142
142
  end
143
143
 
144
- if ourfqdn.nil? || ourfqdn.empty?
144
+ if our_fqdn.nil? || our_fqdn.empty?
145
145
  logger.trace("Plugin Hostname: hostname --fqdn returned an empty string twice and " +
146
146
  "will not be set.")
147
147
  else
148
- fqdn ourfqdn
148
+ fqdn our_fqdn
149
149
  end
150
150
  rescue
151
151
  logger.trace("Plugin Hostname: hostname --fqdn returned an error, probably no domain set")
@@ -56,7 +56,7 @@ Ohai.plugin(:VMware) do
56
56
  end
57
57
  end
58
58
  # vmware-toolbox-cmd <param> status commands
59
- # Iterate through each parameter supported by the "vwware-toolbox-cmd status" command, assign value
59
+ # Iterate through each parameter supported by the "vmware-toolbox-cmd status" command, assign value
60
60
  # to attribute "vmware[:<parameter>]"
61
61
  %w{upgrade timesync}.each do |param|
62
62
  vmware[param] = from_cmd("#{vmtools_path} #{param} status")
@@ -93,7 +93,7 @@ Ohai.plugin(:Network) do
93
93
 
94
94
  # Selects default interface and returns its information
95
95
  #
96
- # @note Interface with least metric value should be prefered as default_route
96
+ # @note Interface with least metric value should be preferred as default_route
97
97
  #
98
98
  # @param configuration [Mash] Configuration of interfaces as iface_config
99
99
  # [<interface_index> => {<interface_configurations>}]
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- # After long discussion in IRC the "powers that be" have come to a concensus
19
+ # After long discussion in IRC the "powers that be" have come to a consensus
20
20
  # that there is no other Windows platforms exist that were not based on the
21
21
  # Windows_NT kernel, so we herby decree that "windows" will refer to all
22
22
  # platforms built upon the Windows_NT kernel and have access to win32 or win64
@@ -18,5 +18,5 @@
18
18
 
19
19
  module Ohai
20
20
  OHAI_ROOT = File.expand_path(File.dirname(__FILE__))
21
- VERSION = "16.3.0".freeze
21
+ VERSION = "16.3.2".freeze
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohai
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.3.0
4
+ version: 16.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-24 00:00:00.000000000 Z
11
+ date: 2020-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: systemu