ohai 14.15.0 → 15.0.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/lib/ohai/application.rb +0 -4
  4. data/lib/ohai/common/dmi.rb +43 -43
  5. data/lib/ohai/config.rb +1 -1
  6. data/lib/ohai/loader.rb +32 -47
  7. data/lib/ohai/mixin/dmi_decode.rb +29 -32
  8. data/lib/ohai/mixin/os.rb +0 -2
  9. data/lib/ohai/mixin/softlayer_metadata.rb +5 -5
  10. data/lib/ohai/plugins/aix/virtualization.rb +4 -4
  11. data/lib/ohai/plugins/bsd/virtualization.rb +10 -12
  12. data/lib/ohai/plugins/c.rb +0 -20
  13. data/lib/ohai/plugins/elixir.rb +13 -13
  14. data/lib/ohai/plugins/filesystem.rb +10 -10
  15. data/lib/ohai/plugins/gce.rb +42 -8
  16. data/lib/ohai/plugins/go.rb +11 -11
  17. data/lib/ohai/plugins/groovy.rb +12 -12
  18. data/lib/ohai/plugins/hostname.rb +9 -2
  19. data/lib/ohai/plugins/linux/fips.rb +2 -9
  20. data/lib/ohai/plugins/linux/memory.rb +5 -0
  21. data/lib/ohai/plugins/linux/network.rb +1 -1
  22. data/lib/ohai/plugins/linux/platform.rb +84 -83
  23. data/lib/ohai/plugins/linux/systemd_paths.rb +0 -3
  24. data/lib/ohai/plugins/linux/virtualization.rb +10 -20
  25. data/lib/ohai/plugins/lua.rb +13 -13
  26. data/lib/ohai/plugins/mono.rb +23 -23
  27. data/lib/ohai/plugins/nodejs.rb +13 -13
  28. data/lib/ohai/plugins/openstack.rb +1 -1
  29. data/lib/ohai/plugins/packages.rb +1 -28
  30. data/lib/ohai/plugins/perl.rb +17 -17
  31. data/lib/ohai/plugins/php.rb +22 -22
  32. data/lib/ohai/plugins/powershell.rb +30 -30
  33. data/lib/ohai/plugins/ps.rb +1 -1
  34. data/lib/ohai/plugins/python.rb +15 -15
  35. data/lib/ohai/plugins/rust.rb +11 -11
  36. data/lib/ohai/plugins/solaris2/dmi.rb +48 -48
  37. data/lib/ohai/plugins/solaris2/virtualization.rb +8 -10
  38. data/lib/ohai/plugins/virtualbox.rb +21 -21
  39. data/lib/ohai/plugins/windows/filesystem.rb +2 -2
  40. data/lib/ohai/plugins/windows/fips.rb +2 -21
  41. data/lib/ohai/plugins/windows/virtualization.rb +9 -35
  42. data/lib/ohai/runner.rb +2 -2
  43. data/lib/ohai/system.rb +0 -17
  44. data/lib/ohai/version.rb +1 -1
  45. data/ohai.gemspec +2 -2
  46. data/spec/data/plugins/rpmquery.output +0 -2
  47. data/spec/functional/application_spec.rb +1 -1
  48. data/spec/functional/loader_spec.rb +2 -2
  49. data/spec/functional/plugins/powershell_spec.rb +2 -2
  50. data/spec/functional/plugins/root_group_spec.rb +1 -1
  51. data/spec/functional/plugins/windows/uptime_spec.rb +2 -2
  52. data/spec/ohai_spec.rb +1 -1
  53. data/spec/unit/application_spec.rb +1 -1
  54. data/spec/unit/config_spec.rb +1 -1
  55. data/spec/unit/dsl/plugin_spec.rb +1 -1
  56. data/spec/unit/hints_spec.rb +2 -2
  57. data/spec/unit/loader_spec.rb +12 -12
  58. data/spec/unit/mixin/azure_metadata_spec.rb +1 -1
  59. data/spec/unit/mixin/command_spec.rb +1 -1
  60. data/spec/unit/mixin/dmi_decode.rb +68 -0
  61. data/spec/unit/mixin/ec2_metadata_spec.rb +1 -1
  62. data/spec/unit/mixin/softlayer_metadata_spec.rb +1 -1
  63. data/spec/unit/plugin_config_spec.rb +1 -1
  64. data/spec/unit/plugins/abort_spec.rb +9 -9
  65. data/spec/unit/plugins/aix/cpu_spec.rb +4 -4
  66. data/spec/unit/plugins/aix/filesystem_spec.rb +5 -5
  67. data/spec/unit/plugins/aix/hostname_spec.rb +1 -1
  68. data/spec/unit/plugins/aix/kernel_spec.rb +1 -1
  69. data/spec/unit/plugins/aix/memory_spec.rb +1 -1
  70. data/spec/unit/plugins/aix/network_spec.rb +6 -6
  71. data/spec/unit/plugins/aix/platform_spec.rb +1 -1
  72. data/spec/unit/plugins/aix/uptime_spec.rb +1 -1
  73. data/spec/unit/plugins/aix/virtualization_spec.rb +2 -2
  74. data/spec/unit/plugins/azure_spec.rb +1 -1
  75. data/spec/unit/plugins/bsd/filesystem_spec.rb +4 -4
  76. data/spec/unit/plugins/bsd/virtualization_spec.rb +3 -3
  77. data/spec/unit/plugins/c_spec.rb +1 -53
  78. data/spec/unit/plugins/chef_spec.rb +1 -1
  79. data/spec/unit/plugins/cloud_spec.rb +1 -1
  80. data/spec/unit/plugins/darwin/cpu_spec.rb +2 -2
  81. data/spec/unit/plugins/darwin/filesystem_spec.rb +5 -5
  82. data/spec/unit/plugins/darwin/hardware_spec.rb +2 -2
  83. data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +3 -3
  84. data/spec/unit/plugins/darwin/hostname_spec.rb +1 -1
  85. data/spec/unit/plugins/darwin/kernel_spec.rb +1 -1
  86. data/spec/unit/plugins/darwin/memory_spec.rb +1 -1
  87. data/spec/unit/plugins/darwin/network_spec.rb +1 -1
  88. data/spec/unit/plugins/darwin/platform_spec.rb +1 -1
  89. data/spec/unit/plugins/darwin/virtualization_spec.rb +1 -1
  90. data/spec/unit/plugins/dmi_spec.rb +1 -1
  91. data/spec/unit/plugins/docker_spec.rb +1 -1
  92. data/spec/unit/plugins/ec2_spec.rb +1 -1
  93. data/spec/unit/plugins/elixir_spec.rb +1 -1
  94. data/spec/unit/plugins/erlang_spec.rb +1 -1
  95. data/spec/unit/plugins/eucalyptus_spec.rb +1 -1
  96. data/spec/unit/plugins/fail_spec.rb +28 -28
  97. data/spec/unit/plugins/freebsd/cpu_spec.rb +1 -1
  98. data/spec/unit/plugins/freebsd/hostname_spec.rb +1 -1
  99. data/spec/unit/plugins/freebsd/kernel_spec.rb +1 -1
  100. data/spec/unit/plugins/freebsd/platform_spec.rb +1 -1
  101. data/spec/unit/plugins/gce_spec.rb +1 -1
  102. data/spec/unit/plugins/go_spec.rb +1 -1
  103. data/spec/unit/plugins/groovy_spec.rb +1 -1
  104. data/spec/unit/plugins/haskell_spec.rb +1 -1
  105. data/spec/unit/plugins/hostname_spec.rb +68 -1
  106. data/spec/unit/plugins/init_package_spec.rb +1 -1
  107. data/spec/unit/plugins/java_spec.rb +1 -1
  108. data/spec/unit/plugins/joyent_spec.rb +3 -3
  109. data/spec/unit/plugins/kernel_spec.rb +1 -1
  110. data/spec/unit/plugins/linode_spec.rb +1 -1
  111. data/spec/unit/plugins/linux/block_device_spec.rb +1 -1
  112. data/spec/unit/plugins/linux/cpu_spec.rb +6 -6
  113. data/spec/unit/plugins/linux/filesystem_spec.rb +21 -21
  114. data/spec/unit/plugins/linux/fips_spec.rb +13 -45
  115. data/spec/unit/plugins/linux/hostname_spec.rb +1 -1
  116. data/spec/unit/plugins/linux/hostnamectl_spec.rb +2 -2
  117. data/spec/unit/plugins/linux/kernel_spec.rb +8 -8
  118. data/spec/unit/plugins/linux/lsb_spec.rb +3 -3
  119. data/spec/unit/plugins/linux/lspci_spec.rb +2 -2
  120. data/spec/unit/plugins/linux/machineid_spec.rb +1 -1
  121. data/spec/unit/plugins/linux/mdadm_spec.rb +2 -2
  122. data/spec/unit/plugins/linux/memory_spec.rb +26 -1
  123. data/spec/unit/plugins/linux/network_spec.rb +37 -37
  124. data/spec/unit/plugins/linux/platform_spec.rb +580 -837
  125. data/spec/unit/plugins/linux/sessions_spec.rb +2 -2
  126. data/spec/unit/plugins/linux/systemd_paths_spec.rb +1 -1
  127. data/spec/unit/plugins/linux/uptime_spec.rb +1 -1
  128. data/spec/unit/plugins/linux/virtualization_spec.rb +28 -227
  129. data/spec/unit/plugins/lua_spec.rb +1 -1
  130. data/spec/unit/plugins/mono_spec.rb +2 -2
  131. data/spec/unit/plugins/netbsd/hostname_spec.rb +1 -1
  132. data/spec/unit/plugins/netbsd/kernel_spec.rb +1 -1
  133. data/spec/unit/plugins/netbsd/platform_spec.rb +1 -1
  134. data/spec/unit/plugins/network_spec.rb +11 -11
  135. data/spec/unit/plugins/nodejs_spec.rb +1 -1
  136. data/spec/unit/plugins/ohai_spec.rb +1 -1
  137. data/spec/unit/plugins/ohai_time_spec.rb +1 -1
  138. data/spec/unit/plugins/openbsd/hostname_spec.rb +1 -1
  139. data/spec/unit/plugins/openbsd/kernel_spec.rb +1 -1
  140. data/spec/unit/plugins/openbsd/platform_spec.rb +1 -1
  141. data/spec/unit/plugins/openstack_spec.rb +8 -4
  142. data/spec/unit/plugins/os_spec.rb +1 -1
  143. data/spec/unit/plugins/packages_spec.rb +1 -21
  144. data/spec/unit/plugins/passwd_spec.rb +1 -1
  145. data/spec/unit/plugins/perl_spec.rb +1 -1
  146. data/spec/unit/plugins/php_spec.rb +6 -6
  147. data/spec/unit/plugins/platform_spec.rb +1 -1
  148. data/spec/unit/plugins/powershell_spec.rb +3 -3
  149. data/spec/unit/plugins/python_spec.rb +1 -1
  150. data/spec/unit/plugins/rackspace_spec.rb +2 -2
  151. data/spec/unit/plugins/root_group_spec.rb +1 -11
  152. data/spec/unit/plugins/ruby_spec.rb +1 -1
  153. data/spec/unit/plugins/rust_spec.rb +1 -1
  154. data/spec/unit/plugins/scala_spec.rb +1 -1
  155. data/spec/unit/plugins/scsi_spec.rb +2 -2
  156. data/spec/unit/plugins/shard_spec.rb +1 -1
  157. data/spec/unit/plugins/shells_spec.rb +1 -1
  158. data/spec/unit/plugins/softlayer_spec.rb +1 -1
  159. data/spec/unit/plugins/solaris2/cpu_spec.rb +3 -3
  160. data/spec/unit/plugins/solaris2/dmi_spec.rb +1 -1
  161. data/spec/unit/plugins/solaris2/filesystem.rb +4 -4
  162. data/spec/unit/plugins/solaris2/hostname_spec.rb +1 -1
  163. data/spec/unit/plugins/solaris2/kernel_spec.rb +1 -1
  164. data/spec/unit/plugins/solaris2/memory_spec.rb +1 -1
  165. data/spec/unit/plugins/solaris2/network_spec.rb +6 -6
  166. data/spec/unit/plugins/solaris2/platform_spec.rb +3 -3
  167. data/spec/unit/plugins/solaris2/virtualization_spec.rb +41 -69
  168. data/spec/unit/plugins/ssh_host_keys_spec.rb +3 -3
  169. data/spec/unit/plugins/sysconf_spec.rb +2 -2
  170. data/spec/unit/plugins/timezone_spec.rb +1 -1
  171. data/spec/unit/plugins/virtualbox_spec.rb +1 -1
  172. data/spec/unit/plugins/vmware_spec.rb +1 -1
  173. data/spec/unit/plugins/windows/cpu_spec.rb +1 -2
  174. data/spec/unit/plugins/windows/filesystem_spec.rb +2 -2
  175. data/spec/unit/plugins/windows/fips_spec.rb +17 -77
  176. data/spec/unit/plugins/windows/kernel_spec.rb +1 -1
  177. data/spec/unit/plugins/windows/memory_spec.rb +2 -2
  178. data/spec/unit/plugins/windows/network_spec.rb +1 -1
  179. data/spec/unit/plugins/windows/system_enclosure_spec.rb +1 -1
  180. data/spec/unit/plugins/windows/uptime_spec.rb +1 -1
  181. data/spec/unit/plugins/windows/virtualization_spec.rb +20 -238
  182. data/spec/unit/plugins/zpools_spec.rb +7 -7
  183. data/spec/unit/provides_map_spec.rb +1 -1
  184. data/spec/unit/runner_spec.rb +1 -1
  185. data/spec/unit/system_spec.rb +10 -77
  186. data/spec/unit/util/file_helper_spec.rb +1 -1
  187. data/spec/unit/util/ip_helper_spec.rb +1 -1
  188. metadata +6 -9
  189. data/lib/ohai/plugins/darwin/system_profiler.rb +0 -72
  190. data/lib/ohai/util/win32/group_helper.rb +0 -76
  191. data/spec/unit/plugins/darwin/system_profiler_output.rb +0 -79524
  192. data/spec/unit/plugins/darwin/system_profiler_spec.rb +0 -40
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  describe Ohai::System, "Linux hostname plugin" do
22
22
  before(:each) do
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  describe Ohai::System, "Linux hostnamectl plugin" do
22
22
  let(:plugin) { get_plugin("linux/hostnamectl") }
