ohai 8.13.0 → 8.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/ohai/common/dmi.rb +1 -1
  4. data/lib/ohai/config.rb +2 -2
  5. data/lib/ohai/dsl/plugin.rb +1 -1
  6. data/lib/ohai/loader.rb +1 -1
  7. data/lib/ohai/mixin/command.rb +18 -5
  8. data/lib/ohai/mixin/ec2_metadata.rb +1 -1
  9. data/lib/ohai/plugins/aix/os.rb +1 -1
  10. data/lib/ohai/plugins/c.rb +49 -67
  11. data/lib/ohai/plugins/darwin/memory.rb +1 -1
  12. data/lib/ohai/plugins/darwin/network.rb +3 -3
  13. data/lib/ohai/plugins/darwin/platform.rb +1 -1
  14. data/lib/ohai/plugins/darwin/system_profiler.rb +1 -1
  15. data/lib/ohai/plugins/digital_ocean.rb +1 -1
  16. data/lib/ohai/plugins/ec2.rb +42 -41
  17. data/lib/ohai/plugins/erlang.rb +1 -1
  18. data/lib/ohai/plugins/ip_scopes.rb +1 -1
  19. data/lib/ohai/plugins/kernel.rb +1 -1
  20. data/lib/ohai/plugins/linux/network.rb +2 -2
  21. data/lib/ohai/plugins/linux/platform.rb +6 -1
  22. data/lib/ohai/plugins/mono.rb +1 -1
  23. data/lib/ohai/plugins/network.rb +2 -2
  24. data/lib/ohai/plugins/packages.rb +59 -46
  25. data/lib/ohai/plugins/python.rb +2 -2
  26. data/lib/ohai/plugins/rackspace.rb +4 -4
  27. data/lib/ohai/plugins/sigar/network.rb +1 -1
  28. data/lib/ohai/plugins/sigar/network_route.rb +1 -1
  29. data/lib/ohai/plugins/solaris2/dmi.rb +1 -1
  30. data/lib/ohai/plugins/solaris2/network.rb +25 -8
  31. data/lib/ohai/plugins/ssh_host_key.rb +1 -1
  32. data/lib/ohai/plugins/windows/network.rb +5 -5
  33. data/lib/ohai/provides_map.rb +2 -2
  34. data/lib/ohai/system.rb +1 -1
  35. data/lib/ohai/version.rb +1 -1
  36. data/spec/functional/loader_spec.rb +1 -1
  37. data/spec/unit/mixin/command_spec.rb +118 -0
  38. data/spec/unit/plugins/aix/os_spec.rb +6 -5
  39. data/spec/unit/plugins/c_spec.rb +169 -118
  40. data/spec/unit/plugins/digital_ocean_spec.rb +7 -7
  41. data/spec/unit/plugins/dmi_spec.rb +4 -4
  42. data/spec/unit/plugins/ec2_spec.rb +64 -69
  43. data/spec/unit/plugins/linode_spec.rb +6 -6
  44. data/spec/unit/plugins/linux/platform_spec.rb +7 -0
  45. data/spec/unit/plugins/linux/sessions_spec.rb +2 -2
  46. data/spec/unit/plugins/network_spec.rb +16 -16
  47. data/spec/unit/plugins/openstack_spec.rb +1 -1
  48. data/spec/unit/plugins/packages_spec.rb +165 -191
  49. data/spec/unit/plugins/rackspace_spec.rb +203 -130
  50. data/spec/unit/plugins/solaris2/filesystem.rb +2 -2
  51. data/spec/unit/plugins/solaris2/network_spec.rb +36 -5
  52. metadata +3 -3
@@ -43,15 +43,15 @@ describe Ohai::System, "plugin digital_ocean" do
43
43
  "eth0" => {
44
44
  "addresses" => {
45
45
  "00:D3:AD:B3:3F:00" => {
46
- "family" => "lladdr"
46
+ "family" => "lladdr",
47
47
  },
48
48
  "1.2.3.4" => {
49
- "netmask" => "255.255.255.0"
49
+ "netmask" => "255.255.255.0",
50
50
  },
51
51
  "2400:6180:0000:00d0:0000:0000:0009:7001" => {},
52
- }
53
- }
54
- }
52
+ },
53
+ },
54
+ },
55
55
  }
