ohai 8.18.0 → 8.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ohai/plugins/linux/platform.rb +4 -0
- data/lib/ohai/plugins/solaris2/network.rb +2 -2
- data/lib/ohai/version.rb +1 -1
- data/ohai.gemspec +5 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/unit/plugins/linux/platform_spec.rb +19 -0
- data/spec/unit/plugins/solaris2/network_spec.rb +2 -2
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 960b61dc94f8f6d62b040dc3f8ae36f976d00568
|
4
|
+
data.tar.gz: e85dcae265af4dccee27befae6b9b735414c1294
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d967bdfab7ee71176a18e57149d8238acbb116fe9d374d403ed4833a65ea163a51efb4fb2f0878e607bda69051e43068dbed733860ff146c149f31fbe82346
|
7
|
+
data.tar.gz: 2326a86a86c4b5bac6315e1a8b7d2019488c2a0bcdaa90352d0aef2af0694dd8c5cf743458c4eb1bd43de0141afda10757aaefe5d9245e5ba42ad62c63fc6f15
|
@@ -153,6 +153,10 @@ Ohai.plugin(:Platform) do
|
|
153
153
|
elsif File.exist?("/etc/alpine-release")
|
154
154
|
platform "alpine"
|
155
155
|
platform_version File.read("/etc/alpine-release").strip()
|
156
|
+
elsif File.exist?("/etc/Eos-release")
|
157
|
+
platform "arista_eos"
|
158
|
+
platform_version File.read("/etc/Eos-release").strip.split[-1]
|
159
|
+
platform_family "fedora"
|
156
160
|
elsif os_release_file_is_cisco?
|
157
161
|
raise "unknown Cisco /etc/os-release or /etc/cisco-release ID_LIKE field" if
|
158
162
|
os_release_info["ID_LIKE"].nil? || ! os_release_info["ID_LIKE"].include?("wrlinux")
|
@@ -58,7 +58,7 @@ ETHERNET_ENCAPS = %w{ afe amd8111s arn atge ath bfe bge bnx bnxe ce cxgbe
|
|
58
58
|
dmfe e1000g efe elxl emlxs eri hermon hme hxge igb
|
59
59
|
iprb ipw iwh iwi iwk iwp ixgb ixgbe mwl mxfe myri10ge
|
60
60
|
nge ntxn nxge pcn platform qfe qlc ral rge rtls rtw rwd
|
61
|
-
rwn sfe tavor vr wpi xge yge } unless defined?(ETHERNET_ENCAPS)
|
61
|
+
rwn sfe tavor vr wpi xge yge aggr} unless defined?(ETHERNET_ENCAPS)
|
62
62
|
|
63
63
|
Ohai.plugin(:Network) do
|
64
64
|
provides "network", "network/interfaces"
|
@@ -101,7 +101,7 @@ Ohai.plugin(:Network) do
|
|
101
101
|
cint = nil
|
102
102
|
|
103
103
|
so.stdout.lines do |line|
|
104
|
-
if line =~ /^([0-9a-zA-Z\.\:\-]+)
|
104
|
+
if line =~ /^([0-9a-zA-Z\.\:\-]+)\S/
|
105
105
|
cint = $1
|
106
106
|
iface[cint] = Mash.new unless iface[cint]
|
107
107
|
iface[cint][:mtu] = $2
|
data/lib/ohai/version.rb
CHANGED
data/ohai.gemspec
CHANGED
@@ -41,7 +41,11 @@ Gem::Specification.new do |s|
|
|
41
41
|
s.add_development_dependency "rspec-mocks", "~> 3.0"
|
42
42
|
s.add_development_dependency "rspec-collection_matchers", "~> 1.0"
|
43
43
|
s.add_development_dependency "rspec_junit_formatter"
|
44
|
-
s.add_development_dependency "github_changelog_generator", "1.
|
44
|
+
s.add_development_dependency "github_changelog_generator", "1.13.1"
|
45
|
+
|
46
|
+
# github_changelog_generator -> github-api -> oauth2 -> rack
|
47
|
+
# rack being unconstrained breaks Ruby 2.1 installs
|
48
|
+
s.add_development_dependency "rack", "~> 1.0"
|
45
49
|
|
46
50
|
s.bindir = "bin"
|
47
51
|
s.executables = %w{ohai}
|
data/spec/spec_helper.rb
CHANGED
@@ -26,6 +26,7 @@ describe Ohai::System, "Linux plugin platform" do
|
|
26
26
|
let(:have_gentoo_release) { false }
|
27
27
|
let(:have_exherbo_release) { false }
|
28
28
|
let(:have_alpine_release) { false }
|
29
|
+
let(:have_eos_release) { false }
|
29
30
|
let(:have_suse_release) { false }
|
30
31
|
let(:have_arch_release) { false }
|
31
32
|
let(:have_system_release) { false }
|
@@ -46,6 +47,7 @@ describe Ohai::System, "Linux plugin platform" do
|
|
46
47
|
allow(File).to receive(:exist?).with("/etc/gentoo-release").and_return(have_gentoo_release)
|
47
48
|
allow(File).to receive(:exist?).with("/etc/exherbo-release").and_return(have_exherbo_release)
|
48
49
|
allow(File).to receive(:exist?).with("/etc/alpine-release").and_return(have_alpine_release)
|
50
|
+
allow(File).to receive(:exist?).with("/etc/Eos-release").and_return(have_eos_release)
|
49
51
|
allow(File).to receive(:exist?).with("/etc/SuSE-release").and_return(have_suse_release)
|
50
52
|
allow(File).to receive(:exist?).with("/etc/arch-release").and_return(have_arch_release)
|
51
53
|
allow(File).to receive(:exist?).with("/etc/system-release").and_return(have_system_release)
|
@@ -246,6 +248,23 @@ describe Ohai::System, "Linux plugin platform" do
|
|
246
248
|
end
|
247
249
|
end
|
248
250
|
|
251
|
+
describe "on arista eos" do
|
252
|
+
|
253
|
+
let(:have_eos_release) { true }
|
254
|
+
|
255
|
+
before(:each) do
|
256
|
+
@plugin.lsb = nil
|
257
|
+
end
|
258
|
+
|
259
|
+
it "should set platform to arista_eos" do
|
260
|
+
expect(File).to receive(:read).with("/etc/Eos-release").and_return("Arista Networks EOS 4.16.7M")
|
261
|
+
@plugin.run
|
262
|
+
expect(@plugin[:platform]).to eq("arista_eos")
|
263
|
+
expect(@plugin[:platform_family]).to eq("fedora")
|
264
|
+
expect(@plugin[:platform_version]).to eq("4.16.7M")
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
249
268
|
describe "on exherbo" do
|
250
269
|
|
251
270
|
let(:have_exherbo_release) { true }
|
@@ -147,7 +147,7 @@ ROUTE_GET
|
|
147
147
|
end
|
148
148
|
|
149
149
|
it "detects the interfaces" do
|
150
|
-
expect(@plugin["network"]["interfaces"].keys.sort).to eq(["e1000g0:3", "e1000g2:1", "eri0", "ip.tun0", "ip.tun0:1", "lo0", "lo0:3", "net0", "net1:1", "qfe1"])
|
150
|
+
expect(@plugin["network"]["interfaces"].keys.sort).to eq(["e1000g0:3", "e1000g2:1", "eri0", "ip.tun0", "ip.tun0:1", "ip6.tun0", "lo0", "lo0:3", "net0", "net1:1", "qfe1", "vni0"])
|
151
151
|
end
|
152
152
|
|
153
153
|
it "detects the ip addresses of the interfaces" do
|
@@ -176,7 +176,7 @@ ROUTE_GET
|
|
176
176
|
end
|
177
177
|
|
178
178
|
it "finds the default interface for a solaris 11 zone" do
|
179
|
-
expect(@plugin[:network][:default_interface]).to eq("net1
|
179
|
+
expect(@plugin[:network][:default_interface]).to eq("net1")
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
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: 8.
|
4
|
+
version: 8.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|
@@ -266,14 +266,28 @@ dependencies:
|
|
266
266
|
requirements:
|
267
267
|
- - '='
|
268
268
|
- !ruby/object:Gem::Version
|
269
|
-
version: 1.
|
269
|
+
version: 1.13.1
|
270
270
|
type: :development
|
271
271
|
prerelease: false
|
272
272
|
version_requirements: !ruby/object:Gem::Requirement
|
273
273
|
requirements:
|
274
274
|
- - '='
|
275
275
|
- !ruby/object:Gem::Version
|
276
|
-
version: 1.
|
276
|
+
version: 1.13.1
|
277
|
+
- !ruby/object:Gem::Dependency
|
278
|
+
name: rack
|
279
|
+
requirement: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - "~>"
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '1.0'
|
284
|
+
type: :development
|
285
|
+
prerelease: false
|
286
|
+
version_requirements: !ruby/object:Gem::Requirement
|
287
|
+
requirements:
|
288
|
+
- - "~>"
|
289
|
+
- !ruby/object:Gem::Version
|
290
|
+
version: '1.0'
|
277
291
|
description: Ohai profiles your system and emits JSON
|
278
292
|
email: adam@chef.io
|
279
293
|
executables:
|