@@ -35,7 +35,7 @@ describe Ohai::System, "Linux hostnamectl plugin" do
35
35
  Operating System: Debian GNU/Linux 8 (jessie)
36
36
  Kernel: Linux 4.3.0-0.bpo.1-amd64
37
37
  Architecture: x86-64
38
- HOSTNAMECTL_OUT
38
+ HOSTNAMECTL_OUT
39
39
 
40
40
  allow(plugin).to receive(:which).with("hostnamectl").and_return("/bin/hostnamectl")
41
41
  allow(plugin).to receive(:shell_out).with("/bin/hostnamectl").and_return(mock_shell_out(0, hostnamectl_out, ""))
@@ -17,7 +17,7 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
- require_relative "../../../spec_helper.rb"
20
+ require "spec_helper"
21
21
 
22
22
  describe Ohai::System, "Linux kernel plugin" do
23
23
  before(:each) do
@@ -30,7 +30,7 @@ describe Ohai::System, "Linux kernel plugin" do
30
30
  serio_raw 13031 0
31
31
  virtio_balloon 13168 0
32
32
  floppy 55441 0
33
- ENV_LSMOD
33
+ ENV_LSMOD
34
34
  @version_module = {
35
35
  dm_crypt: "",
36
36
  psmouse: "",
@@ -42,13 +42,13 @@ ENV_LSMOD
42
42
  }