56
56
 
57
57
  allow(File).to receive(:exist?).with(hint_path_nix).and_return(true)
@@ -132,10 +132,10 @@ describe Ohai::System, "plugin digital_ocean" do
132
132
  @plugin[:network][:interfaces][:eth1] = {
133
133
  "addresses" => {
134
134
  "10.128.142.89" => {
135
- "netmask" => "255.255.255.0"
135
+ "netmask" => "255.255.255.0",
136
136
  },
137
137
  "fdf8:f53b:82e4:0000:0000:0000:0000:0053" => {},
138
- }
138
+ },
139
139
  }
140
140
 
141
141
  @plugin.run
@@ -116,16 +116,16 @@ describe Ohai::System, "plugin dmi" do
116
116
  {
117
117
  :bios => {
118
118
  :vendor => "Phoenix Technologies LTD",
119
- :release_date => "12/31/2009"
119
+ :release_date => "12/31/2009",
120
120
  },
121
121
  :system => {
122
122
  :manufacturer => "VMware, Inc.",
123
- :product_name => "VMware Virtual Platform"
123
+ :product_name => "VMware Virtual Platform",
124
124
  },
125
125
  :chassis => {
126
126
  :lock => "Not Present",
127
- :asset_tag => "No Asset Tag"
128
- }
127
+ :asset_tag => "No Asset Tag",
128
+ },
129
129
  }.each do |id, data|
130
130
  data.each do |attribute, value|
131
131
  it "should have [:dmi][:#{id}][:#{attribute}] set" do
@@ -22,27 +22,29 @@ require "open-uri"
22
22
  require "base64"
23
23
 
24
24
  describe Ohai::System, "plugin ec2" do
25
+
25
26
  before(:each) do
26
- @plugin = get_plugin("ec2")
27
- @plugin[:network] = { :interfaces => { :eth0 => {} } }
28
27
  allow(File).to receive(:exist?).with("/etc/chef/ohai/hints/ec2.json").and_return(false)
29
28
  allow(File).to receive(:exist?).with('C:\chef\ohai\hints/ec2.json').and_return(false)
30
- allow(File).to receive(:exist?).with("/usr/bin/ec2metadata").and_return(false)
31
- allow(File).to receive(:exist?).with("/usr/bin/rackspace-monitoring-agent").and_return(false)
29
+ allow(File).to receive(:exist?).with("/sys/hypervisor/uuid").and_return(false)
32
30
  end
33
31
 
34
32
  shared_examples_for "!ec2" do
35
- it "should NOT attempt to fetch the ec2 metadata or set ec2 attribute" do
36
- expect(@plugin).not_to receive(:http_client)
37
- expect(@plugin[:ec2]).to be_nil
38
- @plugin.run
33
+ let(:plugin) { get_plugin("ec2") }
34
+
35
+ it "DOESN'T attempt to fetch the ec2 metadata or set ec2 attribute" do
36
+ expect(plugin).not_to receive(:http_client)
37
+ expect(plugin[:ec2]).to be_nil
38
+ plugin.run
39
39
  end
40
40
  end
41
41
 
42
42
  shared_examples_for "ec2" do
43
+ let(:plugin) { get_plugin("ec2") }
44
+
43
45
  before(:each) do
44
46
  @http_client = double("Net::HTTP client")
45
- allow(@plugin).to receive(:http_client).and_return(@http_client)
47
+ allow(plugin).to receive(:http_client).and_return(@http_client)
46
48
  allow(IO).to receive(:select).and_return([[], [1], []])
47
49
  t = double("connection")
48
50
  allow(t).to receive(:connect_nonblock).and_raise(Errno::EINPROGRESS)
@@ -71,12 +73,12 @@ describe Ohai::System, "plugin ec2" do
71
73
  with("/2012-01-12/user-data/").
72
74
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
73
75
 
74
- @plugin.run
76
+ plugin.run
75
77
 
