ohai 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +15 -6
- data/lib/ohai/common/dmi.rb +11 -13
- data/lib/ohai/dsl/plugin.rb +6 -8
- data/lib/ohai/dsl/plugin/versionvi.rb +1 -1
- data/lib/ohai/dsl/plugin/versionvii.rb +4 -4
- data/lib/ohai/mash.rb +1 -1
- data/lib/ohai/mixin/command.rb +3 -3
- data/lib/ohai/mixin/dmi_decode.rb +1 -1
- data/lib/ohai/mixin/ec2_metadata.rb +10 -10
- data/lib/ohai/mixin/os.rb +11 -11
- data/lib/ohai/mixin/softlayer_metadata.rb +2 -2
- data/lib/ohai/mixin/string.rb +1 -1
- data/lib/ohai/plugins/azure.rb +2 -2
- data/lib/ohai/plugins/c.rb +9 -10
- data/lib/ohai/plugins/darwin/cpu.rb +24 -20
- data/lib/ohai/plugins/darwin/hardware.rb +15 -9
- data/lib/ohai/plugins/digital_ocean.rb +2 -2
- data/lib/ohai/plugins/ec2.rb +5 -5
- data/lib/ohai/plugins/elixir.rb +1 -1
- data/lib/ohai/plugins/erlang.rb +2 -2
- data/lib/ohai/plugins/eucalyptus.rb +2 -2
- data/lib/ohai/plugins/go.rb +1 -1
- data/lib/ohai/plugins/hostname.rb +7 -10
- data/lib/ohai/plugins/ip_scopes.rb +2 -0
- data/lib/ohai/plugins/java.rb +19 -21
- data/lib/ohai/plugins/kernel.rb +1 -1
- data/lib/ohai/plugins/linux/cpu.rb +4 -0
- data/lib/ohai/plugins/linux/filesystem.rb +43 -30
- data/lib/ohai/plugins/linux/lsb.rb +1 -1
- data/lib/ohai/plugins/linux/mdadm.rb +9 -1
- data/lib/ohai/plugins/linux/network.rb +8 -12
- data/lib/ohai/plugins/linux/platform.rb +9 -1
- data/lib/ohai/plugins/linux/systemd_paths.rb +39 -0
- data/lib/ohai/plugins/mono.rb +1 -1
- data/lib/ohai/plugins/nodejs.rb +1 -1
- data/lib/ohai/plugins/openstack.rb +5 -5
- data/lib/ohai/plugins/packages.rb +8 -2
- data/lib/ohai/plugins/perl.rb +1 -1
- data/lib/ohai/plugins/php.rb +1 -1
- data/lib/ohai/plugins/powershell.rb +1 -1
- data/lib/ohai/plugins/python.rb +1 -1
- data/lib/ohai/plugins/rackspace.rb +4 -4
- data/lib/ohai/plugins/rust.rb +1 -1
- data/lib/ohai/plugins/solaris2/dmi.rb +3 -3
- data/lib/ohai/plugins/solaris2/network.rb +2 -2
- data/lib/ohai/plugins/ssh_host_key.rb +1 -1
- data/lib/ohai/plugins/uptime.rb +1 -1
- data/lib/ohai/plugins/{solaris2/zpools.rb → zpools.rb} +39 -16
- data/lib/ohai/util/file_helper.rb +2 -2
- data/lib/ohai/version.rb +1 -1
- data/spec/data/plugins/lslpp.output +1 -0
- data/spec/unit/plugins/darwin/cpu_spec.rb +66 -19
- data/spec/unit/plugins/darwin/hardware_spec.rb +2 -14
- data/spec/unit/plugins/linux/cpu_spec.rb +47 -0
- data/spec/unit/plugins/linux/filesystem_spec.rb +99 -9
- data/spec/unit/plugins/linux/mdadm_spec.rb +26 -1
- data/spec/unit/plugins/linux/network_spec.rb +8 -26
- data/spec/unit/plugins/linux/platform_spec.rb +41 -0
- data/spec/unit/plugins/linux/systemd_paths_spec.rb +122 -0
- data/spec/unit/plugins/packages_spec.rb +4 -0
- data/spec/unit/plugins/rackspace_spec.rb +3 -3
- data/spec/unit/plugins/zpools_spec.rb +242 -0
- metadata +7 -5
- data/spec/unit/plugins/solaris2/zpools_spec.rb +0 -153
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c77bbdaf5110dc3837d208227d35171c3abd7d7
|
4
|
+
data.tar.gz: 2781b142b0bf7b9201edbbb01b82d005f0703165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b0e442fe9e3506dac3b41c9f2cd239c04f649581df61f4302fe510e898f5dd4fff1ec8741704c0075025f3f76d98f5af55fb6beb8e5abd899803ffda6c014f2
|
7
|
+
data.tar.gz: e18343490101bc00c3f385b13d875f56c12c4724a404a2b1a30d863975fac898ce193330f600ef8d9a652eb7bff3a97df367ad2137fd73f914dcbaef3e2cff08
|
data/Gemfile
CHANGED
@@ -2,18 +2,27 @@ source "https://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
+
# NOTE: do not submit PRs to add pry as a dep, add to your Gemfile.local
|
5
6
|
group :development do
|
6
7
|
gem "chefstyle"
|
7
|
-
gem "
|
8
|
-
gem "pry-byebug"
|
9
|
-
gem "pry-stack_explorer"
|
10
|
-
gem "rb-readline"
|
11
|
-
gem "rake", ">= 10.1.0", "< 12.0.0"
|
8
|
+
gem "rake", ">= 10.1.0"
|
12
9
|
gem "rspec-core", "~> 3.0"
|
13
10
|
gem "rspec-expectations", "~> 3.0"
|
14
11
|
gem "rspec-mocks", "~> 3.0"
|
15
12
|
gem "rspec-collection_matchers", "~> 1.0"
|
13
|
+
gem "ipaddr_extensions"
|
14
|
+
end
|
15
|
+
|
16
|
+
group :ci do
|
16
17
|
gem "rspec_junit_formatter"
|
18
|
+
end
|
19
|
+
|
20
|
+
group :changelog do
|
17
21
|
gem "github_changelog_generator", git: "https://github.com/chef/github-changelog-generator"
|
18
|
-
gem "ipaddr_extensions"
|
19
22
|
end
|
23
|
+
|
24
|
+
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
25
|
+
|
26
|
+
# If you want to load debugging tools into the bundle exec sandbox,
|
27
|
+
# add these additional dependencies into Gemfile.local
|
28
|
+
eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
|
data/lib/ohai/common/dmi.rb
CHANGED
@@ -78,20 +78,18 @@ module Ohai
|
|
78
78
|
|
79
79
|
# look up DMI ID
|
80
80
|
def id_lookup(id)
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
id = "unknown"
|
90
|
-
end
|
91
|
-
rescue
|
92
|
-
Ohai::Log.debug("failed to look up id #{id}, returning unchanged")
|
93
|
-
id
|
81
|
+
id = id.to_i
|
82
|
+
if (id >= 128) && (id <= 255)
|
83
|
+
id = "oem_data_#{id}"
|
84
|
+
elsif DMI::ID_TO_DESCRIPTION.has_key?(id)
|
85
|
+
id = DMI::ID_TO_DESCRIPTION[id]
|
86
|
+
else
|
87
|
+
Ohai::Log.debug("unrecognized header id; falling back to 'unknown'")
|
88
|
+
id = "unknown"
|
94
89
|
end
|
90
|
+
rescue
|
91
|
+
Ohai::Log.debug("failed to look up id #{id}, returning unchanged")
|
92
|
+
id
|
95
93
|
end
|
96
94
|
|
97
95
|
# create simplified convenience access keys for each record type
|
data/lib/ohai/dsl/plugin.rb
CHANGED
@@ -180,14 +180,12 @@ module Ohai
|
|
180
180
|
|
181
181
|
# emulates the old plugin loading behavior
|
182
182
|
def safe_run
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
e.backtrace.each { |line| Ohai::Log.debug( line ) }
|
190
|
-
end
|
183
|
+
run
|
184
|
+
rescue Ohai::Exceptions::Error => e
|
185
|
+
raise e
|
186
|
+
rescue => e
|
187
|
+
Ohai::Log.debug("Plugin #{name} threw #{e.inspect}")
|
188
|
+
e.backtrace.each { |line| Ohai::Log.debug( line ) }
|
191
189
|
end
|
192
190
|
|
193
191
|
def method_missing(name, *args)
|
@@ -85,11 +85,11 @@ module Ohai
|
|
85
85
|
platform = collect_os
|
86
86
|
|
87
87
|
if collector.has_key?(platform)
|
88
|
-
|
88
|
+
instance_eval(&collector[platform])
|
89
89
|
elsif collector.has_key?(:default)
|
90
|
-
|
90
|
+
instance_eval(&collector[:default])
|
91
91
|
else
|
92
|
-
Ohai::Log.debug("Plugin #{
|
92
|
+
Ohai::Log.debug("Plugin #{name}: No data to collect. Skipping...")
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
@@ -122,7 +122,7 @@ module Ohai
|
|
122
122
|
# Memory => ["", "Memory"]
|
123
123
|
# NetworkListeners => ["", "Network", "", "Listeners"]
|
124
124
|
# SSHHostKey => ["SSH", "Host", "", "Key"]
|
125
|
-
parts =
|
125
|
+
parts = name.to_s.split(/([A-Z][a-z]+)/)
|
126
126
|
# ["DMI"] => ["DMI"]
|
127
127
|
# ["", "Memory"] => ["Memory"]
|
128
128
|
# ["", "Network", "", "Listeners"] => ["Network", "Listeners"]
|
data/lib/ohai/mash.rb
CHANGED
data/lib/ohai/mixin/command.rb
CHANGED
@@ -37,13 +37,13 @@ module Ohai
|
|
37
37
|
so = Mixlib::ShellOut.new(cmd, options)
|
38
38
|
begin
|
39
39
|
so.run_command
|
40
|
-
Ohai::Log.debug("Plugin #{
|
40
|
+
Ohai::Log.debug("Plugin #{name}: ran '#{cmd}' and returned #{so.exitstatus}")
|
41
41
|
so
|
42
42
|
rescue Errno::ENOENT => e
|
43
|
-
Ohai::Log.debug("Plugin #{
|
43
|
+
Ohai::Log.debug("Plugin #{name}: ran '#{cmd}' and failed #{e.inspect}")
|
44
44
|
raise Ohai::Exceptions::Exec, e
|
45
45
|
rescue Mixlib::ShellOut::CommandTimeout => e
|
46
|
-
Ohai::Log.debug("Plugin #{
|
46
|
+
Ohai::Log.debug("Plugin #{name}: ran '#{cmd}' and timed out after #{options[:timeout]} seconds")
|
47
47
|
raise Ohai::Exceptions::Exec, e
|
48
48
|
end
|
49
49
|
end
|
@@ -49,24 +49,24 @@ module Ohai
|
|
49
49
|
|
50
50
|
def best_api_version
|
51
51
|
@api_version ||= begin
|
52
|
-
Ohai::Log.debug("
|
52
|
+
Ohai::Log.debug("Mixin EC2: Fetching http://#{EC2_METADATA_ADDR}/ to determine the latest supported metadata release")
|
53
53
|
response = http_client.get("/")
|
54
54
|
if response.code == "404"
|
55
|
-
Ohai::Log.debug("
|
55
|
+
Ohai::Log.debug("Mixin EC2: Received HTTP 404 from metadata server while determining API version, assuming 'latest'")
|
56
56
|
return "latest"
|
57
57
|
elsif response.code != "200"
|
58
|
-
raise "Unable to determine EC2 metadata version (returned #{response.code} response)"
|
58
|
+
raise "Mixin EC2: Unable to determine EC2 metadata version (returned #{response.code} response)"
|
59
59
|
end
|
60
60
|
# Note: Sorting the list of versions may have unintended consequences in
|
61
61
|
# non-EC2 environments. It appears to be safe in EC2 as of 2013-04-12.
|
62
62
|
versions = response.body.split("\n").sort
|
63
63
|
until versions.empty? || EC2_SUPPORTED_VERSIONS.include?(versions.last)
|
64
64
|
pv = versions.pop
|
65
|
-
Ohai::Log.debug("
|
65
|
+
Ohai::Log.debug("Mixin EC2: EC2 lists metadata version: #{pv} not yet supported by Ohai") unless pv == "latest"
|
66
66
|
end
|
67
|
-
Ohai::Log.debug("
|
67
|
+
Ohai::Log.debug("Mixin EC2: Latest supported EC2 metadata version: #{versions.last}")
|
68
68
|
if versions.empty?
|
69
|
-
raise "Unable to determine EC2 metadata version (no supported entries found)"
|
69
|
+
raise "Mixin EC2: Unable to determine EC2 metadata version (no supported entries found)"
|
70
70
|
end
|
71
71
|
versions.last
|
72
72
|
end
|
@@ -88,16 +88,16 @@ module Ohai
|
|
88
88
|
# `nil` and continue the run instead of failing it.
|
89
89
|
def metadata_get(id, api_version)
|
90
90
|
path = "/#{api_version}/meta-data/#{id}"
|
91
|
-
Ohai::Log.debug("
|
91
|
+
Ohai::Log.debug("Mixin EC2: Fetching http://#{EC2_METADATA_ADDR}#{path}")
|
92
92
|
response = http_client.get(path)
|
93
93
|
case response.code
|
94
94
|
when "200"
|
95
95
|
response.body
|
96
96
|
when "404"
|
97
|
-
Ohai::Log.debug("
|
97
|
+
Ohai::Log.debug("Mixin EC2: Encountered 404 response retreiving EC2 metadata path: #{path} ; continuing.")
|
98
98
|
nil
|
99
99
|
else
|
100
|
-
raise "Encountered error retrieving EC2 metadata (#{path} returned #{response.code} response)"
|
100
|
+
raise "Mixin EC2: Encountered error retrieving EC2 metadata (#{path} returned #{response.code} response)"
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -169,7 +169,7 @@ module Ohai
|
|
169
169
|
end
|
170
170
|
|
171
171
|
def fetch_userdata
|
172
|
-
Ohai::Log.debug("
|
172
|
+
Ohai::Log.debug("Mixin EC2: Fetching http://#{EC2_METADATA_ADDR}/#{best_api_version}/user-data/")
|
173
173
|
response = http_client.get("/#{best_api_version}/user-data/")
|
174
174
|
response.code == "200" ? response.body : nil
|
175
175
|
end
|
data/lib/ohai/mixin/os.rb
CHANGED
@@ -26,32 +26,32 @@ module Ohai
|
|
26
26
|
def collect_os
|
27
27
|
case ::RbConfig::CONFIG["host_os"]
|
28
28
|
when /aix(.+)$/
|
29
|
-
|
29
|
+
"aix"
|
30
30
|
when /darwin(.+)$/
|
31
|
-
|
31
|
+
"darwin"
|
32
32
|
when /hpux(.+)$/
|
33
|
-
|
33
|
+
"hpux"
|
34
34
|
when /linux/
|
35
|
-
|
35
|
+
"linux"
|
36
36
|
when /freebsd(.+)$/
|
37
|
-
|
37
|
+
"freebsd"
|
38
38
|
when /openbsd(.+)$/
|
39
|
-
|
39
|
+
"openbsd"
|
40
40
|
when /netbsd(.*)$/
|
41
|
-
|
41
|
+
"netbsd"
|
42
42
|
when /dragonfly(.*)$/
|
43
|
-
|
43
|
+
"dragonflybsd"
|
44
44
|
when /solaris2/
|
45
|
-
|
45
|
+
"solaris2"
|
46
46
|
when /mswin|mingw32|windows/
|
47
47
|
# After long discussion in IRC the "powers that be" have come to a consensus
|
48
48
|
# that no Windows platform exists that was not based on the
|
49
49
|
# Windows_NT kernel, so we herby decree that "windows" will refer to all
|
50
50
|
# platforms built upon the Windows_NT kernel and have access to win32 or win64
|
51
51
|
# subsystems.
|
52
|
-
|
52
|
+
"windows"
|
53
53
|
else
|
54
|
-
|
54
|
+
::RbConfig::CONFIG["host_os"]
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -54,11 +54,11 @@ module ::Ohai::Mixin::SoftlayerMetadata
|
|
54
54
|
if res.code.to_i.between?(200, 299)
|
55
55
|
res.body
|
56
56
|
else
|
57
|
-
::Ohai::Log.error("Unable to fetch item #{full_url}: status (#{res.code}) body (#{res.body})")
|
57
|
+
::Ohai::Log.error("Mixin Softlayer: Unable to fetch item #{full_url}: status (#{res.code}) body (#{res.body})")
|
58
58
|
nil
|
59
59
|
end
|
60
60
|
rescue => e
|
61
|
-
::Ohai::Log.error("Unable to fetch softlayer metadata from #{u}: #{e.class}: #{e.message}")
|
61
|
+
::Ohai::Log.error("Mixin Softlayer: Unable to fetch softlayer metadata from #{u}: #{e.class}: #{e.message}")
|
62
62
|
raise e
|
63
63
|
end
|
64
64
|
end
|
data/lib/ohai/mixin/string.rb
CHANGED
@@ -23,7 +23,7 @@ class String
|
|
23
23
|
# This should implement the same functionality as underscore method in
|
24
24
|
# ActiveSupport::CoreExtensions::String::Inflections
|
25
25
|
def wmi_underscore
|
26
|
-
|
26
|
+
gsub(/::/, "/").gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
|
27
27
|
gsub(/([a-z\d])([A-Z])/, '\1_\2').tr("-", "_").downcase
|
28
28
|
end
|
29
29
|
end
|
data/lib/ohai/plugins/azure.rb
CHANGED
@@ -41,7 +41,7 @@ Ohai.plugin(:Azure) do
|
|
41
41
|
def has_waagent?
|
42
42
|
if File.exist?("/usr/sbin/waagent") || Dir.exist?('C:\WindowsAzure')
|
43
43
|
Ohai::Log.debug("Plugin Azure: Found waagent used by MS Azure.")
|
44
|
-
|
44
|
+
true
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -56,7 +56,7 @@ Ohai.plugin(:Azure) do
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
59
|
-
|
59
|
+
has_245
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
data/lib/ohai/plugins/c.rb
CHANGED
@@ -123,18 +123,17 @@ Ohai.plugin(:C) do
|
|
123
123
|
|
124
124
|
def collect_xlc
|
125
125
|
# ibm xlc
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
end
|
126
|
+
|
127
|
+
so = shell_out("xlc -qversion")
|
128
|
+
if so.exitstatus == 0 || (so.exitstatus >> 8) == 249
|
129
|
+
description = so.stdout.split($/).first
|
130
|
+
if description =~ /V(\d+\.\d+)/
|
131
|
+
@c[:xlc] = Mash.new
|
132
|
+
@c[:xlc][:version] = $1
|
133
|
+
@c[:xlc][:description] = description.strip
|
135
134
|
end
|
136
|
-
rescue Ohai::Exceptions::Exec
|
137
135
|
end
|
136
|
+
rescue Ohai::Exceptions::Exec
|
138
137
|
end
|
139
138
|
|
140
139
|
def collect_sunpro
|
@@ -22,25 +22,29 @@ Ohai.plugin(:CPU) do
|
|
22
22
|
|
23
23
|
collect_data(:darwin) do
|
24
24
|
cpu Mash.new
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
25
|
+
shell_out("sysctl -a").stdout.lines.each do |line|
|
26
|
+
case line
|
27
|
+
when /^hw.packages: (.*)$/
|
28
|
+
cpu[:real] = Regexp.last_match[1].to_i
|
29
|
+
when /^hw.physicalcpu: (.*)$/
|
30
|
+
cpu[:cores] = Regexp.last_match[1].to_i
|
31
|
+
when /^hw.logicalcpu: (.*)$/
|
32
|
+
cpu[:total] = Regexp.last_match[1].to_i
|
33
|
+
when /^hw.cpufrequency: (.*)$/
|
34
|
+
cpu[:mhz] = Regexp.last_match[1].to_i / 1000000
|
35
|
+
when /^machdep.cpu.vendor: (.*)$/
|
36
|
+
cpu[:vendor_id] = Regexp.last_match[1].chomp
|
37
|
+
when /^machdep.cpu.brand_string: (.*)$/
|
38
|
+
cpu[:model_name] = Regexp.last_match[1].chomp
|
39
|
+
when /^machdep.cpu.model: (.*)$/
|
40
|
+
cpu[:model] = Regexp.last_match[1].to_i
|
41
|
+
when /^machdep.cpu.family: (.*)$/
|
42
|
+
cpu[:family] = Regexp.last_match[1].to_i
|
43
|
+
when /^machdep.cpu.stepping: (.*)$/
|
44
|
+
cpu[:stepping] = Regexp.last_match[1].to_i
|
45
|
+
when /^machdep.cpu.features: (.*)$/
|
46
|
+
cpu[:flags] = Regexp.last_match[1].downcase.split(" ")
|
47
|
+
end
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
@@ -30,7 +30,7 @@ Ohai.plugin(:Hardware) do
|
|
30
30
|
unless hardware
|
31
31
|
hardware Mash.new
|
32
32
|
else
|
33
|
-
Ohai::Log.debug("Plugin
|
33
|
+
Ohai::Log.debug("Plugin Hardware: namespace already exists")
|
34
34
|
next
|
35
35
|
end
|
36
36
|
|
@@ -46,16 +46,22 @@ Ohai.plugin(:Hardware) do
|
|
46
46
|
hw_hash[0]["_items"][0].delete("_name")
|
47
47
|
hardware.merge!(hw_hash[0]["_items"][0])
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
49
|
+
# ProductName: Mac OS X
|
50
|
+
# ProductVersion: 10.12.5
|
51
|
+
# BuildVersion: 16F73
|
52
|
+
shell_out("sw_vers").stdout.lines.each do |line|
|
53
|
+
case line
|
54
|
+
when /^ProductName:\s*(.*)$/
|
55
|
+
hardware["operating_system"] = Regexp.last_match[1].strip
|
56
|
+
when /^ProductVersion:\s*(.*)$/
|
57
|
+
hardware["operating_system_version"] = Regexp.last_match[1].strip
|
58
|
+
when /^BuildVersion:\s*(.*)$/
|
59
|
+
hardware["build_version"] = Regexp.last_match[1].strip
|
60
|
+
end
|
57
61
|
end
|
58
62
|
|
63
|
+
hardware["architecture"] = shell_out("uname -m").stdout.strip
|
64
|
+
|
59
65
|
# Storage queries
|
60
66
|
storage = []
|
61
67
|
storage_hash = system_profiler("SPStorageDataType")
|
@@ -38,13 +38,13 @@ Ohai.plugin(:DigitalOcean) do
|
|
38
38
|
# dmi[:bios][:all_records][0][:Vendor] may not exist
|
39
39
|
end
|
40
40
|
Ohai::Log.debug("Plugin DigitalOcean: has_do_dmi? == false")
|
41
|
-
|
41
|
+
false
|
42
42
|
end
|
43
43
|
|
44
44
|
def looks_like_digital_ocean?
|
45
45
|
return true if hint?("digital_ocean")
|
46
46
|
return true if has_do_dmi? && can_socket_connect?(Ohai::Mixin::DOMetadata::DO_METADATA_ADDR, 80)
|
47
|
-
|
47
|
+
false
|
48
48
|
end
|
49
49
|
|
50
50
|
collect_data do
|