43
43
 
44
44
  @expected_result = {
45
- "dm_crypt" => { "size" => "22321", "refcount" => "0" },
46
- "psmouse" => { "size" => "81038", "refcount" => "0" },
47
- "acpiphp" => { "size" => "23314", "refcount" => "0" },
48
- "microcode" => { "size" => "18286", "refcount" => "0", "version" => "1.2.3" },
49
- "serio_raw" => { "size" => "13031", "refcount" => "0" },
45
+ "dm_crypt" => { "size" => "22321", "refcount" => "0" },
46
+ "psmouse" => { "size" => "81038", "refcount" => "0" },
47
+ "acpiphp" => { "size" => "23314", "refcount" => "0" },
48
+ "microcode" => { "size" => "18286", "refcount" => "0", "version" => "1.2.3" },
49
+ "serio_raw" => { "size" => "13031", "refcount" => "0" },
50
50
  "virtio_balloon" => { "size" => "13168", "refcount" => "0" },
51
- "floppy" => { "size" => "55441", "refcount" => "0" },
51
+ "floppy" => { "size" => "55441", "refcount" => "0" },
52
52
  }
53
53
  @plugin = get_plugin("kernel")
54
54
  allow(@plugin).to receive(:collect_os).and_return(:linux)
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  # We do not alter case for lsb attributes and consume them as provided
22
22
 