76
- expect(@plugin[:ec2]).not_to be_nil
77
- expect(@plugin[:ec2]["instance_type"]).to eq("c1.medium")
78
- expect(@plugin[:ec2]["ami_id"]).to eq("ami-5d2dc934")
79
- expect(@plugin[:ec2]["security_groups"]).to eql %w{group1 group2}
78
+ expect(plugin[:ec2]).not_to be_nil
79
+ expect(plugin[:ec2]["instance_type"]).to eq("c1.medium")
80
+ expect(plugin[:ec2]["ami_id"]).to eq("ami-5d2dc934")
81
+ expect(plugin[:ec2]["security_groups"]).to eql %w{group1 group2}
80
82
  end
81
83
 
82
84
  it "fetches binary userdata opaquely" do
@@ -89,17 +91,17 @@ describe Ohai::System, "plugin ec2" do
89
91
  with("/2012-01-12/user-data/").
90
92
  and_return(double("Net::HTTP Response", :body => "^_<8B>^H^H<C7>U^@^Csomething^@KT<C8><C9>,)<C9>IU(I-.I<CB><CC>I<E5>^B^@^Qz<BF><B0>^R^@^@^@", :code => "200"))
91
93
 
92
- @plugin.run
94
+ plugin.run
93
95
 
94
- expect(@plugin[:ec2]).not_to be_nil
95
- expect(@plugin[:ec2]["instance_type"]).to eq("c1.medium")
96
- expect(@plugin[:ec2]["ami_id"]).to eq("ami-5d2dc934")
97
- expect(@plugin[:ec2]["security_groups"]).to eql %w{group1 group2}
98
- expect(@plugin[:ec2]["userdata"]).to eq(Base64.decode64("Xl88OEI+XkheSDxDNz5VXkBeQ3NvbWV0aGluZ15AS1Q8Qzg+PEM5PiwpPEM5\nPklVKEktLkk8Q0I+PENDPkk8RTU+XkJeQF5RejxCRj48QjA+XlJeQF5AXkA="))
96
+ expect(plugin[:ec2]).not_to be_nil
97
+ expect(plugin[:ec2]["instance_type"]).to eq("c1.medium")
98
+ expect(plugin[:ec2]["ami_id"]).to eq("ami-5d2dc934")
99
+ expect(plugin[:ec2]["security_groups"]).to eql %w{group1 group2}
100
+ expect(plugin[:ec2]["userdata"]).to eq(Base64.decode64("Xl88OEI+XkheSDxDNz5VXkBeQ3NvbWV0aGluZ15AS1Q8Qzg+PEM5PiwpPEM5\nPklVKEktLkk8Q0I+PENDPkk8RTU+XkJeQF5RejxCRj48QjA+XlJeQF5AXkA="))
99
101
  end
100
102
  end
101
103
 
102
- it "should parse ec2 network/ directory as a multi-level hash" do
104
+ it "parses ec2 network/ directory as a multi-level hash" do
103
105
  expect(@http_client).to receive(:get).
104
106
  with("/2012-01-12/meta-data/").
105
107
  and_return(double("Net::HTTP Response", :body => "network/", :code => "200"))
@@ -122,10 +124,10 @@ describe Ohai::System, "plugin ec2" do
122
124
  with("/2012-01-12/user-data/").
123
125
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
124
126
 
125
- @plugin.run
127
+ plugin.run
126
128
 
127
- expect(@plugin[:ec2]).not_to be_nil
128
- expect(@plugin[:ec2]["network_interfaces_macs"]["12:34:56:78:9a:bc"]["public_hostname"]).to eql("server17.opscode.com")
129
+ expect(plugin[:ec2]).not_to be_nil
130
+ expect(plugin[:ec2]["network_interfaces_macs"]["12:34:56:78:9a:bc"]["public_hostname"]).to eql("server17.opscode.com")
129
131
  end # context with common metadata paths
130
132
 
131
133
  context "with ec2_iam hint file" do
@@ -139,7 +141,7 @@ describe Ohai::System, "plugin ec2" do
139
141
  end
140
142
  end
141
143
 
142
- it "should parse ec2 iam/ directory and collect iam/security-credentials/" do
144
+ it "parses ec2 iam/ directory and collect iam/security-credentials/" do
143
145
  expect(@http_client).to receive(:get).
