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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b422d14afdb82f8fe3f07aa0aaa8dd82c30fa06
4
- data.tar.gz: f99bb4675dcbfca6ffbb28420fbcae88072b55ff
3
+ metadata.gz: 960b61dc94f8f6d62b040dc3f8ae36f976d00568
4
+ data.tar.gz: e85dcae265af4dccee27befae6b9b735414c1294
5
5
  SHA512:
6
- metadata.gz: 0755c29277022af57f5535a3ced25262ab34e190f8c25d2ed390e0b0324374511ed9ec9c2ca93848fcf2287dfd34d83a849a369ab3271a5e950c9268c8ab430f
7
- data.tar.gz: 99d5e61254335f5e2274c2ef0f36cf401fa11c0b2ea69cfd3a5514025297e5fdca1d9546670a7364a1c765a434fc57979da777b39c9390391ce766ece3b3d270
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\.\:\-]+): \S+ mtu (\d+) index (\d+)/
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
@@ -18,5 +18,5 @@
18
18
 
19
19
  module Ohai
20
20
  OHAI_ROOT = File.expand_path(File.dirname(__FILE__))
21
- VERSION = "8.18.0"
21
+ VERSION = "8.19.0"
22
22
  end
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.11.3"
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
@@ -1,4 +1,3 @@
1
- require "rspec"
2
1
  require "rspec/collection_matchers"
3
2
 
4
3
  # require 'pry-debugger'
@@ -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:1")
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.18.0
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-04 00:00:00.000000000 Z
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.11.3
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.11.3
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: