ohai 16.2.1 → 16.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/bin/ohai +0 -2
- data/lib/ohai/application.rb +2 -2
- data/lib/ohai/dsl/plugin.rb +1 -1
- data/lib/ohai/loader.rb +1 -2
- data/lib/ohai/log.rb +1 -1
- data/lib/ohai/mixin/command.rb +1 -1
- data/lib/ohai/mixin/dmi_decode.rb +2 -2
- data/lib/ohai/mixin/os.rb +1 -1
- data/lib/ohai/mixin/softlayer_metadata.rb +1 -1
- data/lib/ohai/plugins/aix/memory.rb +3 -3
- data/lib/ohai/plugins/aix/network.rb +2 -1
- data/lib/ohai/plugins/aix/uptime.rb +2 -2
- data/lib/ohai/plugins/aix/virtualization.rb +5 -5
- data/lib/ohai/plugins/azure.rb +1 -1
- data/lib/ohai/plugins/bsd/virtualization.rb +2 -2
- data/lib/ohai/plugins/c.rb +2 -2
- data/lib/ohai/plugins/cloud.rb +1 -1
- data/lib/ohai/plugins/cpu.rb +2 -2
- data/lib/ohai/plugins/darwin/network.rb +3 -3
- data/lib/ohai/plugins/darwin/virtualization.rb +1 -1
- data/lib/ohai/plugins/docker.rb +2 -2
- data/lib/ohai/plugins/dragonflybsd/platform.rb +2 -4
- data/lib/ohai/plugins/ec2.rb +8 -7
- data/lib/ohai/plugins/eucalyptus.rb +1 -1
- data/lib/ohai/plugins/filesystem.rb +11 -17
- data/lib/ohai/plugins/fips.rb +1 -5
- data/lib/ohai/plugins/freebsd/platform.rb +2 -4
- data/lib/ohai/plugins/gce.rb +3 -3
- data/lib/ohai/plugins/hostname.rb +16 -16
- data/lib/ohai/plugins/kernel.rb +1 -1
- data/lib/ohai/plugins/linux/hostnamectl.rb +1 -2
- data/lib/ohai/plugins/linux/interrupts.rb +1 -1
- data/lib/ohai/plugins/linux/lsb.rb +1 -2
- data/lib/ohai/plugins/linux/lspci.rb +1 -2
- data/lib/ohai/plugins/linux/machineid.rb +2 -2
- data/lib/ohai/plugins/linux/mdadm.rb +1 -1
- data/lib/ohai/plugins/linux/network.rb +19 -9
- data/lib/ohai/plugins/linux/platform.rb +22 -25
- data/lib/ohai/plugins/linux/virtualization.rb +12 -9
- data/lib/ohai/plugins/netbsd/network.rb +4 -8
- data/lib/ohai/plugins/netbsd/platform.rb +2 -4
- data/lib/ohai/plugins/network.rb +5 -4
- data/lib/ohai/plugins/openbsd/network.rb +4 -8
- data/lib/ohai/plugins/openbsd/platform.rb +2 -4
- data/lib/ohai/plugins/openstack.rb +3 -2
- data/lib/ohai/plugins/packages.rb +1 -1
- data/lib/ohai/plugins/passwd.rb +2 -1
- data/lib/ohai/plugins/rackspace.rb +5 -4
- data/lib/ohai/plugins/root_group.rb +1 -1
- data/lib/ohai/plugins/ruby.rb +4 -15
- data/lib/ohai/plugins/scaleway.rb +1 -1
- data/lib/ohai/plugins/shard.rb +1 -1
- data/lib/ohai/plugins/solaris2/dmi.rb +2 -3
- data/lib/ohai/plugins/solaris2/memory.rb +1 -2
- data/lib/ohai/plugins/solaris2/network.rb +2 -6
- data/lib/ohai/plugins/solaris2/platform.rb +1 -2
- data/lib/ohai/plugins/solaris2/virtualization.rb +3 -6
- data/lib/ohai/plugins/ssh_host_key.rb +1 -1
- data/lib/ohai/plugins/uptime.rb +1 -1
- data/lib/ohai/plugins/vmware.rb +2 -2
- data/lib/ohai/plugins/windows/dmi.rb +2 -2
- data/lib/ohai/plugins/windows/drivers.rb +1 -1
- data/lib/ohai/plugins/windows/memory.rb +1 -1
- data/lib/ohai/plugins/windows/network.rb +4 -4
- data/lib/ohai/plugins/windows/platform.rb +1 -1
- data/lib/ohai/plugins/windows/virtualization.rb +1 -1
- data/lib/ohai/provides_map.rb +2 -2
- data/lib/ohai/runner.rb +1 -1
- data/lib/ohai/util/ip_helper.rb +2 -2
- data/lib/ohai/util/win32.rb +1 -1
- data/lib/ohai/version.rb +1 -1
- data/ohai.gemspec +0 -1
- metadata +2 -16
@@ -45,8 +45,8 @@ Ohai.plugin(:DMI) do
|
|
45
45
|
].freeze
|
46
46
|
|
47
47
|
collect_data(:windows) do
|
48
|
-
|
49
|
-
require "wmi-lite/wmi"
|
48
|
+
require_relative "../../common/dmi"
|
49
|
+
require "wmi-lite/wmi" unless defined?(WmiLite::Wmi)
|
50
50
|
wmi = WmiLite::Wmi.new
|
51
51
|
|
52
52
|
dmi Mash.new
|
@@ -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
|
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>}]
|
@@ -117,8 +117,8 @@ Ohai.plugin(:Network) do
|
|
117
117
|
end
|
118
118
|
|
119
119
|
collect_data(:windows) do
|
120
|
-
|
121
|
-
require "wmi-lite/wmi"
|
120
|
+
require "ipaddress" unless defined?(IPAddress)
|
121
|
+
require "wmi-lite/wmi" unless defined?(WmiLite::Wmi)
|
122
122
|
|
123
123
|
iface = Mash.new
|
124
124
|
iface_config = Mash.new
|
@@ -171,7 +171,7 @@ Ohai.plugin(:Network) do
|
|
171
171
|
iface[cint][:addresses][ip] = Mash.new(prefixlen: ip2.prefix)
|
172
172
|
if ip2.ipv6?
|
173
173
|
iface[cint][:addresses][ip][:family] = "inet6"
|
174
|
-
iface[cint][:addresses][ip][:scope] = "Link" if
|
174
|
+
iface[cint][:addresses][ip][:scope] = "Link" if /^fe80/i.match?(ip)
|
175
175
|
else
|
176
176
|
if iface[cint][:configuration][:ip_subnet]
|
177
177
|
iface[cint][:addresses][ip][:netmask] = ip2.netmask.to_s
|
@@ -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
|
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
|
@@ -24,7 +24,7 @@ Ohai.plugin(:Virtualization) do
|
|
24
24
|
include Ohai::Mixin::DmiDecode
|
25
25
|
|
26
26
|
collect_data(:windows) do
|
27
|
-
require "wmi-lite/wmi"
|
27
|
+
require "wmi-lite/wmi" unless defined?(WmiLite::Wmi)
|
28
28
|
|
29
29
|
virtualization Mash.new unless virtualization
|
30
30
|
virtualization[:systems] ||= Mash.new
|
data/lib/ohai/provides_map.rb
CHANGED
@@ -136,8 +136,8 @@ module Ohai
|
|
136
136
|
private
|
137
137
|
|
138
138
|
def normalize_and_validate(attribute)
|
139
|
-
raise Ohai::Exceptions::AttributeSyntaxError, "Attribute contains duplicate '/' characters: #{attribute}" if
|
140
|
-
raise Ohai::Exceptions::AttributeSyntaxError, "Attribute contains a trailing '/': #{attribute}" if
|
139
|
+
raise Ohai::Exceptions::AttributeSyntaxError, "Attribute contains duplicate '/' characters: #{attribute}" if %r{//+}.match?(attribute)
|
140
|
+
raise Ohai::Exceptions::AttributeSyntaxError, "Attribute contains a trailing '/': #{attribute}" if %r{/$}.match?(attribute)
|
141
141
|
|
142
142
|
parts = attribute.split("/")
|
143
143
|
parts.shift if parts.length != 0 && parts[0].length == 0 # attribute begins with a '/'
|
data/lib/ohai/runner.rb
CHANGED
data/lib/ohai/util/ip_helper.rb
CHANGED
@@ -14,11 +14,11 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
require "ipaddress"
|
18
|
-
|
19
17
|
module Ohai
|
20
18
|
module Util
|
21
19
|
module IpHelper
|
20
|
+
require "ipaddress" unless defined?(IPAddress)
|
21
|
+
|
22
22
|
# Corresponding to RFC 4192 + RFC 4193
|
23
23
|
IPV6_LINK_LOCAL_UNICAST_BLOCK = IPAddress("fe80::/10")
|
24
24
|
IPV6_PRIVATE_ADDRESS_BLOCK = IPAddress("fc00::/7")
|
data/lib/ohai/util/win32.rb
CHANGED
data/lib/ohai/version.rb
CHANGED
data/ohai.gemspec
CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.required_ruby_version = ">= 2.5"
|
16
16
|
|
17
|
-
s.add_dependency "systemu", "~> 2.6.4"
|
18
17
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
19
18
|
s.add_dependency "mixlib-cli", ">= 1.7.0" # 1.7+ needed to support passing multiple options
|
20
19
|
s.add_dependency "mixlib-config", ">= 2.0", "< 4.0"
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.
|
4
|
+
version: 16.4.12
|
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-
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: systemu
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 2.6.4
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 2.6.4
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: ffi-yajl
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|