144
146
  with("/2012-01-12/meta-data/").
145
147
  and_return(double("Net::HTTP Response", :body => "iam/", :code => "200"))
@@ -156,11 +158,11 @@ describe Ohai::System, "plugin ec2" do
156
158
  with("/2012-01-12/user-data/").
157
159
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
158
160
 
159
- @plugin.run
161
+ plugin.run
160
162
 
161
- expect(@plugin[:ec2]).not_to be_nil
162
- expect(@plugin[:ec2]["iam"]["security-credentials"]["MyRole"]["Code"]).to eql "Success"
163
- expect(@plugin[:ec2]["iam"]["security-credentials"]["MyRole"]["Token"]).to eql "12345678"
163
+ expect(plugin[:ec2]).not_to be_nil
164
+ expect(plugin[:ec2]["iam"]["security-credentials"]["MyRole"]["Code"]).to eql "Success"
165
+ expect(plugin[:ec2]["iam"]["security-credentials"]["MyRole"]["Token"]).to eql "12345678"
164
166
  end
165
167
  end
166
168
 
@@ -173,7 +175,7 @@ describe Ohai::System, "plugin ec2" do
173
175
  end
174
176
  end
175
177
 
176
- it "should parse ec2 iam/ directory and NOT collect iam/security-credentials/" do
178
+ it "parses ec2 iam/ directory and NOT collect iam/security-credentials/" do
177
179
  expect(@http_client).to receive(:get).
178
180
  with("/2012-01-12/meta-data/").
179
181
  and_return(double("Net::HTTP Response", :body => "iam/", :code => "200"))
@@ -190,14 +192,14 @@ describe Ohai::System, "plugin ec2" do
190
192
  with("/2012-01-12/user-data/").
191
193
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
192
194
 
193
- @plugin.run
195
+ plugin.run
194
196
 
195
- expect(@plugin[:ec2]).not_to be_nil
196
- expect(@plugin[:ec2]["iam"]).to be_nil
197
+ expect(plugin[:ec2]).not_to be_nil
198
+ expect(plugin[:ec2]["iam"]).to be_nil
197
199
  end
198
200
  end
199
201
 
200
- it "should ignore \"./\" and \"../\" on ec2 metadata paths to avoid infinity loops" do
202
+ it "ignores \"./\" and \"../\" on ec2 metadata paths to avoid infinity loops" do
201
203
  expect(@http_client).to receive(:get).
202
204
  with("/2012-01-12/meta-data/").
203
205
  and_return(double("Net::HTTP Response", :body => ".\n./\n..\n../\npath1/.\npath2/./\npath3/..\npath4/../", :code => "200"))
@@ -229,12 +231,12 @@ describe Ohai::System, "plugin ec2" do
229
231
  with("/2012-01-12/user-data/").
230
232
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
231
233
 
232
- @plugin.run
234
+ plugin.run
233
235
 
234
- expect(@plugin[:ec2]).not_to be_nil
236
+ expect(plugin[:ec2]).not_to be_nil
235
237
  end
236
238
 
237
- it "should complete the run despite unavailable metadata" do
239
+ it "completes the run despite unavailable metadata" do
238
240
  expect(@http_client).to receive(:get).
239
241
  with("/2012-01-12/meta-data/").
240
242
  and_return(double("Net::HTTP Response", :body => "metrics/", :code => "200"))
@@ -248,46 +250,50 @@ describe Ohai::System, "plugin ec2" do
248
250
  with("/2012-01-12/user-data/").
249
251
  and_return(double("Net::HTTP Response", :body => "By the pricking of my thumb...", :code => "200"))
250
252
 
251
- @plugin.run
253
+ plugin.run
252
254
 
253
- expect(@plugin[:ec2]).not_to be_nil
254
- expect(@plugin[:ec2]["metrics"]).to be_nil
255
- expect(@plugin[:ec2]["metrics_vhostmd"]).to be_nil
255
+ expect(plugin[:ec2]).not_to be_nil
256
+ expect(plugin[:ec2]["metrics"]).to be_nil
257
+ expect(plugin[:ec2]["metrics_vhostmd"]).to be_nil
256
258
  end