@@ -80,7 +80,7 @@ describe Ohai::System, "Linux lsb plugin" do
80
80
  Description: CentOS release 5.4 (Final)
81
81
  Release: 5.4
82
82
  Codename: Final
83
- LSB_RELEASE
83
+ LSB_RELEASE
84
84
  allow(@plugin).to receive(:shell_out).with("lsb_release -a").and_return(mock_shell_out(0, @stdout, ""))
85
85
  end
86
86
 
@@ -113,7 +113,7 @@ LSB_RELEASE
113
113
  Description: Fedora release 14 (Laughlin)
114
114
  Release: 14
115
115
  Codename: Laughlin
116
- LSB_RELEASE
116
+ LSB_RELEASE
117
117
  allow(@plugin).to receive(:shell_out).with("lsb_release -a").and_return(mock_shell_out(0, @stdout, ""))
118
118
  end
119
119
 
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  describe Ohai::System, "Linux lspci plugin" do
22
22
  let(:plugin) { get_plugin("linux/lspci") }
@@ -85,7 +85,7 @@ describe Ohai::System, "Linux lspci plugin" do
85
85
  Driver: nvme
86
86
  Module: nvme
87
87
  NUMANode: 0
88
- LSPCI
88
+ LSPCI
89
89
  allow(plugin).to receive(:shell_out).with("lspci -vnnmk").and_return(
90
90
  mock_shell_out(0, @stdout, ""))