257
259
  end # shared examples for ec2
258
260
 
259
- describe "without dmi or ec2metadata binary, with xen mac, and metadata address connected" do
261
+ describe "with ec2 dmi data" do
262
+ it_behaves_like "ec2"
263
+
260
264
  before(:each) do
261
- allow(IO).to receive(:select).and_return([[], [1], []])
262
- @plugin[:network][:interfaces][:eth0][:arp] = { "169.254.1.0" => "fe:ff:ff:ff:ff:ff" }
265
+ plugin[:dmi] = { :bios => { :all_records => [ { :Version => "4.2.amazon" } ] } }
263
266
  end
267
+ end
264
268
 
265
- it_should_behave_like "ec2"
269
+ describe "with amazon kernel data" do
270
+ it_behaves_like "ec2"
266
271
 
267
- it "warns that the arp table method is deprecated" do
268
- expect(Ohai::Log).to receive(:warn).with(/will be removed/)
269
- @plugin.has_xen_mac?
272
+ before(:each) do
273
+ plugin[:kernel] = { :os_info => { :organization => "Amazon.com" } }
270
274
  end
271
275
  end
272
276
 
273
- describe "with ec2metadata binary" do
274
- it_should_behave_like "ec2"
277
+ describe "with EC2 Xen UUID" do
278
+ it_behaves_like "ec2"
275
279
 
276
280
  before(:each) do
277
- allow(File).to receive(:exist?).with("/usr/bin/ec2metadata").and_return(true)
281
+ allow(File).to receive(:exist?).with("/sys/hypervisor/uuid").and_return(true)
282
+ allow(File).to receive(:read).with("/sys/hypervisor/uuid").and_return("ec2a0561-e4d6-8e15-d9c8-2e0e03adcde8")
278
283
  end
279
284
  end
280
285
 
281
- describe "with ec2 dmi data" do
282
- it_should_behave_like "ec2"
286
+ describe "with non-EC2 Xen UUID" do
287
+ it_behaves_like "!ec2"
283
288
 
284
289
  before(:each) do
285
- @plugin[:dmi] = { :bios => { :all_records => [ { :Version => "4.2.amazon" } ] } }
290
+ allow(File).to receive(:exist?).with("/sys/hypervisor/uuid").and_return(true)
291
+ allow(File).to receive(:read).with("/sys/hypervisor/uuid").and_return("123a0561-e4d6-8e15-d9c8-2e0e03adcde8")
286
292
  end
287
293
  end
288
294
 
289
295
  describe "with ec2 hint file" do
290
- it_should_behave_like "ec2"
296
+ it_behaves_like "ec2"
291
297
 
292
298
  before(:each) do
293
299
  if windows?
@@ -301,7 +307,7 @@ describe Ohai::System, "plugin ec2" do
301
307
  end
302
308
 
303
309
  describe "with rackspace hint file" do
304
- it_should_behave_like "!ec2"
310
+ it_behaves_like "!ec2"
305
311
 
306
312
  before(:each) do
307
313
  allow(File).to receive(:exist?).with("/etc/chef/ohai/hints/rackspace.json").and_return(true)
@@ -311,24 +317,13 @@ describe Ohai::System, "plugin ec2" do
311
317
  end
312
318
  end
313
319
 
314
- describe "with ec2metadata, but with rackspace-monitoring-agent" do
315
- it_should_behave_like "!ec2"
316
-
317
- before(:each) do
318
- allow(File).to receive(:exist?).with("/usr/bin/ec2metadata").and_return(true)
319
- allow(File).to receive(:exist?).with("/usr/bin/rackspace-monitoring-agent").and_return(true)
320
- end
321
- end
322
-
323
320
  describe "without any hints that it is an ec2 system" do
324
- it_should_behave_like "!ec2"
321
+ it_behaves_like "!ec2"
325
322
 
326
323
  before(:each) do
327
324
  allow(File).to receive(:exist?).with("/etc/chef/ohai/hints/ec2.json").and_return(false)
328
325
  allow(File).to receive(:exist?).with('C:\chef\ohai\hints/ec2.json').and_return(false)
329
- allow(File).to receive(:exist?).with("/usr/bin/ec2metadata").and_return(false)
330
- @plugin[:dmi] = nil
331
- @plugin[:network][:interfaces][:eth0][:arp] = { "169.254.1.0" => "00:50:56:c0:00:08" }
326
+ plugin[:dmi] = nil
332
327
  end
333
328
  end
334
329
 
@@ -38,11 +38,11 @@ describe Ohai::System, "plugin linode" do
38
38
  "family" => "inet6",
39
39
  },
40
40
  "40:40:95:47:6E:ED" => {
41
- "family" => "lladdr"
41
+ "family" => "lladdr",
42
42
  },
43
- }
44
- }
45
- }
43
+ },
44
+ },
45
+ },
46
46
  }
47
47
  end
48
48
 
@@ -103,9 +103,9 @@ describe Ohai::System, "plugin linode" do
103
103
  "family" => "inet6",
104
104
  },
105
105
  "40:40:F5:AB:28:36" => {
106
- "family" => "lladdr"
106
+ "family" => "lladdr",
107
107
  },
108
- }
108
+ },
109
109
  }
110
110
  end
111
111
 
@@ -665,6 +665,13 @@ CISCO_RELEASE
665
665
  expect(@plugin[:platform]).to eq("opensuse")
666
666
  expect(@plugin[:platform_family]).to eq("suse")
667
667
  end
668
+
669
+ it "should read the platform as opensuseleap on openSUSE Leap" do
670
+ expect(File).to receive(:read).with("/etc/SuSE-release").and_return("openSUSE 42.1 (x86_64)\nVERSION = 42.1\nCODENAME = Malachite\n")
671
+ @plugin.run
672
+ expect(@plugin[:platform]).to eq("opensuseleap")
673
+ expect(@plugin[:platform_family]).to eq("suse")
674
+ end
668
675
  end
669
676
  end
670
677
 
@@ -60,7 +60,7 @@ LOGINCTL_OUT
60
60
  "uid" => "1000",
61
61
  "user" => "joe",
62
62
  "seat" => nil,
63
- }
63
+ },
64
64
  },