91
91
  end
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  describe Ohai::System, "Machine id plugin" do
22
22
  let(:plugin) { get_plugin("linux/machineid") }
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require_relative "../../../spec_helper.rb"
19
+ require "spec_helper"
20
20
 
21
21
  describe Ohai::System, "Linux Mdadm Plugin" do
22
22
  before(:each) do
@@ -52,7 +52,7 @@ describe Ohai::System, "Linux Mdadm Plugin" do
52
52
  3 8 80 3 active sync /dev/sdf
53
53
  4 8 96 4 active sync /dev/sdg
54
54
  5 8 112 5 active sync /dev/sdh
55
- MD
55
+ MD
56
56
  @plugin = get_plugin("linux/mdadm")
57
57
  allow(@plugin).to receive(:collect_os).and_return(:linux)
58
58
  @double_file = double("/proc/mdstat")
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require_relative "../../../spec_helper.rb"
17
+ require "spec_helper"
18
18
 
19
19
  describe Ohai::System, "Linux memory plugin" do
20
20
  before(:each) do
@@ -56,6 +56,11 @@ describe Ohai::System, "Linux memory plugin" do
56
56
  .and_yield("HugePages_Rsvd: 11226")
57
57
  .and_yield("HugePages_Surp: 0")
58
58
  .and_yield("Hugepagesize: 2048 kB")
59
+ .and_yield("Hugetlb: 0 kB")
60
+ .and_yield("DirectMap4k: 3720736 kB")
61
+ .and_yield("DirectMap2M: 12795904 kB")
62
+ .and_yield("DirectMap1G: 0 kB")
63
+
59
64
  allow(File).to receive(:open).with("/proc/meminfo").and_return(@double_file)
60
65
  end
61
66
 
@@ -228,4 +233,24 @@ describe Ohai::System, "Linux memory plugin" do
228
233
  @plugin.run
229
234
  expect(@plugin[:memory][:hugepage_size]).to eql("2048kB")
230
235
  end
236
+
237
+ it "should get hugetlb memory" do
238
+ @plugin.run
239
+ expect(@plugin[:memory][:hugetlb]).to eql("0kB")
240
+ end
241
+
242
+ it "should get directmap 4k memory" do
243
+ @plugin.run
244
+ expect(@plugin[:memory][:directmap][:'4k']).to eql("3720736kB")
245
+ end
246
+
247
+ it "should get directmap 2M memory" do
248
+ @plugin.run
249
+ expect(@plugin[:memory][:directmap][:'2M']).to eql("12795904kB")
250
+ end
251
+
252
+ it "should get directmap 1G memory" do
253
+ @plugin.run
254
+ expect(@plugin[:memory][:directmap][:'1G']).to eql("0kB")
255
+ end
231
256
  end
@@ -17,7 +17,7 @@
17
17
  # limitations under the License.
18
18
  #
19
19
 