65
65
  "by_user" => {
66
66
  "Debian-gdm" => [{
@@ -73,7 +73,7 @@ LOGINCTL_OUT
73
73
  "session" => "318",
74
74
  "uid" => "0",
75
75
  "user" => "root",
76
- "seat" => nil
76
+ "seat" => nil,
77
77
  }, {
78
78
  "session" => "46",
79
79
  "uid" => "0",
@@ -58,7 +58,7 @@ describe Ohai::System, "Network Plugin" do
58
58
  "flags" => %w{UP BROADCAST RUNNING SIMPLEX MULTICAST},
59
59
  "addresses" => {
60
60
  "00:00:24:c9:5e:b8" => {
61
- "family" => "lladdr"
61
+ "family" => "lladdr",
62
62
  },
63
63
  "fe80::200:24ff:fec9:5eb8" => {
64
64
  "family" => "inet6",
@@ -83,7 +83,7 @@ describe Ohai::System, "Network Plugin" do
83
83
  "flags" => %w{UP BROADCAST RUNNING PROMISC SIMPLEX MULTICAST},
84
84
  "addresses" => {
85
85
  "00:00:24:c9:5e:b9" => {
86
- "family" => "lladdr"
86
+ "family" => "lladdr",
87
87
  },
88
88
  "fe80::200:24ff:fec9:5eb9" => {
89
89
  "family" => "inet6",
@@ -99,7 +99,7 @@ describe Ohai::System, "Network Plugin" do
99
99
  "flags" => %w{UP BROADCAST RUNNING PROMISC SIMPLEX MULTICAST},
100
100
  "addresses" => {
101
101
  "00:00:24:c9:5e:ba" => {
102
- "family" => "lladdr"
102
+ "family" => "lladdr",
103
103
  },
104
104
  "fe80::200:24ff:fec9:5eba" => {
105
105
  "family" => "inet6",
@@ -115,7 +115,7 @@ describe Ohai::System, "Network Plugin" do
115
115
  "flags" => %w{UP BROADCAST RUNNING PROMISC SIMPLEX MULTICAST},
116
116
  "addresses" => {
117
117
  "00:00:24:c9:5e:bb" => {
118
- "family" => "lladdr"
118
+ "family" => "lladdr",
119
119
  },
120
120
  "fe80::200:24ff:fec9:5ebb" => {
121
121
  "family" => "inet6",
@@ -158,7 +158,7 @@ describe Ohai::System, "Network Plugin" do
158
158
  "flags" => %w{LEARNING DISCOVER AUTOEDGE AUTOPTP},
159
159
  "addresses" => {
160
160
  "02:20:6f:d2:c4:00" => {
161
- "family" => "lladdr"
161
+ "family" => "lladdr",
162
162
  },
163
163
  "192.168.2.1" => {
164
164
  "family" => "inet",
@@ -197,7 +197,7 @@ describe Ohai::System, "Network Plugin" do
197
197
  "zoneid" => "gif0",
198
198
  "prefixlen" => "64",
199
199
  "scopeid" => "0xa",
200
- }
200
+ },
201
201
  },
202
202
  },
203
203
  },
@@ -205,7 +205,7 @@ describe Ohai::System, "Network Plugin" do
205
205
  "default_interface" => "vr0",
206
206
  "default_inet6_gateway" => "2001:470:d:cb4::2",
207
207
  "default_inet6_interface" => "bridge0",
208
- }
208
+ },
209
209
  },
210
210
  "linux" => {
211
211
  "network" => {
@@ -241,7 +241,7 @@ describe Ohai::System, "Network Plugin" do
241
241
  "family" => "inet6",
242
242
  },
243
243
  "00:16:3E:2F:36:79" => {
244
- "family" => "lladdr"
244
+ "family" => "lladdr",
245
245
  },
246
246
  "192.168.66.33" => {
247
247
  "scope" => "Global",
@@ -271,7 +271,7 @@ describe Ohai::System, "Network Plugin" do
271
271
  "family" => "inet6",
272
272
  },
273
273
  "00:16:3E:2F:36:80" => {
274
- "family" => "lladdr"
274
+ "family" => "lladdr",
275
275
  },
276
276
  "192.168.99.11" => {
277
277
  "scope" => "Global",
@@ -295,7 +295,7 @@ describe Ohai::System, "Network Plugin" do
295
295
  "default_interface" => "eth0",
296
296
  "default_inet6_gateway" => "3ffe:1111:2222::",
297
297
  "default_inet6_interface" => "eth0",
298
- }
298
+ },
299
299
  },
300
300
  "windows" => {
301
301
  "network" => {
@@ -314,17 +314,17 @@ describe Ohai::System, "Network Plugin" do
314
314
  "scope" => "Link",
315
315
  },
316
316
  "52:54:44:66:66:02" => {
317
- "family" => "lladdr"
317
+ "family" => "lladdr",
318
318
  },
319
319
  },
320
320
  "mtu" => nil,
321
321
  "type" => "Ethernet 802.3",
322
322
  "encapsulation" => "Ethernet",
323
- }
323
+ },
324
324
  },
325
325
  "default_gateway" => "172.19.0.1",
326
326
  "default_interface" => "0xb",
327
- }
327
+ },
328
328
  },
329
329
  }
330
330
 
@@ -936,13 +936,13 @@ describe Ohai::System, "Network Plugin" do
936
936
  @plugin["ip6address"] = "3ffe:8888:9999::1"
937
937
  @expected_results = {
938
938
  "freebsd" => {
939
- "macaddress" => "02:20:6f:d2:c4:00"
939
+ "macaddress" => "02:20:6f:d2:c4:00",
940
940
  },
941
941
  "linux" => {
942
- "macaddress" => "00:16:3E:2F:36:79"
942
+ "macaddress" => "00:16:3E:2F:36:79",
943
943
  },
944
944
  "windows" => {
945
- "macaddress" => "52:54:44:66:66:02"
945
+ "macaddress" => "52:54:44:66:66:02",
946
946
  },
947
947
  }
948
948
  end