20
- require_relative "../../../spec_helper.rb"
20
+ require "spec_helper"
21
21
  require "ipaddress"
22
22
 
23
23
  describe Ohai::System, "Linux Network Plugin" do
@@ -141,7 +141,7 @@ describe Ohai::System, "Linux Network Plugin" do
141
141
  TX packets:2 errors:0 dropped:1 overruns:0 carrier:0
142
142
  collisions:0 txqueuelen:1000
143
143
  RX bytes:0 (0.0 B) TX bytes:140 (140.0 B)
144
- EOM
144
+ EOM
145
145
  # Note that ifconfig shows foo:veth0@eth0 but fails to show any address information.
146
146
  # This was not a mistake collecting the output and Apparently ifconfig is broken in this regard.
147
147
  end
@@ -155,7 +155,7 @@ EOM
155
155
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
156
156
  10.5.4.0/24 \\ nexthop via 10.5.4.1 dev eth0 weight 1\\ nexthop via 10.5.4.2 dev eth0 weight 1
157
157
  default via 10.116.201.1 dev eth0
158
- EOM
158
+ EOM
159
159
  end
160
160
 
161
161
  let(:linux_route_n) do
@@ -165,7 +165,7 @@ EOM
165
165
  10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
166
166
  169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
167
167
  0.0.0.0 10.116.201.1 0.0.0.0 UG 0 0 0 eth0
168
- EOM
168
+ EOM
169
169
  end
170
170
 
171
171
  let(:linux_ip_route_inet6) do
@@ -174,7 +174,7 @@ EOM
174
174
  fe80::/64 dev eth0.11 proto kernel metric 256
175
175
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
176
176
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
177
- EOM
177
+ EOM
178
178
  end
179
179
 
180
180
  let(:linux_ip_addr) do
@@ -238,7 +238,7 @@ EOM
238
238
  link/tunnel6 :: brd ::
239
239
  inet6 fe80::f47a:2aff:fef0:c6ef/64 scope link
240
240
  valid_lft forever preferred_lft forever
241
- EOM
241
+ EOM
242
242
  end
243
243
 
244
244
  let(:linux_ip_link_s_d) do
@@ -305,19 +305,19 @@ EOM
305
305
  0 0 0 0 0 0
306
306
  TX: bytes packets errors dropped carrier collsns
307
307
  0 0 0 0 0 0
308
- EOM
308
+ EOM
309
309
  end
310
310
 
311
311
  let(:linux_arp_an) do
312
312
  <<~EOM
313
313
  ? (10.116.201.1) at fe:ff:ff:ff:ff:ff [ether] on eth0
314
- EOM
314
+ EOM
315
315
  end
316
316
 
317
317
  let(:linux_ip_neighbor_show) do
318
318
  <<~EOM
319
319
  10.116.201.1 dev eth0 lladdr fe:ff:ff:ff:ff:ff REACHABLE
320
- EOM
320
+ EOM
321
321
  end
322
322
 
323
323
  let(:linux_ip_inet6_neighbor_show) do
@@ -325,7 +325,7 @@ EOM
325
325
  1111:2222:3333:4444::1 dev eth0.11 lladdr 00:1c:0e:12:34:56 router REACHABLE
326
326
  fe80::21c:eff:fe12:3456 dev eth0.11 lladdr 00:1c:0e:30:28:00 router REACHABLE
327
327
  fe80::21c:eff:fe12:3456 dev eth0.153 lladdr 00:1c:0e:30:28:00 router REACHABLE
328
- EOM
328
+ EOM
329
329
  end
330
330
 
331
331
  let(:linux_ethtool) do
@@ -351,7 +351,7 @@ EOM
351
351
  Current message level: 0x00000007 (7)
352
352
  drv probe link
353
353
  Link detected: yes
354
- EOM
354
+ EOM
355
355
  end
356
356
 
357
357
  let(:linux_ethtool_g) do
@@ -368,7 +368,7 @@ EOM
368
368
  RX Jumbo: 0
369
369
  TX: 8192
370
370
 
371
- EOM
371
+ EOM
372
372
  end
373
373
 
374
374
  before(:each) do
@@ -748,7 +748,7 @@ EOM
748
748
  <<~EOM
749
749
  10.116.201.0/24 dev eth0 proto kernel
750
750
  default dev eth0 scope link
751
- EOM
751
+ EOM
752
752
  end
753
753
 
754
754
  let(:linux_route_n) do
@@ -757,7 +757,7 @@ EOM
757
757
  Destination Gateway Genmask Flags Metric Ref Use Iface
758
758
  10.116.201.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
759
759
  0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
760
- EOM
760
+ EOM
761
761
  end
762
762
 
763
763
  before(:each) do
@@ -778,7 +778,7 @@ EOM
778
778
  <<~EOM
779
779
  192.168.0.0/24 dev eth0.11 proto kernel src 192.168.0.2
780
780
  default via 192.168.0.15 dev eth0.11
781
- EOM
781
+ EOM
782
782
  end
783
783
 
784
784
  let(:linux_route_n) do
@@ -787,7 +787,7 @@ EOM
787
787
  Destination Gateway Genmask Flags Metric Ref Use Iface
788
788
  192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.11
789
789
  0.0.0.0 192.168.0.15 0.0.0.0 UG 0 0 0 eth0.11
790
- EOM
790
+ EOM
791
791
  end
792
792
 
793
793
  before(:each) do
@@ -888,7 +888,7 @@ EOM
888
888
  fe80::/64 dev eth0 proto kernel metric 256
889
889
  fe80::/64 dev eth0.11 proto kernel metric 256
890
890
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 expires 86023sec
891
- EOM
891
+ EOM
892
892
  end
893
893
 
894
894
  before(:each) do
@@ -917,7 +917,7 @@ EOM
917
917
  172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
918
918
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
919
919
  default via 10.116.201.1 dev eth0 src 10.116.201.76
920
- EOM
920
+ EOM
921
921
  end
922
922
 
923
923
  let(:linux_ip_route_inet6) do
@@ -926,7 +926,7 @@ EOM
926
926
  fe80::/64 dev eth0.11 proto kernel metric 256
927
927
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024
928
928
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
929
- EOM
929
+ EOM
930
930
  end
931
931
 
932
932
  before(:each) do
@@ -957,7 +957,7 @@ EOM
957
957
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
958
958
  default via 10.116.201.1 dev eth0 metric 10
959
959
  default via 10.116.201.254 dev eth0 metric 9
960
- EOM
960
+ EOM
961
961
  end
962
962
 
963
963
  let(:linux_ip_route_inet6) do
@@ -967,7 +967,7 @@ EOM
967
967
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
968
968
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
969
969
  default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023
970
- EOM
970
+ EOM
971
971
  end
972
972
 
973
973
  before(:each) do
@@ -1000,7 +1000,7 @@ EOM
1000
1000
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1001
1001
  default via 10.116.201.1 dev eth0 metric 10
1002
1002
  default via 10.116.201.254 dev eth0 metric 9 src 10.116.201.74
1003
- EOM
1003
+ EOM
1004
1004
  end
1005
1005
 
1006
1006
  let(:linux_ip_route_inet6) do
@@ -1010,7 +1010,7 @@ EOM
1010
1010
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1011
1011
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1012
1012
  default via 1111:2222:3333:4444::ffff dev eth0.11 metric 1023 src 1111:2222:3333:4444::2
1013
- EOM
1013
+ EOM
1014
1014
  end
1015
1015
 
1016
1016
  before(:each) do
@@ -1040,7 +1040,7 @@ EOM
1040
1040
  172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1041
1041
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1042
1042
  default via 10.116.201.1 dev eth0
1043
- EOM
1043
+ EOM
1044
1044
  end
1045
1045
 
1046
1046
  let(:linux_ip_route_inet6) do
@@ -1049,7 +1049,7 @@ EOM
1049
1049
  fe80::/64 dev eth0.11 proto kernel metric 256
1050
1050
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1051
1051
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1052
- EOM
1052
+ EOM
1053
1053
  end
1054
1054
 
1055
1055
  it "completes the run" do
@@ -1089,7 +1089,7 @@ EOM
1089
1089
  <<~EOM
1090
1090
  10.118.19.1 dev tun0 proto kernel src 10.118.19.39
1091
1091
  default via 172.16.19.1 dev tun0
1092
- EOM
1092
+ EOM
1093
1093
  end
1094
1094
  let(:linux_ip_route_inet6) { "" }
1095
1095
 
@@ -1111,7 +1111,7 @@ EOM
1111
1111
  let(:linux_ip_route) do
1112
1112
  <<~EOM
1113
1113
  default dev venet0 scope link
1114
- EOM
1114
+ EOM
1115
1115
  end
1116
1116
 
1117
1117
  before(:each) do
@@ -1132,7 +1132,7 @@ EOM
1132
1132
  let(:linux_ip_route) do
1133
1133
  <<~EOM
1134
1134
  default dev eth3 scope link
1135
- EOM
1135
+ EOM
1136
1136
  end
1137
1137
 
1138
1138
  before(:each) do
@@ -1157,7 +1157,7 @@ EOM
1157
1157
  let(:linux_ip_route) do
1158
1158
  <<~EOM
1159
1159
  default dev fwdintf scope link src 2.2.2.2
1160
- EOM
1160
+ EOM
1161
1161
  end
1162
1162
 
1163
1163
  before(:each) do
@@ -1183,7 +1183,7 @@ EOM
1183
1183
  <<~EOM
1184
1184
  fe80::/64 dev eth0 proto kernel metric 256
1185
1185
  default via fe80::21c:eff:fe12:3456 dev eth0.153 src fe80::2e0:81ff:fe2b:48e7 metric 1024
1186
- EOM
1186
+ EOM
1187
1187
  end
1188
1188
  before(:each) do
1189
1189
  plugin.run
@@ -1208,7 +1208,7 @@ EOM
1208
1208
  192.168.212.0/24 dev foo:veth0@eth0 proto kernel src 192.168.212.2
1209
1209
  172.16.151.0/24 dev eth0 proto kernel src 172.16.151.100
1210
1210
  192.168.0.0/24 dev eth0 proto kernel src 192.168.0.2
1211
- EOM
1211
+ EOM
1212
1212
  end
1213
1213
 
1214
1214
  let(:linux_ip_route_inet6) do
@@ -1216,7 +1216,7 @@ EOM
1216
1216
  fe80::/64 dev eth0 proto kernel metric 256
1217
1217
  fe80::/64 dev eth0.11 proto kernel metric 256
1218
1218
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::3
1219
- EOM
1219
+ EOM
1220
1220
  end
1221
1221
 
1222
1222
  before(:each) do
@@ -1252,7 +1252,7 @@ EOM
1252
1252
  inet 10.116.201.76/24 brd 10.116.201.255 scope global venet0:0
1253
1253
  inet6 2001:44b8:4160:8f00:a00:27ff:fe13:eacd/64 scope global dynamic
1254
1254
  valid_lft 6128sec preferred_lft 2526sec
1255
- EOM
1255
+ EOM
1256
1256
  end
1257
1257
  # We don't have the corresponding ipv6 data for these tests
1258
1258
  let(:linux_ip_route_inet6) { "" }
@@ -1291,7 +1291,7 @@ EOM
1291
1291
  10.118.19.0/26 dev eth0 proto kernel src 10.118.19.39
1292
1292
  10.118.19.0/26 dev if5 proto kernel src 10.118.19.45
1293
1293
  default via 10.116.201.1 dev eth0 src 10.116.201.99
1294
- EOM
1294
+ EOM
1295
1295
  end
1296
1296
 
1297
1297
  let(:linux_ip_route_inet6) do
@@ -1300,7 +1300,7 @@ EOM
1300
1300
  fe80::/64 dev eth0.11 proto kernel metric 256
1301
1301
  1111:2222:3333:4444::/64 dev eth0.11 metric 1024 src 1111:2222:3333:4444::FFFF:2
1302
1302
  default via 1111:2222:3333:4444::1 dev eth0.11 metric 1024
1303
- EOM
1303
+ EOM
1304
1304
  end
1305
1305
 
1306
1306
  before(:each) do
@@ -1332,7 +1332,7 @@ EOM
1332
1332
  let(:linux_ip_route) do
1333
1333
  <<~EOM
1334
1334
  192.168.122.0/24 dev virbr0 proto kernel src 192.168.122.1
1335
- EOM
1335
+ EOM
1336
1336
  end
1337
1337
 
1338
1338
  it "logs a message and skips previously unseen interfaces in 'ip route show'" do
@@ -1376,7 +1376,7 @@ EOM
1376
1376
  1392844460 2659966 0 0 0 0
1377
1377
  TX: bytes packets errors dropped carrier collsns
1378
1378
  691785313 1919690 0 0 0 0
1379
- EOM
1379
+ EOM
1380
1380
  end
1381
1381
 
1382
1382
  it "adds the vlan information of an interface" do