ohai 6.24.2 → 7.0.0.rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. data/lib/ohai.rb +1 -1
  2. data/lib/ohai/application.rb +5 -12
  3. data/lib/ohai/common/dmi.rb +126 -0
  4. data/lib/ohai/config.rb +9 -9
  5. data/lib/ohai/{plugins/darwin/hostname.rb → dsl.rb} +7 -7
  6. data/lib/ohai/dsl/plugin.rb +186 -0
  7. data/lib/ohai/dsl/plugin/versionvi.rb +62 -0
  8. data/lib/ohai/dsl/plugin/versionvii.rb +106 -0
  9. data/lib/ohai/exception.rb +11 -2
  10. data/lib/ohai/hints.rb +48 -0
  11. data/lib/ohai/loader.rb +205 -0
  12. data/lib/ohai/mixin/command.rb +14 -18
  13. data/lib/ohai/mixin/constant_helper.rb +53 -0
  14. data/lib/ohai/mixin/gce_metadata.rb +0 -2
  15. data/lib/ohai/{plugins/freebsd/uptime.rb → mixin/network_constants.rb} +15 -13
  16. data/lib/ohai/mixin/os.rb +59 -0
  17. data/lib/ohai/mixin/seconds_to_human.rb +48 -0
  18. data/lib/ohai/plugins/aix/cpu.rb +26 -22
  19. data/lib/ohai/plugins/aix/filesystem.rb +47 -48
  20. data/lib/ohai/plugins/aix/kernel.rb +11 -7
  21. data/lib/ohai/plugins/aix/memory.rb +8 -4
  22. data/lib/ohai/plugins/aix/network.rb +73 -82
  23. data/lib/ohai/plugins/aix/platform.rb +9 -6
  24. data/lib/ohai/plugins/aix/uptime.rb +14 -12
  25. data/lib/ohai/plugins/azure.rb +33 -11
  26. data/lib/ohai/plugins/c.rb +103 -78
  27. data/lib/ohai/plugins/chef.rb +20 -8
  28. data/lib/ohai/plugins/cloud.rb +234 -230
  29. data/lib/ohai/plugins/command.rb +6 -2
  30. data/lib/ohai/plugins/darwin/cpu.rb +10 -4
  31. data/lib/ohai/plugins/darwin/filesystem.rb +32 -32
  32. data/lib/ohai/plugins/darwin/network.rb +157 -154
  33. data/lib/ohai/plugins/darwin/platform.rb +18 -16
  34. data/lib/ohai/plugins/darwin/system_profiler.rb +49 -46
  35. data/lib/ohai/plugins/dmi.rb +102 -102
  36. data/lib/ohai/plugins/ec2.rb +30 -28
  37. data/lib/ohai/plugins/erlang.rb +19 -16
  38. data/lib/ohai/plugins/eucalyptus.rb +37 -36
  39. data/lib/ohai/plugins/freebsd/cpu.rb +34 -29
  40. data/lib/ohai/plugins/freebsd/filesystem.rb +32 -32
  41. data/lib/ohai/plugins/freebsd/memory.rb +35 -25
  42. data/lib/ohai/plugins/freebsd/network.rb +94 -89
  43. data/lib/ohai/plugins/freebsd/platform.rb +10 -4
  44. data/lib/ohai/plugins/freebsd/virtualization.rb +62 -61
  45. data/lib/ohai/plugins/gce.rb +30 -36
  46. data/lib/ohai/plugins/groovy.rb +14 -11
  47. data/lib/ohai/plugins/hostname.rb +132 -10
  48. data/lib/ohai/plugins/ip_scopes.rb +31 -16
  49. data/lib/ohai/plugins/java.rb +45 -21
  50. data/lib/ohai/plugins/kernel.rb +186 -19
  51. data/lib/ohai/plugins/keys.rb +6 -2
  52. data/lib/ohai/plugins/languages.rb +6 -2
  53. data/lib/ohai/plugins/linode.rb +38 -30
  54. data/lib/ohai/plugins/linux/block_device.rb +19 -15
  55. data/lib/ohai/plugins/linux/cpu.rb +42 -38
  56. data/lib/ohai/plugins/linux/filesystem.rb +70 -130
  57. data/lib/ohai/plugins/linux/lsb.rb +35 -35
  58. data/lib/ohai/plugins/linux/memory.rb +65 -61
  59. data/lib/ohai/plugins/linux/network.rb +343 -362
  60. data/lib/ohai/plugins/linux/platform.rb +90 -88
  61. data/lib/ohai/plugins/linux/virtualization.rb +95 -90
  62. data/lib/ohai/plugins/lua.rb +14 -10
  63. data/lib/ohai/plugins/mono.rb +17 -13
  64. data/lib/ohai/plugins/netbsd/cpu.rb +25 -23
  65. data/lib/ohai/plugins/netbsd/filesystem.rb +32 -32
  66. data/lib/ohai/plugins/netbsd/memory.rb +59 -59
  67. data/lib/ohai/plugins/netbsd/network.rb +92 -88
  68. data/lib/ohai/plugins/netbsd/platform.rb +10 -3
  69. data/lib/ohai/plugins/netbsd/virtualization.rb +41 -38
  70. data/lib/ohai/plugins/network.rb +131 -130
  71. data/lib/ohai/plugins/network_listeners.rb +26 -22
  72. data/lib/ohai/plugins/nodejs.rb +14 -10
  73. data/lib/ohai/plugins/ohai.rb +11 -6
  74. data/lib/ohai/plugins/ohai_time.rb +6 -2
  75. data/lib/ohai/plugins/openbsd/cpu.rb +20 -15
  76. data/lib/ohai/plugins/openbsd/filesystem.rb +32 -32
  77. data/lib/ohai/plugins/openbsd/memory.rb +59 -59
  78. data/lib/ohai/plugins/openbsd/network.rb +92 -88
  79. data/lib/ohai/plugins/openbsd/platform.rb +10 -4
  80. data/lib/ohai/plugins/openbsd/virtualization.rb +41 -39
  81. data/lib/ohai/plugins/openstack.rb +23 -21
  82. data/lib/ohai/plugins/os.rb +8 -32
  83. data/lib/ohai/plugins/passwd.rb +27 -22
  84. data/lib/ohai/plugins/perl.rb +21 -16
  85. data/lib/ohai/plugins/php.rb +15 -12
  86. data/lib/ohai/plugins/platform.rb +9 -9
  87. data/lib/ohai/plugins/{linux/kernel.rb → ps.rb} +13 -12
  88. data/lib/ohai/plugins/python.rb +16 -12
  89. data/lib/ohai/plugins/rackspace.rb +82 -77
  90. data/lib/ohai/plugins/root_group.rb +13 -9
  91. data/lib/ohai/plugins/ruby.rb +50 -48
  92. data/lib/ohai/plugins/sigar/cpu.rb +21 -17
  93. data/lib/ohai/plugins/sigar/filesystem.rb +26 -23
  94. data/lib/ohai/plugins/sigar/memory.rb +17 -14
  95. data/lib/ohai/plugins/sigar/network.rb +133 -67
  96. data/lib/ohai/plugins/sigar/network_route.rb +33 -28
  97. data/lib/ohai/plugins/sigar/platform.rb +10 -6
  98. data/lib/ohai/plugins/solaris2/cpu.rb +41 -33
  99. data/lib/ohai/plugins/solaris2/dmi.rb +146 -146
  100. data/lib/ohai/plugins/solaris2/filesystem.rb +74 -77
  101. data/lib/ohai/plugins/{aix/hostname.rb → solaris2/memory.rb} +7 -4
  102. data/lib/ohai/plugins/solaris2/network.rb +91 -86
  103. data/lib/ohai/plugins/solaris2/platform.rb +40 -36
  104. data/lib/ohai/plugins/solaris2/virtualization.rb +54 -59
  105. data/lib/ohai/plugins/solaris2/zpools.rb +38 -38
  106. data/lib/ohai/plugins/ssh_host_key.rb +49 -45
  107. data/lib/ohai/plugins/uptime.rb +87 -25
  108. data/lib/ohai/plugins/virtualization.rb +59 -55
  109. data/lib/ohai/plugins/windows/cpu.rb +44 -40
  110. data/lib/ohai/plugins/windows/filesystem.rb +28 -22
  111. data/lib/ohai/plugins/windows/network.rb +88 -79
  112. data/lib/ohai/plugins/windows/platform.rb +10 -3
  113. data/lib/ohai/provides_map.rb +184 -0
  114. data/lib/ohai/runner.rb +109 -0
  115. data/lib/ohai/system.rb +103 -184
  116. data/lib/ohai/version.rb +4 -3
  117. data/spec/data/plugins/___lib64___libc.so.6.output +135 -0
  118. data/spec/data/plugins/___lib___libc.so.6.output +135 -0
  119. data/spec/data/plugins/cc.output +135 -0
  120. data/spec/data/plugins/cl.output +135 -0
  121. data/spec/data/plugins/devenv.com.output +135 -0
  122. data/spec/data/plugins/env.output +71 -0
  123. data/spec/data/plugins/erl.output +144 -0
  124. data/spec/data/plugins/gcc.output +135 -0
  125. data/spec/data/plugins/groovy.output +159 -0
  126. data/spec/data/plugins/java.output +143 -0
  127. data/spec/data/plugins/lua.output +143 -0
  128. data/spec/data/plugins/messages.rb +8 -0
  129. data/spec/data/plugins/node.output +143 -0
  130. data/spec/data/plugins/perl.output +143 -0
  131. data/spec/data/plugins/php.output +143 -0
  132. data/spec/data/plugins/python.output +143 -0
  133. data/spec/data/plugins/uname.output +71 -0
  134. data/spec/data/plugins/v6message.rb +2 -0
  135. data/spec/data/plugins/v7message.rb +7 -0
  136. data/spec/data/plugins/what.output +135 -0
  137. data/spec/data/plugins/xlc.output +135 -0
  138. data/spec/spec_helper.rb +52 -18
  139. data/spec/support/integration_helper.rb +44 -0
  140. data/spec/unit/dsl/plugin_spec.rb +298 -0
  141. data/spec/unit/hints_spec.rb +65 -0
  142. data/spec/unit/loader_spec.rb +226 -0
  143. data/spec/unit/mixin/ec2_metadata_spec.rb +9 -9
  144. data/spec/unit/plugins/aix/cpu_spec.rb +17 -18
  145. data/spec/unit/plugins/aix/filesystem_spec.rb +20 -18
  146. data/spec/unit/plugins/aix/hostname_spec.rb +8 -4
  147. data/spec/unit/plugins/aix/kernel_spec.rb +13 -12
  148. data/spec/unit/plugins/aix/network_spec.rb +66 -45
  149. data/spec/unit/plugins/aix/platform_spec.rb +11 -10
  150. data/spec/unit/plugins/aix/uptime_spec.rb +7 -8
  151. data/spec/unit/plugins/azure_spec.rb +20 -21
  152. data/spec/unit/plugins/c_spec.rb +88 -87
  153. data/spec/unit/plugins/chef_spec.rb +5 -6
  154. data/spec/unit/plugins/cloud_spec.rb +81 -82
  155. data/spec/unit/plugins/darwin/cpu_spec.rb +8 -9
  156. data/spec/unit/plugins/darwin/hostname_spec.rb +23 -11
  157. data/spec/unit/plugins/darwin/kernel_spec.rb +39 -16
  158. data/spec/unit/plugins/darwin/network_spec.rb +375 -378
  159. data/spec/unit/plugins/darwin/platform_spec.rb +23 -50
  160. data/spec/unit/plugins/darwin/system_profiler_spec.rb +7 -8
  161. data/spec/unit/plugins/dmi_spec.rb +7 -12
  162. data/spec/unit/plugins/ec2_spec.rb +70 -59
  163. data/spec/unit/plugins/erlang_spec.rb +18 -20
  164. data/spec/unit/plugins/eucalyptus_spec.rb +37 -33
  165. data/spec/unit/plugins/fail_spec.rb +276 -23
  166. data/spec/unit/plugins/freebsd/hostname_spec.rb +11 -9
  167. data/spec/unit/plugins/freebsd/kernel_spec.rb +8 -8
  168. data/spec/unit/plugins/freebsd/platform_spec.rb +9 -10
  169. data/spec/unit/plugins/freebsd/virtualization_spec.rb +32 -32
  170. data/spec/unit/plugins/gce_spec.rb +19 -25
  171. data/spec/unit/plugins/groovy_spec.rb +10 -16
  172. data/spec/unit/plugins/hostname_spec.rb +45 -20
  173. data/spec/unit/plugins/ip_scopes_spec.rb +97 -0
  174. data/spec/unit/plugins/java_spec.rb +145 -99
  175. data/spec/unit/plugins/kernel_spec.rb +51 -15
  176. data/spec/unit/plugins/linode_spec.rb +31 -29
  177. data/spec/unit/plugins/linux/cpu_spec.rb +42 -43
  178. data/spec/unit/plugins/linux/filesystem_spec.rb +143 -324
  179. data/spec/unit/plugins/linux/hostname_spec.rb +16 -23
  180. data/spec/unit/plugins/linux/kernel_spec.rb +22 -8
  181. data/spec/unit/plugins/linux/lsb_spec.rb +54 -56
  182. data/spec/unit/plugins/linux/network_spec.rb +196 -238
  183. data/spec/unit/plugins/linux/platform_spec.rb +186 -205
  184. data/spec/unit/plugins/linux/uptime_spec.rb +13 -25
  185. data/spec/unit/plugins/linux/virtualization_spec.rb +149 -129
  186. data/spec/unit/plugins/lua_spec.rb +12 -15
  187. data/spec/unit/plugins/mono_spec.rb +10 -15
  188. data/spec/unit/plugins/netbsd/hostname_spec.rb +17 -7
  189. data/spec/unit/plugins/netbsd/kernel_spec.rb +8 -8
  190. data/spec/unit/plugins/netbsd/platform_spec.rb +8 -10
  191. data/spec/unit/plugins/network_spec.rb +358 -235
  192. data/spec/unit/plugins/nodejs_spec.rb +13 -15
  193. data/spec/unit/plugins/ohai_spec.rb +3 -4
  194. data/spec/unit/plugins/ohai_time_spec.rb +8 -9
  195. data/spec/unit/plugins/openbsd/hostname_spec.rb +21 -11
  196. data/spec/unit/plugins/openbsd/kernel_spec.rb +8 -8
  197. data/spec/unit/plugins/openbsd/platform_spec.rb +6 -12
  198. data/spec/unit/plugins/openstack_spec.rb +214 -0
  199. data/spec/unit/plugins/os_spec.rb +13 -16
  200. data/spec/unit/plugins/passwd_spec.rb +12 -13
  201. data/spec/unit/plugins/perl_spec.rb +20 -44
  202. data/spec/unit/plugins/php_spec.rb +20 -15
  203. data/spec/unit/plugins/platform_spec.rb +24 -29
  204. data/spec/unit/plugins/python_spec.rb +13 -17
  205. data/spec/unit/plugins/rackspace_spec.rb +90 -57
  206. data/spec/unit/plugins/root_group_spec.rb +17 -19
  207. data/spec/unit/plugins/ruby_spec.rb +15 -16
  208. data/spec/unit/plugins/sigar/network_route_spec.rb +12 -13
  209. data/spec/unit/plugins/solaris2/cpu_spec.rb +82 -0
  210. data/spec/unit/plugins/solaris2/hostname_spec.rb +12 -13
  211. data/spec/unit/plugins/solaris2/kernel_spec.rb +11 -15
  212. data/{lib/ohai/plugins/openbsd/uptime.rb → spec/unit/plugins/solaris2/memory_spec.rb} +10 -12
  213. data/spec/unit/plugins/solaris2/network_spec.rb +44 -20
  214. data/spec/unit/plugins/solaris2/platform_spec.rb +13 -22
  215. data/spec/unit/plugins/solaris2/virtualization_spec.rb +37 -45
  216. data/spec/unit/plugins/ssh_host_keys_spec.rb +11 -15
  217. data/spec/unit/provides_map_spec.rb +208 -0
  218. data/spec/unit/runner_spec.rb +488 -0
  219. data/spec/unit/system_spec.rb +639 -104
  220. metadata +151 -87
  221. checksums.yaml +0 -7
  222. data/lib/ohai/mixin/from_file.rb +0 -36
  223. data/lib/ohai/plugins/aix/ps.rb +0 -23
  224. data/lib/ohai/plugins/darwin/kernel.rb +0 -37
  225. data/lib/ohai/plugins/darwin/ps.rb +0 -23
  226. data/lib/ohai/plugins/darwin/uptime.rb +0 -32
  227. data/lib/ohai/plugins/dmi_common.rb +0 -121
  228. data/lib/ohai/plugins/freebsd/hostname.rb +0 -22
  229. data/lib/ohai/plugins/freebsd/kernel.rb +0 -37
  230. data/lib/ohai/plugins/freebsd/ps.rb +0 -24
  231. data/lib/ohai/plugins/hpux/cpu.rb +0 -19
  232. data/lib/ohai/plugins/hpux/filesystem.rb +0 -19
  233. data/lib/ohai/plugins/hpux/hostname.rb +0 -19
  234. data/lib/ohai/plugins/hpux/memory.rb +0 -19
  235. data/lib/ohai/plugins/hpux/network.rb +0 -19
  236. data/lib/ohai/plugins/hpux/platform.rb +0 -19
  237. data/lib/ohai/plugins/hpux/ps.rb +0 -23
  238. data/lib/ohai/plugins/hpux/uptime.rb +0 -19
  239. data/lib/ohai/plugins/linux/hostname.rb +0 -40
  240. data/lib/ohai/plugins/linux/ps.rb +0 -23
  241. data/lib/ohai/plugins/linux/uptime.rb +0 -28
  242. data/lib/ohai/plugins/netbsd/hostname.rb +0 -22
  243. data/lib/ohai/plugins/netbsd/kernel.rb +0 -35
  244. data/lib/ohai/plugins/netbsd/ps.rb +0 -24
  245. data/lib/ohai/plugins/netbsd/uptime.rb +0 -31
  246. data/lib/ohai/plugins/openbsd/hostname.rb +0 -22
  247. data/lib/ohai/plugins/openbsd/kernel.rb +0 -35
  248. data/lib/ohai/plugins/openbsd/ps.rb +0 -24
  249. data/lib/ohai/plugins/sigar/hostname.rb +0 -28
  250. data/lib/ohai/plugins/sigar/uptime.rb +0 -27
  251. data/lib/ohai/plugins/solaris2/hostname.rb +0 -34
  252. data/lib/ohai/plugins/solaris2/kernel.rb +0 -40
  253. data/lib/ohai/plugins/solaris2/ps.rb +0 -23
  254. data/lib/ohai/plugins/solaris2/uptime.rb +0 -36
  255. data/lib/ohai/plugins/windows/hostname.rb +0 -33
  256. data/lib/ohai/plugins/windows/kernel.rb +0 -58
  257. data/lib/ohai/plugins/windows/kernel_devices.rb +0 -39
  258. data/lib/ohai/plugins/windows/uptime.rb +0 -23
  259. data/spec/unit/mixin/from_file_spec.rb +0 -53
@@ -18,189 +18,188 @@
18
18
  require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb')
19
19
 
20
20
  describe Ohai::System, "plugin cloud" do
21
- before do
22
- @ohai = Ohai::System.new
23
- @ohai.stub!(:require_plugin).and_return(true)
21
+ before(:each) do
22
+ @plugin = get_plugin("cloud")
24
23
  end
25
24
 
26
25
  describe "with no cloud mashes" do
27
26
  it "doesn't populate the cloud data" do
28
- @ohai[:ec2] = nil
29
- @ohai[:rackspace] = nil
30
- @ohai[:eucalyptus] = nil
31
- @ohai[:linode] = nil
32
- @ohai[:azure] = nil
33
- @ohai._require_plugin("cloud")
34
- @ohai[:cloud].should be_nil
27
+ @plugin[:ec2] = nil
28
+ @plugin[:rackspace] = nil
29
+ @plugin[:eucalyptus] = nil
30
+ @plugin[:linode] = nil
31
+ @plugin[:azure] = nil
32
+ @plugin.run
33
+ @plugin[:cloud].should be_nil
35
34
  end
36
35
  end
37
36
 
38
37
  describe "with EC2 mash" do
39
38
  before do
40
- @ohai[:ec2] = Mash.new()
39
+ @plugin[:ec2] = Mash.new()
41
40
  end
42
41
 
43
42
  it "populates cloud public ip" do
44
- @ohai[:ec2]['public_ipv4'] = "174.129.150.8"
45
- @ohai._require_plugin("cloud")
46
- @ohai[:cloud][:public_ips][0].should == @ohai[:ec2]['public_ipv4']
43
+ @plugin[:ec2]['public_ipv4'] = "174.129.150.8"
44
+ @plugin.run
45
+ @plugin[:cloud][:public_ips][0].should == @plugin[:ec2]['public_ipv4']
47
46
  end
48
47
 
49
48
  it "populates cloud private ip" do
50
- @ohai[:ec2]['local_ipv4'] = "10.252.42.149"
51
- @ohai._require_plugin("cloud")
52
- @ohai[:cloud][:private_ips][0].should == @ohai[:ec2]['local_ipv4']
49
+ @plugin[:ec2]['local_ipv4'] = "10.252.42.149"
50
+ @plugin.run
51
+ @plugin[:cloud][:private_ips][0].should == @plugin[:ec2]['local_ipv4']
53
52
  end
54
53
 
55
54
  it "populates cloud provider" do
56
- @ohai._require_plugin("cloud")
57
- @ohai[:cloud][:provider].should == "ec2"
55
+ @plugin.run
56
+ @plugin[:cloud][:provider].should == "ec2"
58
57
  end
59
58
  end
60
59
 
61
60
  describe "with rackspace" do
62
61
  before do
63
- @ohai[:rackspace] = Mash.new()
62
+ @plugin[:rackspace] = Mash.new()
64
63
  end
65
64
 
66
65
  it "populates cloud public ip" do
67
- @ohai[:rackspace][:public_ipv4] = "174.129.150.8"
68
- @ohai._require_plugin("cloud")
69
- @ohai[:cloud][:public_ipv4].should == @ohai[:rackspace][:public_ipv4]
66
+ @plugin[:rackspace][:public_ipv4] = "174.129.150.8"
67
+ @plugin.run
68
+ @plugin[:cloud][:public_ipv4].should == @plugin[:rackspace][:public_ipv4]
70
69
  end
71
70
 
72
71
  it "populates cloud public ipv6" do
73
- @ohai[:rackspace][:public_ipv6] = "2a00:1a48:7805:111:e875:efaf:ff08:75"
74
- @ohai._require_plugin("cloud")
75
- @ohai[:cloud][:public_ipv6].should == @ohai[:rackspace][:public_ipv6]
72
+ @plugin[:rackspace][:public_ipv6] = "2a00:1a48:7805:111:e875:efaf:ff08:75"
73
+ @plugin.run
74
+ @plugin[:cloud][:public_ipv6].should == @plugin[:rackspace][:public_ipv6]
76
75
  end
77
76
 
78
77
  it "populates cloud private ip" do
79
- @ohai[:rackspace][:local_ipv4] = "10.252.42.149"
80
- @ohai._require_plugin("cloud")
81
- @ohai[:cloud][:local_ipv4].should == @ohai[:rackspace][:local_ipv4]
78
+ @plugin[:rackspace][:local_ipv4] = "10.252.42.149"
79
+ @plugin.run
80
+ @plugin[:cloud][:local_ipv4].should == @plugin[:rackspace][:local_ipv4]
82
81
  end
83
82
 
84
83
  it "populates cloud private ipv6" do
85
- @ohai[:rackspace][:local_ipv6] = "2a00:1a48:7805:111:e875:efaf:ff08:75"
86
- @ohai._require_plugin("cloud")
87
- @ohai[:cloud][:local_ipv6].should == @ohai[:rackspace][:local_ipv6]
84
+ @plugin[:rackspace][:local_ipv6] = "2a00:1a48:7805:111:e875:efaf:ff08:75"
85
+ @plugin.run
86
+ @plugin[:cloud][:local_ipv6].should == @plugin[:rackspace][:local_ipv6]
88
87
  end
89
88
 
90
89
  it "populates first cloud public ip" do
91
- @ohai[:rackspace][:public_ipv4] = "174.129.150.8"
92
- @ohai._require_plugin("cloud")
93
- @ohai[:cloud][:public_ips].first.should == @ohai[:rackspace][:public_ipv4]
90
+ @plugin[:rackspace][:public_ipv4] = "174.129.150.8"
91
+ @plugin.run
92
+ @plugin[:cloud][:public_ips].first.should == @plugin[:rackspace][:public_ipv4]
94
93
  end
95
94
 
96
95
  it "populates first cloud public ip" do
97
- @ohai[:rackspace][:local_ipv4] = "174.129.150.8"
98
- @ohai._require_plugin("cloud")
99
- @ohai[:cloud][:private_ips].first.should == @ohai[:rackspace][:local_ipv4]
96
+ @plugin[:rackspace][:local_ipv4] = "174.129.150.8"
97
+ @plugin.run
98
+ @plugin[:cloud][:private_ips].first.should == @plugin[:rackspace][:local_ipv4]
100
99
  end
101
100
 
102
101
  it "populates cloud provider" do
103
- @ohai._require_plugin("cloud")
104
- @ohai[:cloud][:provider].should == "rackspace"
102
+ @plugin.run
103
+ @plugin[:cloud][:provider].should == "rackspace"
105
104
  end
106
105
  end
107
106
 
108
107
  describe "with linode mash" do
109
108
  before do
110
- @ohai[:linode] = Mash.new()
109
+ @plugin[:linode] = Mash.new()
111
110
  end
112
111
 
113
112
  it "populates cloud public ip" do
114
- @ohai[:linode]['public_ip'] = "174.129.150.8"
115
- @ohai._require_plugin("cloud")
116
- @ohai[:cloud][:public_ips][0].should == @ohai[:linode][:public_ip]
113
+ @plugin[:linode]['public_ip'] = "174.129.150.8"
114
+ @plugin.run
115
+ @plugin[:cloud][:public_ips][0].should == @plugin[:linode][:public_ip]
117
116
  end
118
117
 
119
118
  it "populates cloud private ip" do
120
- @ohai[:linode]['private_ip'] = "10.252.42.149"
121
- @ohai._require_plugin("cloud")
122
- @ohai[:cloud][:private_ips][0].should == @ohai[:linode][:private_ip]
119
+ @plugin[:linode]['private_ip'] = "10.252.42.149"
120
+ @plugin.run
121
+ @plugin[:cloud][:private_ips][0].should == @plugin[:linode][:private_ip]
123
122
  end
124
123
 
125
124
  it "populates first cloud public ip" do
126
- @ohai[:linode]['public_ip'] = "174.129.150.8"
127
- @ohai._require_plugin("cloud")
128
- @ohai[:cloud][:public_ips].first.should == @ohai[:linode][:public_ip]
125
+ @plugin[:linode]['public_ip'] = "174.129.150.8"
126
+ @plugin.run
127
+ @plugin[:cloud][:public_ips].first.should == @plugin[:linode][:public_ip]
129
128
  end
130
129
 
131
130
  it "populates cloud provider" do
132
- @ohai._require_plugin("cloud")
133
- @ohai[:cloud][:provider].should == "linode"
131
+ @plugin.run
132
+ @plugin[:cloud][:provider].should == "linode"
134
133
  end
135
134
  end
136
135
 
137
136
  describe "with eucalyptus mash" do
138
137
  before do
139
- @ohai[:eucalyptus] = Mash.new()
138
+ @plugin[:eucalyptus] = Mash.new()
140
139
  end
141
140
 
142
141
  it "populates cloud public ip" do
143
- @ohai[:eucalyptus]['public_ipv4'] = "174.129.150.8"
144
- @ohai._require_plugin("cloud")
145
- @ohai[:cloud][:public_ips][0].should == @ohai[:eucalyptus]['public_ipv4']
142
+ @plugin[:eucalyptus]['public_ipv4'] = "174.129.150.8"
143
+ @plugin.run
144
+ @plugin[:cloud][:public_ips][0].should == @plugin[:eucalyptus]['public_ipv4']
146
145
  end
147
146
 
148
147
  it "populates cloud private ip" do
149
- @ohai[:eucalyptus]['local_ipv4'] = "10.252.42.149"
150
- @ohai._require_plugin("cloud")
151
- @ohai[:cloud][:private_ips][0].should == @ohai[:eucalyptus]['local_ipv4']
148
+ @plugin[:eucalyptus]['local_ipv4'] = "10.252.42.149"
149
+ @plugin.run
150
+ @plugin[:cloud][:private_ips][0].should == @plugin[:eucalyptus]['local_ipv4']
152
151
  end
153
152
 
154
153
  it "populates cloud provider" do
155
- @ohai._require_plugin("cloud")
156
- @ohai[:cloud][:provider].should == "eucalyptus"
154
+ @plugin.run
155
+ @plugin[:cloud][:provider].should == "eucalyptus"
157
156
  end
158
157
  end
159
158
 
160
159
  describe "with Azure mash" do
161
160
  before do
162
- @ohai[:azure] = Mash.new()
161
+ @plugin[:azure] = Mash.new()
163
162
  end
164
163
 
165
164
  it "populates cloud public ip" do
166
- @ohai[:azure]['public_ip'] = "174.129.150.8"
167
- @ohai._require_plugin("cloud")
168
- @ohai[:cloud][:public_ips][0].should == @ohai[:azure]['public_ip']
165
+ @plugin[:azure]['public_ip'] = "174.129.150.8"
166
+ @plugin.run
167
+ @plugin[:cloud][:public_ips][0].should == @plugin[:azure]['public_ip']
169
168
  end
170
169
 
171
170
  it "populates cloud vm_name" do
172
- @ohai[:azure]['vm_name'] = "linux-vm"
173
- @ohai._require_plugin("cloud")
174
- @ohai[:cloud][:vm_name].should == @ohai[:azure]['vm_name']
171
+ @plugin[:azure]['vm_name'] = "linux-vm"
172
+ @plugin.run
173
+ @plugin[:cloud][:vm_name].should == @plugin[:azure]['vm_name']
175
174
  end
176
175
 
177
176
  it "populates cloud public_fqdn" do
178
- @ohai[:azure]['public_fqdn'] = "linux-vm-svc.cloudapp.net"
179
- @ohai._require_plugin("cloud")
180
- @ohai[:cloud][:public_fqdn].should == @ohai[:azure]['public_fqdn']
177
+ @plugin[:azure]['public_fqdn'] = "linux-vm-svc.cloudapp.net"
178
+ @plugin.run
179
+ @plugin[:cloud][:public_fqdn].should == @plugin[:azure]['public_fqdn']
181
180
  end
182
181
 
183
182
  it "populates cloud public_ssh_port" do
184
- @ohai[:azure]['public_ssh_port'] = "22"
185
- @ohai._require_plugin("cloud")
186
- @ohai[:cloud][:public_ssh_port].should == @ohai[:azure]['public_ssh_port']
183
+ @plugin[:azure]['public_ssh_port'] = "22"
184
+ @plugin.run
185
+ @plugin[:cloud][:public_ssh_port].should == @plugin[:azure]['public_ssh_port']
187
186
  end
188
187
 
189
188
  it "should not populate cloud public_ssh_port when winrm is used" do
190
- @ohai[:azure]['public_winrm_port'] = "5985"
191
- @ohai._require_plugin("cloud")
192
- @ohai[:cloud][:public_ssh_port].should be_nil
189
+ @plugin[:azure]['public_winrm_port'] = "5985"
190
+ @plugin.run
191
+ @plugin[:cloud][:public_ssh_port].should be_nil
193
192
  end
194
193
 
195
194
  it "populates cloud public_winrm_port" do
196
- @ohai[:azure]['public_winrm_port'] = "5985"
197
- @ohai._require_plugin("cloud")
198
- @ohai[:cloud][:public_winrm_port].should == @ohai[:azure]['public_winrm_port']
195
+ @plugin[:azure]['public_winrm_port'] = "5985"
196
+ @plugin.run
197
+ @plugin[:cloud][:public_winrm_port].should == @plugin[:azure]['public_winrm_port']
199
198
  end
200
199
 
201
200
  it "populates cloud provider" do
202
- @ohai._require_plugin("cloud")
203
- @ohai[:cloud][:provider].should == "azure"
201
+ @plugin.run
202
+ @plugin[:cloud][:provider].should == "azure"
204
203
  end
205
204
  end
206
205
 
@@ -21,20 +21,19 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
21
 
22
22
  describe Ohai::System, "Darwin cpu plugin" do
23
23
  before(:each) do
24
- @ohai = Ohai::System.new
25
- @ohai.stub!(:require_plugin).and_return(true)
26
- @ohai[:os] = "darwin"
27
- @ohai.stub(:from).with("sysctl -n hw.physicalcpu").and_return("1")
28
- @ohai.stub(:from).with("sysctl -n hw.logicalcpu").and_return("2")
24
+ @plugin = get_plugin("darwin/cpu")
25
+ @plugin.stub(:collect_os).and_return(:darwin)
26
+ @plugin.stub(:shell_out).with("sysctl -n hw.physicalcpu").and_return(mock_shell_out(0, "1", ""))
27
+ @plugin.stub(:shell_out).with("sysctl -n hw.logicalcpu").and_return(mock_shell_out(0, "2", ""))
29
28
  end
30
29
 
31
30
  it "should set cpu[:total] to 2" do
32
- @ohai._require_plugin("darwin::cpu")
33
- @ohai[:cpu][:total].should == 2
31
+ @plugin.run
32
+ @plugin[:cpu][:total].should == 2
34
33
  end
35
34
 
36
35
  it "should set cpu[:real] to 1" do
37
- @ohai._require_plugin("darwin::cpu")
38
- @ohai[:cpu][:real].should == 1
36
+ @plugin.run
37
+ @plugin[:cpu][:real].should == 1
39
38
  end
40
39
  end
@@ -6,9 +6,9 @@
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
8
8
  # You may obtain a copy of the License at
9
- #
9
+ #
10
10
  # http://www.apache.org/licenses/LICENSE-2.0
11
- #
11
+ #
12
12
  # Unless required by applicable law or agreed to in writing, software
13
13
  # distributed under the License is distributed on an "AS IS" BASIS,
14
14
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,14 +21,26 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
21
 
22
22
  describe Ohai::System, "Darwin hostname plugin" do
23
23
  before(:each) do
24
- @ohai = Ohai::System.new
25
- @ohai.stub!(:require_plugin).and_return(true)
26
- @ohai[:os] = "darwin"
27
- @ohai.stub!(:from).with("hostname -s").and_return("katie")
28
- @ohai.stub!(:from).with("hostname").and_return("katie.bethell")
24
+ @plugin = get_plugin("hostname")
25
+ @plugin.stub(:collect_os).and_return(:darwin)
26
+ @plugin.stub(:shell_out).with("hostname -s").and_return(mock_shell_out(0, "katie", ""))
27
+ @plugin.stub(:shell_out).with("hostname").and_return(mock_shell_out(0, "katie.local", ""))
28
+ @plugin.stub(:resolve_fqdn).and_return("katie.bethell")
29
29
  end
30
-
30
+
31
31
  it_should_check_from("darwin::hostname", "hostname", "hostname -s", "katie")
32
-
33
- it_should_check_from("darwin::hostname", "fqdn", "hostname", "katie.bethell")
34
- end
32
+
33
+ it_should_check_from("linux::hostname", "machinename", "hostname", "katie.local")
34
+
35
+ it "should use #resolve_fqdn to find the fqdn" do
36
+ @plugin.run
37
+ @plugin[:fqdn].should == "katie.bethell"
38
+ end
39
+
40
+ it "should set the domain to everything after the first dot of the fqdn" do
41
+ @plugin.run
42
+ @plugin[:domain].should == "bethell"
43
+ end
44
+ end
45
+
46
+
@@ -21,26 +21,49 @@ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
21
 
22
22
  describe Ohai::System, "Darwin kernel plugin" do
23
23
  before(:each) do
24
- @ohai = Ohai::System.new
25
- @ohai.stub!(:require_plugin).and_return(true)
26
- @ohai[:kernel] = Mash.new
27
- @ohai[:kernel][:name] = "darwin"
24
+ @plugin = get_plugin("kernel")
25
+ @plugin.stub(:collect_os).and_return(:darwin)
26
+ @plugin.stub(:init_kernel).and_return({})
28
27
  end
29
-
28
+
29
+ it "should populate kernel[:modules] from `kextstat -k -l`" do
30
+ @plugin.stub(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "0", ""))
31
+ @plugin.stub(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, <<EOF, ""))
32
+ 8 0 0xffffff7f81aed000 0x41000 0x41000 com.apple.kec.corecrypto (1.0) <7 6 5 4 3 1>
33
+ 9 22 0xffffff7f807f3000 0x9000 0x9000 com.apple.iokit.IOACPIFamily (1.4) <7 6 4 3>
34
+ 10 30 0xffffff7f80875000 0x29000 0x29000 com.apple.iokit.IOPCIFamily (2.8) <7 6 5 4 3>
35
+ EOF
36
+
37
+ modules = {
38
+ "com.apple.kec.corecrypto"=>
39
+ {"version"=>"1.0", "size"=>266240, "index"=>"8", "refcount"=>"0"},
40
+ "com.apple.iokit.IOACPIFamily"=>
41
+ {"version"=>"1.4", "size"=>36864, "index"=>"9", "refcount"=>"22"},
42
+ "com.apple.iokit.IOPCIFamily"=>
43
+ {"version"=>"2.8", "size"=>167936, "index"=>"10", "refcount"=>"30"}}
44
+
45
+ @plugin.run
46
+ @plugin[:kernel][:modules].should eql(modules)
47
+ end
48
+
30
49
  it "should not set kernel_machine to x86_64" do
31
- @ohai.stub!(:from).with("sysctl -n hw.optional.x86_64").and_return("0")
32
- @ohai._require_plugin("darwin::kernel")
33
- @ohai[:kernel][:machine].should_not == 'x86_64'
50
+ @plugin.stub(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "0", ""))
51
+ @plugin.stub(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
52
+ @plugin.run
53
+ @plugin[:kernel][:machine].should_not == 'x86_64'
34
54
  end
35
-
55
+
36
56
  it "should set kernel_machine to x86_64" do
37
- @ohai.stub!(:from).with("sysctl -n hw.optional.x86_64").and_return("1")
38
- @ohai._require_plugin("darwin::kernel")
39
- @ohai[:kernel][:machine].should == 'x86_64'
57
+ @plugin.stub(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "1", ""))
58
+ @plugin.stub(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
59
+ @plugin.run
60
+ @plugin[:kernel][:machine].should == 'x86_64'
40
61
  end
41
-
62
+
42
63
  it "should set the kernel_os to the kernel_name value" do
43
- @ohai._require_plugin("darwin::kernel")
44
- @ohai[:kernel][:os].should == @ohai[:kernel][:name]
64
+ @plugin.stub(:shell_out).with("sysctl -n hw.optional.x86_64").and_return(mock_shell_out(0, "1", ""))
65
+ @plugin.stub(:shell_out).with("kextstat -k -l").and_return(mock_shell_out(0, "", ""))
66
+ @plugin.run
67
+ @plugin[:kernel][:os].should == @plugin[:kernel][:name]
45
68
  end
46
- end
69
+ end
@@ -19,8 +19,8 @@
19
19
  require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
20
20
 
21
21
  describe Ohai::System, "Darwin Network Plugin" do
22
- before do
23
- darwin_ifconfig = <<-DARWIN_IFCONFIG
22
+ before(:each) do
23
+ @darwin_ifconfig = <<-DARWIN_IFCONFIG
24
24
  lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
25
25
  options=3<RXCSUM,TXCSUM>
26
26
  inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
@@ -55,7 +55,7 @@ utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
55
55
  inet6 fd00:6587:52d7:c87:ba8d:12ff:fe3a:32de prefixlen 64
56
56
  DARWIN_IFCONFIG
57
57
 
58
- darwin_arp = <<-DARWIN_ARP
58
+ @darwin_arp = <<-DARWIN_ARP
59
59
  ? (10.20.10.1) at 0:4:ed:de:41:bf on en1 ifscope [ethernet]
60
60
  ? (10.20.10.2) at 0:1e:c9:55:7e:ee on en1 ifscope [ethernet]
61
61
  ? (10.20.10.6) at 34:15:9e:18:a1:20 on en1 ifscope [ethernet]
@@ -74,7 +74,7 @@ utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
74
74
  ? (10.20.10.255) at ff:ff:ff:ff:ff:ff on en1 ifscope [ethernet]
75
75
  DARWIN_ARP
76
76
 
77
- darwin_route = <<-DARWIN_ROUTE
77
+ @darwin_route = <<-DARWIN_ROUTE
78
78
  route to: default
79
79
  destination: default
80
80
  mask: default
@@ -85,7 +85,7 @@ destination: default
85
85
  0 0 0 0 0 0 1500 0
86
86
  DARWIN_ROUTE
87
87
 
88
- darwin_netstat = <<-DARWIN_NETSTAT
88
+ @darwin_netstat = <<-DARWIN_NETSTAT
89
89
  Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll Drop
90
90
  lo0 16384 <Link#1> 174982 0 25774844 174982 0 25774844 0
91
91
  lo0 16384 fe80::1%lo0 fe80:1::1 174982 - 25774844 174982 - 25774844 - -
@@ -107,7 +107,7 @@ utun0 1380 fe80::ba8d: fe80:8::ba8d:12ff 5 - 324 13
107
107
  utun0 1380 fd00:6587:5 fd00:6587:52d7:c8 5 - 324 13 - 740 - -
108
108
  DARWIN_NETSTAT
109
109
 
110
- darwin_sysctl = <<-DARWIN_SYSCTL
110
+ @darwin_sysctl = <<-DARWIN_SYSCTL
111
111
  net.local.stream.sendspace: 8192
112
112
  net.local.stream.recvspace: 8192
113
113
  net.local.stream.tracemdns: 0
@@ -412,442 +412,439 @@ net.smb.fs.tcpsndbuf: 261120
412
412
  net.smb.fs.tcprcvbuf: 261120
413
413
  DARWIN_SYSCTL
414
414
 
415
- @ohai = Ohai::System.new
416
- @ohai.stub!(:require_plugin).and_return(true)
415
+ @plugin = get_plugin("darwin/network")
416
+ @plugin.stub(:collect_os).and_return(:darwin)
417
417
 
418
- @stdin_ifconfig = StringIO.new
419
- @stdin_arp = StringIO.new
420
- @stdin_sysctl = StringIO.new
421
- @stdin_netstat = StringIO.new
418
+ # @stdin_ifconfig = StringIO.new
419
+ # @stdin_arp = StringIO.new
420
+ # @stdin_sysctl = StringIO.new
421
+ # @stdin_netstat = StringIO.new
422
422
 
423
- @ifconfig_lines = darwin_ifconfig.split("\n")
424
- @arp_lines = darwin_arp.split("\n")
425
- @netstat_lines = darwin_netstat.split("\n")
426
- @sysctl_lines = darwin_sysctl.split("\n")
423
+ # @ifconfig_lines = darwin_ifconfig.split("\n")
424
+ # @arp_lines = darwin_arp.split("\n")
425
+ # @netstat_lines = darwin_netstat.split("\n")
426
+ # @sysctl_lines = darwin_sysctl.split("\n")
427
427
 
428
- @ohai.stub(:from).with("route -n get default").and_return(darwin_route)
429
- @ohai.stub(:popen4).with("netstat -i -d -l -b -n")
430
-
431
- Ohai::Log.should_receive(:warn).with(/unable to detect/).exactly(3).times
432
- @ohai._require_plugin("network")
428
+ @plugin.stub(:shell_out).with("route -n get default").and_return(mock_shell_out(0, @darwin_route, ""))
429
+ @plugin.stub(:shell_out).with("netstat -i -d -l -b -n")
433
430
  end
434
431
 
435
432
  describe "gathering IP layer address info" do
436
- before do
437
- @ohai.stub!(:popen4).with("arp -an").and_yield(nil, @stdin_arp, @arp_lines, nil)
438
- @ohai.stub!(:popen4).with("ifconfig -a").and_yield(nil, @stdin_ifconfig, @ifconfig_lines, nil)
439
- @ohai.stub(:popen4).with("netstat -i -d -l -b -n").and_yield(nil, @stdin_netstat, @netstat_lines, nil)
440
- @ohai.stub(:popen4).with("sysctl net").and_yield(nil, @stdin_sysctl, @sysctl_lines, nil)
441
- @ohai._require_plugin("darwin::network")
433
+ before(:each) do
434
+ @plugin.stub(:shell_out).with("arp -an").and_return(mock_shell_out(0, @darwin_arp, ""))
435
+ @plugin.stub(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @darwin_ifconfig, ""))
436
+ @plugin.stub(:shell_out).with("netstat -i -d -l -b -n").and_return(mock_shell_out(0, @darwin_netstat, ""))
437
+ @plugin.stub(:shell_out).with("sysctl net").and_return(mock_shell_out(0, @darwin_sysctl, ""))
438
+ @plugin.run
442
439
  end
443
440
 
444
441
  it "completes the run" do
445
- @ohai['network'].should_not be_nil
442
+ @plugin['network'].should_not be_nil
446
443
  end
447
444
 
448
445
  it "detects the interfaces" do
449
- @ohai['network']['interfaces'].keys.sort.should == ["en0", "en1", "fw0", "gif0", "lo0", "p2p0", "stf0", "utun0"]
446
+ @plugin['network']['interfaces'].keys.sort.should == ["en0", "en1", "fw0", "gif0", "lo0", "p2p0", "stf0", "utun0"]
450
447
  end
451
448
 
452
449
  it "detects the ipv4 addresses of the ethernet interface" do
453
- @ohai['network']['interfaces']['en1']['addresses'].keys.should include('10.20.10.144')
454
- @ohai['network']['interfaces']['en1']['addresses']['10.20.10.144']['netmask'].should == '255.255.255.0'
455
- @ohai['network']['interfaces']['en1']['addresses']['10.20.10.144']['broadcast'].should == '10.20.10.255'
456
- @ohai['network']['interfaces']['en1']['addresses']['10.20.10.144']['family'].should == 'inet'
450
+ @plugin['network']['interfaces']['en1']['addresses'].keys.should include('10.20.10.144')
451
+ @plugin['network']['interfaces']['en1']['addresses']['10.20.10.144']['netmask'].should == '255.255.255.0'
452
+ @plugin['network']['interfaces']['en1']['addresses']['10.20.10.144']['broadcast'].should == '10.20.10.255'
453
+ @plugin['network']['interfaces']['en1']['addresses']['10.20.10.144']['family'].should == 'inet'
457
454
  end
458
455
 
459
456
  it "detects the ipv6 addresses of the ethernet interface" do
460
- @ohai['network']['interfaces']['en1']['addresses'].keys.should include('fe80::ba8d:12ff:fe3a:32de')
461
- @ohai['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['scope'].should == 'Link'
462
- @ohai['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['prefixlen'].should == '64'
463
- @ohai['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['family'].should == 'inet6'
464
-
465
- @ohai['network']['interfaces']['en1']['addresses'].keys.should include('2001:44b8:4186:1100:ba8d:12ff:fe3a:32de')
466
- @ohai['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['scope'].should == 'Global'
467
- @ohai['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['prefixlen'].should == '64'
468
- @ohai['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['family'].should == 'inet6'
457
+ @plugin['network']['interfaces']['en1']['addresses'].keys.should include('fe80::ba8d:12ff:fe3a:32de')
458
+ @plugin['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['scope'].should == 'Link'
459
+ @plugin['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['prefixlen'].should == '64'
460
+ @plugin['network']['interfaces']['en1']['addresses']['fe80::ba8d:12ff:fe3a:32de']['family'].should == 'inet6'
461
+
462
+ @plugin['network']['interfaces']['en1']['addresses'].keys.should include('2001:44b8:4186:1100:ba8d:12ff:fe3a:32de')
463
+ @plugin['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['scope'].should == 'Global'
464
+ @plugin['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['prefixlen'].should == '64'
465
+ @plugin['network']['interfaces']['en1']['addresses']['2001:44b8:4186:1100:ba8d:12ff:fe3a:32de']['family'].should == 'inet6'
469
466
  end
470
467
 
471
468
  it "detects the mac addresses of the ethernet interface" do
472
- @ohai['network']['interfaces']['en1']['addresses'].keys.should include('b8:8d:12:3a:32:de')
473
- @ohai['network']['interfaces']['en1']['addresses']['b8:8d:12:3a:32:de']['family'].should == 'lladdr'
469
+ @plugin['network']['interfaces']['en1']['addresses'].keys.should include('b8:8d:12:3a:32:de')
470
+ @plugin['network']['interfaces']['en1']['addresses']['b8:8d:12:3a:32:de']['family'].should == 'lladdr'
474
471
  end
475
472
 
476
473
  it "detects the encapsulation type of the ethernet interface" do
477
- @ohai['network']['interfaces']['en1']['encapsulation'].should == 'Ethernet'
474
+ @plugin['network']['interfaces']['en1']['encapsulation'].should == 'Ethernet'
478
475
  end
479
476
 
480
477
  it "detects the flags of the ethernet interface" do
481
- @ohai['network']['interfaces']['en1']['flags'].sort.should == ["BROADCAST", "MULTICAST", "RUNNING", "SIMPLEX", "SMART", "UP"]
478
+ @plugin['network']['interfaces']['en1']['flags'].sort.should == ["BROADCAST", "MULTICAST", "RUNNING", "SIMPLEX", "SMART", "UP"]
482
479
  end
483
480
 
484
481
 
485
482
  it "detects the mtu of the ethernet interface" do
486
- @ohai['network']['interfaces']['en1']['mtu'].should == "1500"
483
+ @plugin['network']['interfaces']['en1']['mtu'].should == "1500"
487
484
  end
488
485
 
489
486
  it "detects the ipv4 addresses of the loopback interface" do
490
- @ohai['network']['interfaces']['lo0']['addresses'].keys.should include('127.0.0.1')
491
- @ohai['network']['interfaces']['lo0']['addresses']['127.0.0.1']['netmask'].should == '255.0.0.0'
492
- @ohai['network']['interfaces']['lo0']['addresses']['127.0.0.1']['family'].should == 'inet'
487
+ @plugin['network']['interfaces']['lo0']['addresses'].keys.should include('127.0.0.1')
488
+ @plugin['network']['interfaces']['lo0']['addresses']['127.0.0.1']['netmask'].should == '255.0.0.0'
489
+ @plugin['network']['interfaces']['lo0']['addresses']['127.0.0.1']['family'].should == 'inet'
493
490
  end
494
491
 
495
492
  it "detects the ipv6 addresses of the loopback interface" do
496
- @ohai['network']['interfaces']['lo0']['addresses'].keys.should include('::1')
497
- @ohai['network']['interfaces']['lo0']['addresses']['::1']['scope'].should == 'Node'
498
- @ohai['network']['interfaces']['lo0']['addresses']['::1']['prefixlen'].should == '128'
499
- @ohai['network']['interfaces']['lo0']['addresses']['::1']['family'].should == 'inet6'
493
+ @plugin['network']['interfaces']['lo0']['addresses'].keys.should include('::1')
494
+ @plugin['network']['interfaces']['lo0']['addresses']['::1']['scope'].should == 'Node'
495
+ @plugin['network']['interfaces']['lo0']['addresses']['::1']['prefixlen'].should == '128'
496
+ @plugin['network']['interfaces']['lo0']['addresses']['::1']['family'].should == 'inet6'
500
497
  end
501
498
 
502
499
  it "detects the encapsulation type of the loopback interface" do
503
- @ohai['network']['interfaces']['lo0']['encapsulation'].should == 'Loopback'
500
+ @plugin['network']['interfaces']['lo0']['encapsulation'].should == 'Loopback'
504
501
  end
505
502
 
506
503
  it "detects the flags of the ethernet interface" do
507
- @ohai['network']['interfaces']['lo0']['flags'].sort.should == ["LOOPBACK", "MULTICAST", "RUNNING", "UP"]
504
+ @plugin['network']['interfaces']['lo0']['flags'].sort.should == ["LOOPBACK", "MULTICAST", "RUNNING", "UP"]
508
505
  end
509
506
 
510
507
  it "detects the mtu of the loopback interface" do
511
- @ohai['network']['interfaces']['lo0']['mtu'].should == "16384"
508
+ @plugin['network']['interfaces']['lo0']['mtu'].should == "16384"
512
509
  end
513
510
 
514
511
  it "detects the arp entries" do
515
- @ohai['network']['interfaces']['en1']['arp']['10.20.10.1'].should == '0:4:ed:de:41:bf'
512
+ @plugin['network']['interfaces']['en1']['arp']['10.20.10.1'].should == '0:4:ed:de:41:bf'
516
513
  end
517
514
 
518
515
  it "detects the ethernet counters" do
519
- @ohai['counters']['network']['interfaces']['en1']['tx']['bytes'].should == "18228234970"
520
- @ohai['counters']['network']['interfaces']['en1']['tx']['packets'].should == "14314573"
521
- @ohai['counters']['network']['interfaces']['en1']['tx']['collisions'].should == "0"
522
- @ohai['counters']['network']['interfaces']['en1']['tx']['errors'].should == "0"
523
- @ohai['counters']['network']['interfaces']['en1']['tx']['carrier'].should == 0
524
- @ohai['counters']['network']['interfaces']['en1']['tx']['drop'].should == 0
525
-
526
- @ohai['counters']['network']['interfaces']['en1']['rx']['bytes'].should == "2530556736"
527
- @ohai['counters']['network']['interfaces']['en1']['rx']['packets'].should == "5921903"
528
- @ohai['counters']['network']['interfaces']['en1']['rx']['errors'].should == "0"
529
- @ohai['counters']['network']['interfaces']['en1']['rx']['overrun'].should == 0
530
- @ohai['counters']['network']['interfaces']['en1']['rx']['drop'].should == 0
516
+ @plugin['counters']['network']['interfaces']['en1']['tx']['bytes'].should == "18228234970"
517
+ @plugin['counters']['network']['interfaces']['en1']['tx']['packets'].should == "14314573"
518
+ @plugin['counters']['network']['interfaces']['en1']['tx']['collisions'].should == "0"
519
+ @plugin['counters']['network']['interfaces']['en1']['tx']['errors'].should == "0"
520
+ @plugin['counters']['network']['interfaces']['en1']['tx']['carrier'].should == 0
521
+ @plugin['counters']['network']['interfaces']['en1']['tx']['drop'].should == 0
522
+
523
+ @plugin['counters']['network']['interfaces']['en1']['rx']['bytes'].should == "2530556736"
524
+ @plugin['counters']['network']['interfaces']['en1']['rx']['packets'].should == "5921903"
525
+ @plugin['counters']['network']['interfaces']['en1']['rx']['errors'].should == "0"
526
+ @plugin['counters']['network']['interfaces']['en1']['rx']['overrun'].should == 0
527
+ @plugin['counters']['network']['interfaces']['en1']['rx']['drop'].should == 0
531
528
  end
532
529
 
533
530
  it "detects the loopback counters" do
534
- @ohai['counters']['network']['interfaces']['lo0']['tx']['bytes'].should == "25774844"
535
- @ohai['counters']['network']['interfaces']['lo0']['tx']['packets'].should == "174982"
536
- @ohai['counters']['network']['interfaces']['lo0']['tx']['collisions'].should == "0"
537
- @ohai['counters']['network']['interfaces']['lo0']['tx']['errors'].should == "0"
538
- @ohai['counters']['network']['interfaces']['lo0']['tx']['carrier'].should == 0
539
- @ohai['counters']['network']['interfaces']['lo0']['tx']['drop'].should == 0
540
-
541
- @ohai['counters']['network']['interfaces']['lo0']['rx']['bytes'].should == "25774844"
542
- @ohai['counters']['network']['interfaces']['lo0']['rx']['packets'].should == "174982"
543
- @ohai['counters']['network']['interfaces']['lo0']['rx']['errors'].should == "0"
544
- @ohai['counters']['network']['interfaces']['lo0']['rx']['overrun'].should == 0
545
- @ohai['counters']['network']['interfaces']['lo0']['rx']['drop'].should == 0
531
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['bytes'].should == "25774844"
532
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['packets'].should == "174982"
533
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['collisions'].should == "0"
534
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['errors'].should == "0"
535
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['carrier'].should == 0
536
+ @plugin['counters']['network']['interfaces']['lo0']['tx']['drop'].should == 0
537
+
538
+ @plugin['counters']['network']['interfaces']['lo0']['rx']['bytes'].should == "25774844"
539
+ @plugin['counters']['network']['interfaces']['lo0']['rx']['packets'].should == "174982"
540
+ @plugin['counters']['network']['interfaces']['lo0']['rx']['errors'].should == "0"
541
+ @plugin['counters']['network']['interfaces']['lo0']['rx']['overrun'].should == 0
542
+ @plugin['counters']['network']['interfaces']['lo0']['rx']['drop'].should == 0
546
543
  end
547
544
 
548
545
  it "finds the default interface by asking which iface has the default route" do
549
- @ohai['network'][:default_interface].should == 'en1'
546
+ @plugin['network'][:default_interface].should == 'en1'
550
547
  end
551
548
 
552
549
  it "finds the default interface by asking which iface has the default route" do
553
- @ohai['network'][:default_gateway].should == '10.20.10.1'
550
+ @plugin['network'][:default_gateway].should == '10.20.10.1'
554
551
  end
555
552
 
556
553
  it "should detect network settings" do
557
- @ohai['network']['settings']['net.local.stream.sendspace'].should == '8192'
558
- @ohai["network"]["settings"]['net.local.stream.recvspace'].should == '8192'
559
- @ohai["network"]["settings"]['net.local.stream.tracemdns'].should == '0'
560
- @ohai["network"]["settings"]['net.local.dgram.maxdgram'].should == '2048'
561
- @ohai["network"]["settings"]['net.local.dgram.recvspace'].should == '4096'
562
- @ohai["network"]["settings"]['net.local.inflight'].should == '0'
563
- @ohai["network"]["settings"]['net.inet.ip.portrange.lowfirst'].should == '1023'
564
- @ohai["network"]["settings"]['net.inet.ip.portrange.lowlast'].should == '600'
565
- @ohai["network"]["settings"]['net.inet.ip.portrange.first'].should == '49152'
566
- @ohai["network"]["settings"]['net.inet.ip.portrange.last'].should == '65535'
567
- @ohai["network"]["settings"]['net.inet.ip.portrange.hifirst'].should == '49152'
568
- @ohai["network"]["settings"]['net.inet.ip.portrange.hilast'].should == '65535'
569
- @ohai["network"]["settings"]['net.inet.ip.forwarding'].should == '1'
570
- @ohai["network"]["settings"]['net.inet.ip.redirect'].should == '1'
571
- @ohai["network"]["settings"]['net.inet.ip.ttl'].should == '64'
572
- @ohai["network"]["settings"]['net.inet.ip.rtexpire'].should == '12'
573
- @ohai["network"]["settings"]['net.inet.ip.rtminexpire'].should == '10'
574
- @ohai["network"]["settings"]['net.inet.ip.rtmaxcache'].should == '128'
575
- @ohai["network"]["settings"]['net.inet.ip.sourceroute'].should == '0'
576
- @ohai["network"]["settings"]['net.inet.ip.intr_queue_maxlen'].should == '50'
577
- @ohai["network"]["settings"]['net.inet.ip.intr_queue_drops'].should == '0'
578
- @ohai["network"]["settings"]['net.inet.ip.accept_sourceroute'].should == '0'
579
- @ohai["network"]["settings"]['net.inet.ip.keepfaith'].should == '0'
580
- @ohai["network"]["settings"]['net.inet.ip.gifttl'].should == '30'
581
- @ohai["network"]["settings"]['net.inet.ip.subnets_are_local'].should == '0'
582
- @ohai["network"]["settings"]['net.inet.ip.mcast.maxgrpsrc'].should == '512'
583
- @ohai["network"]["settings"]['net.inet.ip.mcast.maxsocksrc'].should == '128'
584
- @ohai["network"]["settings"]['net.inet.ip.mcast.loop'].should == '1'
585
- @ohai["network"]["settings"]['net.inet.ip.check_route_selfref'].should == '1'
586
- @ohai["network"]["settings"]['net.inet.ip.use_route_genid'].should == '1'
587
- @ohai["network"]["settings"]['net.inet.ip.dummynet.hash_size'].should == '64'
588
- @ohai["network"]["settings"]['net.inet.ip.dummynet.curr_time'].should == '0'
589
- @ohai["network"]["settings"]['net.inet.ip.dummynet.ready_heap'].should == '0'
590
- @ohai["network"]["settings"]['net.inet.ip.dummynet.extract_heap'].should == '0'
591
- @ohai["network"]["settings"]['net.inet.ip.dummynet.searches'].should == '0'
592
- @ohai["network"]["settings"]['net.inet.ip.dummynet.search_steps'].should == '0'
593
- @ohai["network"]["settings"]['net.inet.ip.dummynet.expire'].should == '1'
594
- @ohai["network"]["settings"]['net.inet.ip.dummynet.max_chain_len'].should == '16'
595
- @ohai["network"]["settings"]['net.inet.ip.dummynet.red_lookup_depth'].should == '256'
596
- @ohai["network"]["settings"]['net.inet.ip.dummynet.red_avg_pkt_size'].should == '512'
597
- @ohai["network"]["settings"]['net.inet.ip.dummynet.red_max_pkt_size'].should == '1500'
598
- @ohai["network"]["settings"]['net.inet.ip.dummynet.debug'].should == '0'
599
- @ohai["network"]["settings"]['net.inet.ip.fw.enable'].should == '1'
600
- @ohai["network"]["settings"]['net.inet.ip.fw.autoinc_step'].should == '100'
601
- @ohai["network"]["settings"]['net.inet.ip.fw.one_pass'].should == '0'
602
- @ohai["network"]["settings"]['net.inet.ip.fw.debug'].should == '0'
603
- @ohai["network"]["settings"]['net.inet.ip.fw.verbose'].should == '0'
604
- @ohai["network"]["settings"]['net.inet.ip.fw.verbose_limit'].should == '0'
605
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_buckets'].should == '256'
606
- @ohai["network"]["settings"]['net.inet.ip.fw.curr_dyn_buckets'].should == '256'
607
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_count'].should == '0'
608
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_max'].should == '4096'
609
- @ohai["network"]["settings"]['net.inet.ip.fw.static_count'].should == '2'
610
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_ack_lifetime'].should == '300'
611
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_syn_lifetime'].should == '20'
612
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_fin_lifetime'].should == '1'
613
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_rst_lifetime'].should == '1'
614
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_udp_lifetime'].should == '10'
615
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_short_lifetime'].should == '5'
616
- @ohai["network"]["settings"]['net.inet.ip.fw.dyn_keepalive'].should == '1'
617
- @ohai["network"]["settings"]['net.inet.ip.maxfragpackets'].should == '1536'
618
- @ohai["network"]["settings"]['net.inet.ip.maxfragsperpacket'].should == '128'
619
- @ohai["network"]["settings"]['net.inet.ip.maxfrags'].should == '3072'
620
- @ohai["network"]["settings"]['net.inet.ip.scopedroute'].should == '1'
621
- @ohai["network"]["settings"]['net.inet.ip.check_interface'].should == '0'
622
- @ohai["network"]["settings"]['net.inet.ip.linklocal.in.allowbadttl'].should == '1'
623
- @ohai["network"]["settings"]['net.inet.ip.random_id'].should == '1'
624
- @ohai["network"]["settings"]['net.inet.ip.maxchainsent'].should == '0'
625
- @ohai["network"]["settings"]['net.inet.ip.select_srcif_debug'].should == '0'
626
- @ohai["network"]["settings"]['net.inet.icmp.maskrepl'].should == '0'
627
- @ohai["network"]["settings"]['net.inet.icmp.icmplim'].should == '250'
628
- @ohai["network"]["settings"]['net.inet.icmp.timestamp'].should == '0'
629
- @ohai["network"]["settings"]['net.inet.icmp.drop_redirect'].should == '0'
630
- @ohai["network"]["settings"]['net.inet.icmp.log_redirect'].should == '0'
631
- @ohai["network"]["settings"]['net.inet.icmp.bmcastecho'].should == '1'
632
- @ohai["network"]["settings"]['net.inet.igmp.recvifkludge'].should == '1'
633
- @ohai["network"]["settings"]['net.inet.igmp.sendra'].should == '1'
634
- @ohai["network"]["settings"]['net.inet.igmp.sendlocal'].should == '1'
635
- @ohai["network"]["settings"]['net.inet.igmp.v1enable'].should == '1'
636
- @ohai["network"]["settings"]['net.inet.igmp.v2enable'].should == '1'
637
- @ohai["network"]["settings"]['net.inet.igmp.legacysupp'].should == '0'
638
- @ohai["network"]["settings"]['net.inet.igmp.default_version'].should == '3'
639
- @ohai["network"]["settings"]['net.inet.igmp.gsrdelay'].should == '10'
640
- @ohai["network"]["settings"]['net.inet.igmp.debug'].should == '0'
641
- @ohai["network"]["settings"]['net.inet.tcp.rfc1323'].should == '1'
642
- @ohai["network"]["settings"]['net.inet.tcp.rfc1644'].should == '0'
643
- @ohai["network"]["settings"]['net.inet.tcp.mssdflt'].should == '512'
644
- @ohai["network"]["settings"]['net.inet.tcp.keepidle'].should == '7200000'
645
- @ohai["network"]["settings"]['net.inet.tcp.keepintvl'].should == '75000'
646
- @ohai["network"]["settings"]['net.inet.tcp.sendspace'].should == '65536'
647
- @ohai["network"]["settings"]['net.inet.tcp.recvspace'].should == '65536'
648
- @ohai["network"]["settings"]['net.inet.tcp.keepinit'].should == '75000'
649
- @ohai["network"]["settings"]['net.inet.tcp.v6mssdflt'].should == '1024'
650
- @ohai["network"]["settings"]['net.inet.tcp.log_in_vain'].should == '0'
651
- @ohai["network"]["settings"]['net.inet.tcp.blackhole'].should == '0'
652
- @ohai["network"]["settings"]['net.inet.tcp.delayed_ack'].should == '3'
653
- @ohai["network"]["settings"]['net.inet.tcp.tcp_lq_overflow'].should == '1'
654
- @ohai["network"]["settings"]['net.inet.tcp.recvbg'].should == '0'
655
- @ohai["network"]["settings"]['net.inet.tcp.drop_synfin'].should == '1'
656
- @ohai["network"]["settings"]['net.inet.tcp.reass.maxsegments'].should == '3072'
657
- @ohai["network"]["settings"]['net.inet.tcp.reass.cursegments'].should == '0'
658
- @ohai["network"]["settings"]['net.inet.tcp.reass.overflows'].should == '0'
659
- @ohai["network"]["settings"]['net.inet.tcp.slowlink_wsize'].should == '8192'
660
- @ohai["network"]["settings"]['net.inet.tcp.maxseg_unacked'].should == '8'
661
- @ohai["network"]["settings"]['net.inet.tcp.rfc3465'].should == '1'
662
- @ohai["network"]["settings"]['net.inet.tcp.rfc3465_lim2'].should == '1'
663
- @ohai["network"]["settings"]['net.inet.tcp.rtt_samples_per_slot'].should == '20'
664
- @ohai["network"]["settings"]['net.inet.tcp.recv_allowed_iaj'].should == '5'
665
- @ohai["network"]["settings"]['net.inet.tcp.acc_iaj_high_thresh'].should == '100'
666
- @ohai["network"]["settings"]['net.inet.tcp.rexmt_thresh'].should == '2'
667
- @ohai["network"]["settings"]['net.inet.tcp.path_mtu_discovery'].should == '1'
668
- @ohai["network"]["settings"]['net.inet.tcp.slowstart_flightsize'].should == '1'
669
- @ohai["network"]["settings"]['net.inet.tcp.local_slowstart_flightsize'].should == '8'
670
- @ohai["network"]["settings"]['net.inet.tcp.tso'].should == '1'
671
- @ohai["network"]["settings"]['net.inet.tcp.ecn_initiate_out'].should == '0'
672
- @ohai["network"]["settings"]['net.inet.tcp.ecn_negotiate_in'].should == '0'
673
- @ohai["network"]["settings"]['net.inet.tcp.packetchain'].should == '50'
674
- @ohai["network"]["settings"]['net.inet.tcp.socket_unlocked_on_output'].should == '1'
675
- @ohai["network"]["settings"]['net.inet.tcp.rfc3390'].should == '1'
676
- @ohai["network"]["settings"]['net.inet.tcp.min_iaj_win'].should == '4'
677
- @ohai["network"]["settings"]['net.inet.tcp.acc_iaj_react_limit'].should == '200'
678
- @ohai["network"]["settings"]['net.inet.tcp.sack'].should == '1'
679
- @ohai["network"]["settings"]['net.inet.tcp.sack_maxholes'].should == '128'
680
- @ohai["network"]["settings"]['net.inet.tcp.sack_globalmaxholes'].should == '65536'
681
- @ohai["network"]["settings"]['net.inet.tcp.sack_globalholes'].should == '0'
682
- @ohai["network"]["settings"]['net.inet.tcp.minmss'].should == '216'
683
- @ohai["network"]["settings"]['net.inet.tcp.minmssoverload'].should == '0'
684
- @ohai["network"]["settings"]['net.inet.tcp.do_tcpdrain'].should == '0'
685
- @ohai["network"]["settings"]['net.inet.tcp.pcbcount'].should == '86'
686
- @ohai["network"]["settings"]['net.inet.tcp.icmp_may_rst'].should == '1'
687
- @ohai["network"]["settings"]['net.inet.tcp.strict_rfc1948'].should == '0'
688
- @ohai["network"]["settings"]['net.inet.tcp.isn_reseed_interval'].should == '0'
689
- @ohai["network"]["settings"]['net.inet.tcp.background_io_enabled'].should == '1'
690
- @ohai["network"]["settings"]['net.inet.tcp.rtt_min'].should == '100'
691
- @ohai["network"]["settings"]['net.inet.tcp.rexmt_slop'].should == '200'
692
- @ohai["network"]["settings"]['net.inet.tcp.randomize_ports'].should == '0'
693
- @ohai["network"]["settings"]['net.inet.tcp.newreno_sockets'].should == '81'
694
- @ohai["network"]["settings"]['net.inet.tcp.background_sockets'].should == '-1'
695
- @ohai["network"]["settings"]['net.inet.tcp.tcbhashsize'].should == '4096'
696
- @ohai["network"]["settings"]['net.inet.tcp.background_io_trigger'].should == '5'
697
- @ohai["network"]["settings"]['net.inet.tcp.msl'].should == '15000'
698
- @ohai["network"]["settings"]['net.inet.tcp.max_persist_timeout'].should == '0'
699
- @ohai["network"]["settings"]['net.inet.tcp.always_keepalive'].should == '0'
700
- @ohai["network"]["settings"]['net.inet.tcp.timer_fastmode_idlemax'].should == '20'
701
- @ohai["network"]["settings"]['net.inet.tcp.broken_peer_syn_rxmit_thres'].should == '7'
702
- @ohai["network"]["settings"]['net.inet.tcp.tcp_timer_advanced'].should == '5'
703
- @ohai["network"]["settings"]['net.inet.tcp.tcp_resched_timerlist'].should == '12209'
704
- @ohai["network"]["settings"]['net.inet.tcp.pmtud_blackhole_detection'].should == '1'
705
- @ohai["network"]["settings"]['net.inet.tcp.pmtud_blackhole_mss'].should == '1200'
706
- @ohai["network"]["settings"]['net.inet.tcp.timer_fastquantum'].should == '100'
707
- @ohai["network"]["settings"]['net.inet.tcp.timer_slowquantum'].should == '500'
708
- @ohai["network"]["settings"]['net.inet.tcp.win_scale_factor'].should == '3'
709
- @ohai["network"]["settings"]['net.inet.tcp.sockthreshold'].should == '64'
710
- @ohai["network"]["settings"]['net.inet.tcp.bg_target_qdelay'].should == '100'
711
- @ohai["network"]["settings"]['net.inet.tcp.bg_allowed_increase'].should == '2'
712
- @ohai["network"]["settings"]['net.inet.tcp.bg_tether_shift'].should == '1'
713
- @ohai["network"]["settings"]['net.inet.tcp.bg_ss_fltsz'].should == '2'
714
- @ohai["network"]["settings"]['net.inet.udp.checksum'].should == '1'
715
- @ohai["network"]["settings"]['net.inet.udp.maxdgram'].should == '9216'
716
- @ohai["network"]["settings"]['net.inet.udp.recvspace'].should == '42080'
717
- @ohai["network"]["settings"]['net.inet.udp.log_in_vain'].should == '0'
718
- @ohai["network"]["settings"]['net.inet.udp.blackhole'].should == '0'
719
- @ohai["network"]["settings"]['net.inet.udp.pcbcount'].should == '72'
720
- @ohai["network"]["settings"]['net.inet.udp.randomize_ports'].should == '1'
721
- @ohai["network"]["settings"]['net.inet.ipsec.def_policy'].should == '1'
722
- @ohai["network"]["settings"]['net.inet.ipsec.esp_trans_deflev'].should == '1'
723
- @ohai["network"]["settings"]['net.inet.ipsec.esp_net_deflev'].should == '1'
724
- @ohai["network"]["settings"]['net.inet.ipsec.ah_trans_deflev'].should == '1'
725
- @ohai["network"]["settings"]['net.inet.ipsec.ah_net_deflev'].should == '1'
726
- @ohai["network"]["settings"]['net.inet.ipsec.ah_cleartos'].should == '1'
727
- @ohai["network"]["settings"]['net.inet.ipsec.ah_offsetmask'].should == '0'
728
- @ohai["network"]["settings"]['net.inet.ipsec.dfbit'].should == '0'
729
- @ohai["network"]["settings"]['net.inet.ipsec.ecn'].should == '0'
730
- @ohai["network"]["settings"]['net.inet.ipsec.debug'].should == '0'
731
- @ohai["network"]["settings"]['net.inet.ipsec.esp_randpad'].should == '-1'
732
- @ohai["network"]["settings"]['net.inet.ipsec.bypass'].should == '0'
733
- @ohai["network"]["settings"]['net.inet.ipsec.esp_port'].should == '4500'
734
- @ohai["network"]["settings"]['net.inet.raw.maxdgram'].should == '8192'
735
- @ohai["network"]["settings"]['net.inet.raw.recvspace'].should == '8192'
736
- @ohai["network"]["settings"]['net.link.generic.system.ifcount'].should == '10'
737
- @ohai["network"]["settings"]['net.link.generic.system.dlil_verbose'].should == '0'
738
- @ohai["network"]["settings"]['net.link.generic.system.multi_threaded_input'].should == '1'
739
- @ohai["network"]["settings"]['net.link.generic.system.dlil_input_sanity_check'].should == '0'
740
- @ohai["network"]["settings"]['net.link.ether.inet.prune_intvl'].should == '300'
741
- @ohai["network"]["settings"]['net.link.ether.inet.max_age'].should == '1200'
742
- @ohai["network"]["settings"]['net.link.ether.inet.host_down_time'].should == '20'
743
- @ohai["network"]["settings"]['net.link.ether.inet.apple_hwcksum_tx'].should == '1'
744
- @ohai["network"]["settings"]['net.link.ether.inet.apple_hwcksum_rx'].should == '1'
745
- @ohai["network"]["settings"]['net.link.ether.inet.arp_llreach_base'].should == '30'
746
- @ohai["network"]["settings"]['net.link.ether.inet.maxtries'].should == '5'
747
- @ohai["network"]["settings"]['net.link.ether.inet.useloopback'].should == '1'
748
- @ohai["network"]["settings"]['net.link.ether.inet.proxyall'].should == '0'
749
- @ohai["network"]["settings"]['net.link.ether.inet.sendllconflict'].should == '0'
750
- @ohai["network"]["settings"]['net.link.ether.inet.log_arp_warnings'].should == '0'
751
- @ohai["network"]["settings"]['net.link.ether.inet.keep_announcements'].should == '1'
752
- @ohai["network"]["settings"]['net.link.ether.inet.send_conflicting_probes'].should == '1'
753
- @ohai["network"]["settings"]['net.link.bridge.log_stp'].should == '0'
754
- @ohai["network"]["settings"]['net.link.bridge.debug'].should == '0'
755
- @ohai["network"]["settings"]['net.key.debug'].should == '0'
756
- @ohai["network"]["settings"]['net.key.spi_trycnt'].should == '1000'
757
- @ohai["network"]["settings"]['net.key.spi_minval'].should == '256'
758
- @ohai["network"]["settings"]['net.key.spi_maxval'].should == '268435455'
759
- @ohai["network"]["settings"]['net.key.int_random'].should == '60'
760
- @ohai["network"]["settings"]['net.key.larval_lifetime'].should == '30'
761
- @ohai["network"]["settings"]['net.key.blockacq_count'].should == '10'
762
- @ohai["network"]["settings"]['net.key.blockacq_lifetime'].should == '20'
763
- @ohai["network"]["settings"]['net.key.esp_keymin'].should == '256'
764
- @ohai["network"]["settings"]['net.key.esp_auth'].should == '0'
765
- @ohai["network"]["settings"]['net.key.ah_keymin'].should == '128'
766
- @ohai["network"]["settings"]['net.key.prefered_oldsa'].should == '0'
767
- @ohai["network"]["settings"]['net.key.natt_keepalive_interval'].should == '20'
768
- @ohai["network"]["settings"]['net.inet6.ip6.forwarding'].should == '0'
769
- @ohai["network"]["settings"]['net.inet6.ip6.redirect'].should == '1'
770
- @ohai["network"]["settings"]['net.inet6.ip6.hlim'].should == '64'
771
- @ohai["network"]["settings"]['net.inet6.ip6.maxfragpackets'].should == '1536'
772
- @ohai["network"]["settings"]['net.inet6.ip6.accept_rtadv'].should == '0'
773
- @ohai["network"]["settings"]['net.inet6.ip6.keepfaith'].should == '0'
774
- @ohai["network"]["settings"]['net.inet6.ip6.log_interval'].should == '5'
775
- @ohai["network"]["settings"]['net.inet6.ip6.hdrnestlimit'].should == '15'
776
- @ohai["network"]["settings"]['net.inet6.ip6.dad_count'].should == '1'
777
- @ohai["network"]["settings"]['net.inet6.ip6.auto_flowlabel'].should == '1'
778
- @ohai["network"]["settings"]['net.inet6.ip6.defmcasthlim'].should == '1'
779
- @ohai["network"]["settings"]['net.inet6.ip6.gifhlim'].should == '0'
780
- @ohai["network"]["settings"]['net.inet6.ip6.kame_version'].should == '2009/apple-darwin'
781
- @ohai["network"]["settings"]['net.inet6.ip6.use_deprecated'].should == '1'
782
- @ohai["network"]["settings"]['net.inet6.ip6.rr_prune'].should == '5'
783
- @ohai["network"]["settings"]['net.inet6.ip6.v6only'].should == '0'
784
- @ohai["network"]["settings"]['net.inet6.ip6.rtexpire'].should == '3600'
785
- @ohai["network"]["settings"]['net.inet6.ip6.rtminexpire'].should == '10'
786
- @ohai["network"]["settings"]['net.inet6.ip6.rtmaxcache'].should == '128'
787
- @ohai["network"]["settings"]['net.inet6.ip6.use_tempaddr'].should == '1'
788
- @ohai["network"]["settings"]['net.inet6.ip6.temppltime'].should == '86400'
789
- @ohai["network"]["settings"]['net.inet6.ip6.tempvltime'].should == '604800'
790
- @ohai["network"]["settings"]['net.inet6.ip6.auto_linklocal'].should == '1'
791
- @ohai["network"]["settings"]['net.inet6.ip6.prefer_tempaddr'].should == '1'
792
- @ohai["network"]["settings"]['net.inet6.ip6.use_defaultzone'].should == '0'
793
- @ohai["network"]["settings"]['net.inet6.ip6.maxfrags'].should == '12288'
794
- @ohai["network"]["settings"]['net.inet6.ip6.mcast_pmtu'].should == '0'
795
- @ohai["network"]["settings"]['net.inet6.ip6.neighborgcthresh'].should == '1024'
796
- @ohai["network"]["settings"]['net.inet6.ip6.maxifprefixes'].should == '16'
797
- @ohai["network"]["settings"]['net.inet6.ip6.maxifdefrouters'].should == '16'
798
- @ohai["network"]["settings"]['net.inet6.ip6.maxdynroutes'].should == '1024'
799
- @ohai["network"]["settings"]['net.inet6.ip6.fw.enable'].should == '1'
800
- @ohai["network"]["settings"]['net.inet6.ip6.fw.debug'].should == '0'
801
- @ohai["network"]["settings"]['net.inet6.ip6.fw.verbose'].should == '0'
802
- @ohai["network"]["settings"]['net.inet6.ip6.fw.verbose_limit'].should == '0'
803
- @ohai["network"]["settings"]['net.inet6.ip6.scopedroute'].should == '1'
804
- @ohai["network"]["settings"]['net.inet6.ip6.select_srcif_debug'].should == '0'
805
- @ohai["network"]["settings"]['net.inet6.ip6.mcast.maxgrpsrc'].should == '512'
806
- @ohai["network"]["settings"]['net.inet6.ip6.mcast.maxsocksrc'].should == '128'
807
- @ohai["network"]["settings"]['net.inet6.ip6.mcast.loop'].should == '1'
808
- @ohai["network"]["settings"]['net.inet6.ip6.only_allow_rfc4193_prefixes'].should == '0'
809
- @ohai["network"]["settings"]['net.inet6.ipsec6.def_policy'].should == '1'
810
- @ohai["network"]["settings"]['net.inet6.ipsec6.esp_trans_deflev'].should == '1'
811
- @ohai["network"]["settings"]['net.inet6.ipsec6.esp_net_deflev'].should == '1'
812
- @ohai["network"]["settings"]['net.inet6.ipsec6.ah_trans_deflev'].should == '1'
813
- @ohai["network"]["settings"]['net.inet6.ipsec6.ah_net_deflev'].should == '1'
814
- @ohai["network"]["settings"]['net.inet6.ipsec6.ecn'].should == '0'
815
- @ohai["network"]["settings"]['net.inet6.ipsec6.debug'].should == '0'
816
- @ohai["network"]["settings"]['net.inet6.ipsec6.esp_randpad'].should == '-1'
817
- @ohai["network"]["settings"]['net.inet6.icmp6.rediraccept'].should == '1'
818
- @ohai["network"]["settings"]['net.inet6.icmp6.redirtimeout'].should == '600'
819
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_prune'].should == '1'
820
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_delay'].should == '5'
821
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_umaxtries'].should == '3'
822
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_mmaxtries'].should == '3'
823
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_useloopback'].should == '1'
824
- @ohai["network"]["settings"]['net.inet6.icmp6.nodeinfo'].should == '3'
825
- @ohai["network"]["settings"]['net.inet6.icmp6.errppslimit'].should == '500'
826
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_maxnudhint'].should == '0'
827
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_debug'].should == '0'
828
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_accept_6to4'].should == '1'
829
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_onlink_ns_rfc4861'].should == '0'
830
- @ohai["network"]["settings"]['net.inet6.icmp6.nd6_llreach_base'].should == '30'
831
- @ohai["network"]["settings"]['net.inet6.mld.gsrdelay'].should == '10'
832
- @ohai["network"]["settings"]['net.inet6.mld.v1enable'].should == '1'
833
- @ohai["network"]["settings"]['net.inet6.mld.use_allow'].should == '1'
834
- @ohai["network"]["settings"]['net.inet6.mld.debug'].should == '0'
835
- @ohai["network"]["settings"]['net.idle.route.expire_timeout'].should == '30'
836
- @ohai["network"]["settings"]['net.idle.route.drain_interval'].should == '10'
837
- @ohai["network"]["settings"]['net.statistics'].should == '1'
838
- @ohai["network"]["settings"]['net.alf.loglevel'].should == '55'
839
- @ohai["network"]["settings"]['net.alf.perm'].should == '0'
840
- @ohai["network"]["settings"]['net.alf.defaultaction'].should == '1'
841
- @ohai["network"]["settings"]['net.alf.mqcount'].should == '0'
842
- @ohai["network"]["settings"]['net.smb.fs.version'].should == '107000'
843
- @ohai["network"]["settings"]['net.smb.fs.loglevel'].should == '0'
844
- @ohai["network"]["settings"]['net.smb.fs.kern_ntlmssp'].should == '0'
845
- @ohai["network"]["settings"]['net.smb.fs.kern_deprecatePreXPServers'].should == '1'
846
- @ohai["network"]["settings"]['net.smb.fs.kern_deadtimer'].should == '60'
847
- @ohai["network"]["settings"]['net.smb.fs.kern_hard_deadtimer'].should == '600'
848
- @ohai["network"]["settings"]['net.smb.fs.kern_soft_deadtimer'].should == '30'
849
- @ohai["network"]["settings"]['net.smb.fs.tcpsndbuf'].should == '261120'
850
- @ohai["network"]["settings"]['net.smb.fs.tcprcvbuf'].should == '261120'
554
+ @plugin['network']['settings']['net.local.stream.sendspace'].should == '8192'
555
+ @plugin["network"]["settings"]['net.local.stream.recvspace'].should == '8192'
556
+ @plugin["network"]["settings"]['net.local.stream.tracemdns'].should == '0'
557
+ @plugin["network"]["settings"]['net.local.dgram.maxdgram'].should == '2048'
558
+ @plugin["network"]["settings"]['net.local.dgram.recvspace'].should == '4096'
559
+ @plugin["network"]["settings"]['net.local.inflight'].should == '0'
560
+ @plugin["network"]["settings"]['net.inet.ip.portrange.lowfirst'].should == '1023'
561
+ @plugin["network"]["settings"]['net.inet.ip.portrange.lowlast'].should == '600'
562
+ @plugin["network"]["settings"]['net.inet.ip.portrange.first'].should == '49152'
563
+ @plugin["network"]["settings"]['net.inet.ip.portrange.last'].should == '65535'
564
+ @plugin["network"]["settings"]['net.inet.ip.portrange.hifirst'].should == '49152'
565
+ @plugin["network"]["settings"]['net.inet.ip.portrange.hilast'].should == '65535'
566
+ @plugin["network"]["settings"]['net.inet.ip.forwarding'].should == '1'
567
+ @plugin["network"]["settings"]['net.inet.ip.redirect'].should == '1'
568
+ @plugin["network"]["settings"]['net.inet.ip.ttl'].should == '64'
569
+ @plugin["network"]["settings"]['net.inet.ip.rtexpire'].should == '12'
570
+ @plugin["network"]["settings"]['net.inet.ip.rtminexpire'].should == '10'
571
+ @plugin["network"]["settings"]['net.inet.ip.rtmaxcache'].should == '128'
572
+ @plugin["network"]["settings"]['net.inet.ip.sourceroute'].should == '0'
573
+ @plugin["network"]["settings"]['net.inet.ip.intr_queue_maxlen'].should == '50'
574
+ @plugin["network"]["settings"]['net.inet.ip.intr_queue_drops'].should == '0'
575
+ @plugin["network"]["settings"]['net.inet.ip.accept_sourceroute'].should == '0'
576
+ @plugin["network"]["settings"]['net.inet.ip.keepfaith'].should == '0'
577
+ @plugin["network"]["settings"]['net.inet.ip.gifttl'].should == '30'
578
+ @plugin["network"]["settings"]['net.inet.ip.subnets_are_local'].should == '0'
579
+ @plugin["network"]["settings"]['net.inet.ip.mcast.maxgrpsrc'].should == '512'
580
+ @plugin["network"]["settings"]['net.inet.ip.mcast.maxsocksrc'].should == '128'
581
+ @plugin["network"]["settings"]['net.inet.ip.mcast.loop'].should == '1'
582
+ @plugin["network"]["settings"]['net.inet.ip.check_route_selfref'].should == '1'
583
+ @plugin["network"]["settings"]['net.inet.ip.use_route_genid'].should == '1'
584
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.hash_size'].should == '64'
585
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.curr_time'].should == '0'
586
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.ready_heap'].should == '0'
587
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.extract_heap'].should == '0'
588
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.searches'].should == '0'
589
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.search_steps'].should == '0'
590
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.expire'].should == '1'
591
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.max_chain_len'].should == '16'
592
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.red_lookup_depth'].should == '256'
593
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.red_avg_pkt_size'].should == '512'
594
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.red_max_pkt_size'].should == '1500'
595
+ @plugin["network"]["settings"]['net.inet.ip.dummynet.debug'].should == '0'
596
+ @plugin["network"]["settings"]['net.inet.ip.fw.enable'].should == '1'
597
+ @plugin["network"]["settings"]['net.inet.ip.fw.autoinc_step'].should == '100'
598
+ @plugin["network"]["settings"]['net.inet.ip.fw.one_pass'].should == '0'
599
+ @plugin["network"]["settings"]['net.inet.ip.fw.debug'].should == '0'
600
+ @plugin["network"]["settings"]['net.inet.ip.fw.verbose'].should == '0'
601
+ @plugin["network"]["settings"]['net.inet.ip.fw.verbose_limit'].should == '0'
602
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_buckets'].should == '256'
603
+ @plugin["network"]["settings"]['net.inet.ip.fw.curr_dyn_buckets'].should == '256'
604
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_count'].should == '0'
605
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_max'].should == '4096'
606
+ @plugin["network"]["settings"]['net.inet.ip.fw.static_count'].should == '2'
607
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_ack_lifetime'].should == '300'
608
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_syn_lifetime'].should == '20'
609
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_fin_lifetime'].should == '1'
610
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_rst_lifetime'].should == '1'
611
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_udp_lifetime'].should == '10'
612
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_short_lifetime'].should == '5'
613
+ @plugin["network"]["settings"]['net.inet.ip.fw.dyn_keepalive'].should == '1'
614
+ @plugin["network"]["settings"]['net.inet.ip.maxfragpackets'].should == '1536'
615
+ @plugin["network"]["settings"]['net.inet.ip.maxfragsperpacket'].should == '128'
616
+ @plugin["network"]["settings"]['net.inet.ip.maxfrags'].should == '3072'
617
+ @plugin["network"]["settings"]['net.inet.ip.scopedroute'].should == '1'
618
+ @plugin["network"]["settings"]['net.inet.ip.check_interface'].should == '0'
619
+ @plugin["network"]["settings"]['net.inet.ip.linklocal.in.allowbadttl'].should == '1'
620
+ @plugin["network"]["settings"]['net.inet.ip.random_id'].should == '1'
621
+ @plugin["network"]["settings"]['net.inet.ip.maxchainsent'].should == '0'
622
+ @plugin["network"]["settings"]['net.inet.ip.select_srcif_debug'].should == '0'
623
+ @plugin["network"]["settings"]['net.inet.icmp.maskrepl'].should == '0'
624
+ @plugin["network"]["settings"]['net.inet.icmp.icmplim'].should == '250'
625
+ @plugin["network"]["settings"]['net.inet.icmp.timestamp'].should == '0'
626
+ @plugin["network"]["settings"]['net.inet.icmp.drop_redirect'].should == '0'
627
+ @plugin["network"]["settings"]['net.inet.icmp.log_redirect'].should == '0'
628
+ @plugin["network"]["settings"]['net.inet.icmp.bmcastecho'].should == '1'
629
+ @plugin["network"]["settings"]['net.inet.igmp.recvifkludge'].should == '1'
630
+ @plugin["network"]["settings"]['net.inet.igmp.sendra'].should == '1'
631
+ @plugin["network"]["settings"]['net.inet.igmp.sendlocal'].should == '1'
632
+ @plugin["network"]["settings"]['net.inet.igmp.v1enable'].should == '1'
633
+ @plugin["network"]["settings"]['net.inet.igmp.v2enable'].should == '1'
634
+ @plugin["network"]["settings"]['net.inet.igmp.legacysupp'].should == '0'
635
+ @plugin["network"]["settings"]['net.inet.igmp.default_version'].should == '3'
636
+ @plugin["network"]["settings"]['net.inet.igmp.gsrdelay'].should == '10'
637
+ @plugin["network"]["settings"]['net.inet.igmp.debug'].should == '0'
638
+ @plugin["network"]["settings"]['net.inet.tcp.rfc1323'].should == '1'
639
+ @plugin["network"]["settings"]['net.inet.tcp.rfc1644'].should == '0'
640
+ @plugin["network"]["settings"]['net.inet.tcp.mssdflt'].should == '512'
641
+ @plugin["network"]["settings"]['net.inet.tcp.keepidle'].should == '7200000'
642
+ @plugin["network"]["settings"]['net.inet.tcp.keepintvl'].should == '75000'
643
+ @plugin["network"]["settings"]['net.inet.tcp.sendspace'].should == '65536'
644
+ @plugin["network"]["settings"]['net.inet.tcp.recvspace'].should == '65536'
645
+ @plugin["network"]["settings"]['net.inet.tcp.keepinit'].should == '75000'
646
+ @plugin["network"]["settings"]['net.inet.tcp.v6mssdflt'].should == '1024'
647
+ @plugin["network"]["settings"]['net.inet.tcp.log_in_vain'].should == '0'
648
+ @plugin["network"]["settings"]['net.inet.tcp.blackhole'].should == '0'
649
+ @plugin["network"]["settings"]['net.inet.tcp.delayed_ack'].should == '3'
650
+ @plugin["network"]["settings"]['net.inet.tcp.tcp_lq_overflow'].should == '1'
651
+ @plugin["network"]["settings"]['net.inet.tcp.recvbg'].should == '0'
652
+ @plugin["network"]["settings"]['net.inet.tcp.drop_synfin'].should == '1'
653
+ @plugin["network"]["settings"]['net.inet.tcp.reass.maxsegments'].should == '3072'
654
+ @plugin["network"]["settings"]['net.inet.tcp.reass.cursegments'].should == '0'
655
+ @plugin["network"]["settings"]['net.inet.tcp.reass.overflows'].should == '0'
656
+ @plugin["network"]["settings"]['net.inet.tcp.slowlink_wsize'].should == '8192'
657
+ @plugin["network"]["settings"]['net.inet.tcp.maxseg_unacked'].should == '8'
658
+ @plugin["network"]["settings"]['net.inet.tcp.rfc3465'].should == '1'
659
+ @plugin["network"]["settings"]['net.inet.tcp.rfc3465_lim2'].should == '1'
660
+ @plugin["network"]["settings"]['net.inet.tcp.rtt_samples_per_slot'].should == '20'
661
+ @plugin["network"]["settings"]['net.inet.tcp.recv_allowed_iaj'].should == '5'
662
+ @plugin["network"]["settings"]['net.inet.tcp.acc_iaj_high_thresh'].should == '100'
663
+ @plugin["network"]["settings"]['net.inet.tcp.rexmt_thresh'].should == '2'
664
+ @plugin["network"]["settings"]['net.inet.tcp.path_mtu_discovery'].should == '1'
665
+ @plugin["network"]["settings"]['net.inet.tcp.slowstart_flightsize'].should == '1'
666
+ @plugin["network"]["settings"]['net.inet.tcp.local_slowstart_flightsize'].should == '8'
667
+ @plugin["network"]["settings"]['net.inet.tcp.tso'].should == '1'
668
+ @plugin["network"]["settings"]['net.inet.tcp.ecn_initiate_out'].should == '0'
669
+ @plugin["network"]["settings"]['net.inet.tcp.ecn_negotiate_in'].should == '0'
670
+ @plugin["network"]["settings"]['net.inet.tcp.packetchain'].should == '50'
671
+ @plugin["network"]["settings"]['net.inet.tcp.socket_unlocked_on_output'].should == '1'
672
+ @plugin["network"]["settings"]['net.inet.tcp.rfc3390'].should == '1'
673
+ @plugin["network"]["settings"]['net.inet.tcp.min_iaj_win'].should == '4'
674
+ @plugin["network"]["settings"]['net.inet.tcp.acc_iaj_react_limit'].should == '200'
675
+ @plugin["network"]["settings"]['net.inet.tcp.sack'].should == '1'
676
+ @plugin["network"]["settings"]['net.inet.tcp.sack_maxholes'].should == '128'
677
+ @plugin["network"]["settings"]['net.inet.tcp.sack_globalmaxholes'].should == '65536'
678
+ @plugin["network"]["settings"]['net.inet.tcp.sack_globalholes'].should == '0'
679
+ @plugin["network"]["settings"]['net.inet.tcp.minmss'].should == '216'
680
+ @plugin["network"]["settings"]['net.inet.tcp.minmssoverload'].should == '0'
681
+ @plugin["network"]["settings"]['net.inet.tcp.do_tcpdrain'].should == '0'
682
+ @plugin["network"]["settings"]['net.inet.tcp.pcbcount'].should == '86'
683
+ @plugin["network"]["settings"]['net.inet.tcp.icmp_may_rst'].should == '1'
684
+ @plugin["network"]["settings"]['net.inet.tcp.strict_rfc1948'].should == '0'
685
+ @plugin["network"]["settings"]['net.inet.tcp.isn_reseed_interval'].should == '0'
686
+ @plugin["network"]["settings"]['net.inet.tcp.background_io_enabled'].should == '1'
687
+ @plugin["network"]["settings"]['net.inet.tcp.rtt_min'].should == '100'
688
+ @plugin["network"]["settings"]['net.inet.tcp.rexmt_slop'].should == '200'
689
+ @plugin["network"]["settings"]['net.inet.tcp.randomize_ports'].should == '0'
690
+ @plugin["network"]["settings"]['net.inet.tcp.newreno_sockets'].should == '81'
691
+ @plugin["network"]["settings"]['net.inet.tcp.background_sockets'].should == '-1'
692
+ @plugin["network"]["settings"]['net.inet.tcp.tcbhashsize'].should == '4096'
693
+ @plugin["network"]["settings"]['net.inet.tcp.background_io_trigger'].should == '5'
694
+ @plugin["network"]["settings"]['net.inet.tcp.msl'].should == '15000'
695
+ @plugin["network"]["settings"]['net.inet.tcp.max_persist_timeout'].should == '0'
696
+ @plugin["network"]["settings"]['net.inet.tcp.always_keepalive'].should == '0'
697
+ @plugin["network"]["settings"]['net.inet.tcp.timer_fastmode_idlemax'].should == '20'
698
+ @plugin["network"]["settings"]['net.inet.tcp.broken_peer_syn_rxmit_thres'].should == '7'
699
+ @plugin["network"]["settings"]['net.inet.tcp.tcp_timer_advanced'].should == '5'
700
+ @plugin["network"]["settings"]['net.inet.tcp.tcp_resched_timerlist'].should == '12209'
701
+ @plugin["network"]["settings"]['net.inet.tcp.pmtud_blackhole_detection'].should == '1'
702
+ @plugin["network"]["settings"]['net.inet.tcp.pmtud_blackhole_mss'].should == '1200'
703
+ @plugin["network"]["settings"]['net.inet.tcp.timer_fastquantum'].should == '100'
704
+ @plugin["network"]["settings"]['net.inet.tcp.timer_slowquantum'].should == '500'
705
+ @plugin["network"]["settings"]['net.inet.tcp.win_scale_factor'].should == '3'
706
+ @plugin["network"]["settings"]['net.inet.tcp.sockthreshold'].should == '64'
707
+ @plugin["network"]["settings"]['net.inet.tcp.bg_target_qdelay'].should == '100'
708
+ @plugin["network"]["settings"]['net.inet.tcp.bg_allowed_increase'].should == '2'
709
+ @plugin["network"]["settings"]['net.inet.tcp.bg_tether_shift'].should == '1'
710
+ @plugin["network"]["settings"]['net.inet.tcp.bg_ss_fltsz'].should == '2'
711
+ @plugin["network"]["settings"]['net.inet.udp.checksum'].should == '1'
712
+ @plugin["network"]["settings"]['net.inet.udp.maxdgram'].should == '9216'
713
+ @plugin["network"]["settings"]['net.inet.udp.recvspace'].should == '42080'
714
+ @plugin["network"]["settings"]['net.inet.udp.log_in_vain'].should == '0'
715
+ @plugin["network"]["settings"]['net.inet.udp.blackhole'].should == '0'
716
+ @plugin["network"]["settings"]['net.inet.udp.pcbcount'].should == '72'
717
+ @plugin["network"]["settings"]['net.inet.udp.randomize_ports'].should == '1'
718
+ @plugin["network"]["settings"]['net.inet.ipsec.def_policy'].should == '1'
719
+ @plugin["network"]["settings"]['net.inet.ipsec.esp_trans_deflev'].should == '1'
720
+ @plugin["network"]["settings"]['net.inet.ipsec.esp_net_deflev'].should == '1'
721
+ @plugin["network"]["settings"]['net.inet.ipsec.ah_trans_deflev'].should == '1'
722
+ @plugin["network"]["settings"]['net.inet.ipsec.ah_net_deflev'].should == '1'
723
+ @plugin["network"]["settings"]['net.inet.ipsec.ah_cleartos'].should == '1'
724
+ @plugin["network"]["settings"]['net.inet.ipsec.ah_offsetmask'].should == '0'
725
+ @plugin["network"]["settings"]['net.inet.ipsec.dfbit'].should == '0'
726
+ @plugin["network"]["settings"]['net.inet.ipsec.ecn'].should == '0'
727
+ @plugin["network"]["settings"]['net.inet.ipsec.debug'].should == '0'
728
+ @plugin["network"]["settings"]['net.inet.ipsec.esp_randpad'].should == '-1'
729
+ @plugin["network"]["settings"]['net.inet.ipsec.bypass'].should == '0'
730
+ @plugin["network"]["settings"]['net.inet.ipsec.esp_port'].should == '4500'
731
+ @plugin["network"]["settings"]['net.inet.raw.maxdgram'].should == '8192'
732
+ @plugin["network"]["settings"]['net.inet.raw.recvspace'].should == '8192'
733
+ @plugin["network"]["settings"]['net.link.generic.system.ifcount'].should == '10'
734
+ @plugin["network"]["settings"]['net.link.generic.system.dlil_verbose'].should == '0'
735
+ @plugin["network"]["settings"]['net.link.generic.system.multi_threaded_input'].should == '1'
736
+ @plugin["network"]["settings"]['net.link.generic.system.dlil_input_sanity_check'].should == '0'
737
+ @plugin["network"]["settings"]['net.link.ether.inet.prune_intvl'].should == '300'
738
+ @plugin["network"]["settings"]['net.link.ether.inet.max_age'].should == '1200'
739
+ @plugin["network"]["settings"]['net.link.ether.inet.host_down_time'].should == '20'
740
+ @plugin["network"]["settings"]['net.link.ether.inet.apple_hwcksum_tx'].should == '1'
741
+ @plugin["network"]["settings"]['net.link.ether.inet.apple_hwcksum_rx'].should == '1'
742
+ @plugin["network"]["settings"]['net.link.ether.inet.arp_llreach_base'].should == '30'
743
+ @plugin["network"]["settings"]['net.link.ether.inet.maxtries'].should == '5'
744
+ @plugin["network"]["settings"]['net.link.ether.inet.useloopback'].should == '1'
745
+ @plugin["network"]["settings"]['net.link.ether.inet.proxyall'].should == '0'
746
+ @plugin["network"]["settings"]['net.link.ether.inet.sendllconflict'].should == '0'
747
+ @plugin["network"]["settings"]['net.link.ether.inet.log_arp_warnings'].should == '0'
748
+ @plugin["network"]["settings"]['net.link.ether.inet.keep_announcements'].should == '1'
749
+ @plugin["network"]["settings"]['net.link.ether.inet.send_conflicting_probes'].should == '1'
750
+ @plugin["network"]["settings"]['net.link.bridge.log_stp'].should == '0'
751
+ @plugin["network"]["settings"]['net.link.bridge.debug'].should == '0'
752
+ @plugin["network"]["settings"]['net.key.debug'].should == '0'
753
+ @plugin["network"]["settings"]['net.key.spi_trycnt'].should == '1000'
754
+ @plugin["network"]["settings"]['net.key.spi_minval'].should == '256'
755
+ @plugin["network"]["settings"]['net.key.spi_maxval'].should == '268435455'
756
+ @plugin["network"]["settings"]['net.key.int_random'].should == '60'
757
+ @plugin["network"]["settings"]['net.key.larval_lifetime'].should == '30'
758
+ @plugin["network"]["settings"]['net.key.blockacq_count'].should == '10'
759
+ @plugin["network"]["settings"]['net.key.blockacq_lifetime'].should == '20'
760
+ @plugin["network"]["settings"]['net.key.esp_keymin'].should == '256'
761
+ @plugin["network"]["settings"]['net.key.esp_auth'].should == '0'
762
+ @plugin["network"]["settings"]['net.key.ah_keymin'].should == '128'
763
+ @plugin["network"]["settings"]['net.key.prefered_oldsa'].should == '0'
764
+ @plugin["network"]["settings"]['net.key.natt_keepalive_interval'].should == '20'
765
+ @plugin["network"]["settings"]['net.inet6.ip6.forwarding'].should == '0'
766
+ @plugin["network"]["settings"]['net.inet6.ip6.redirect'].should == '1'
767
+ @plugin["network"]["settings"]['net.inet6.ip6.hlim'].should == '64'
768
+ @plugin["network"]["settings"]['net.inet6.ip6.maxfragpackets'].should == '1536'
769
+ @plugin["network"]["settings"]['net.inet6.ip6.accept_rtadv'].should == '0'
770
+ @plugin["network"]["settings"]['net.inet6.ip6.keepfaith'].should == '0'
771
+ @plugin["network"]["settings"]['net.inet6.ip6.log_interval'].should == '5'
772
+ @plugin["network"]["settings"]['net.inet6.ip6.hdrnestlimit'].should == '15'
773
+ @plugin["network"]["settings"]['net.inet6.ip6.dad_count'].should == '1'
774
+ @plugin["network"]["settings"]['net.inet6.ip6.auto_flowlabel'].should == '1'
775
+ @plugin["network"]["settings"]['net.inet6.ip6.defmcasthlim'].should == '1'
776
+ @plugin["network"]["settings"]['net.inet6.ip6.gifhlim'].should == '0'
777
+ @plugin["network"]["settings"]['net.inet6.ip6.kame_version'].should == '2009/apple-darwin'
778
+ @plugin["network"]["settings"]['net.inet6.ip6.use_deprecated'].should == '1'
779
+ @plugin["network"]["settings"]['net.inet6.ip6.rr_prune'].should == '5'
780
+ @plugin["network"]["settings"]['net.inet6.ip6.v6only'].should == '0'
781
+ @plugin["network"]["settings"]['net.inet6.ip6.rtexpire'].should == '3600'
782
+ @plugin["network"]["settings"]['net.inet6.ip6.rtminexpire'].should == '10'
783
+ @plugin["network"]["settings"]['net.inet6.ip6.rtmaxcache'].should == '128'
784
+ @plugin["network"]["settings"]['net.inet6.ip6.use_tempaddr'].should == '1'
785
+ @plugin["network"]["settings"]['net.inet6.ip6.temppltime'].should == '86400'
786
+ @plugin["network"]["settings"]['net.inet6.ip6.tempvltime'].should == '604800'
787
+ @plugin["network"]["settings"]['net.inet6.ip6.auto_linklocal'].should == '1'
788
+ @plugin["network"]["settings"]['net.inet6.ip6.prefer_tempaddr'].should == '1'
789
+ @plugin["network"]["settings"]['net.inet6.ip6.use_defaultzone'].should == '0'
790
+ @plugin["network"]["settings"]['net.inet6.ip6.maxfrags'].should == '12288'
791
+ @plugin["network"]["settings"]['net.inet6.ip6.mcast_pmtu'].should == '0'
792
+ @plugin["network"]["settings"]['net.inet6.ip6.neighborgcthresh'].should == '1024'
793
+ @plugin["network"]["settings"]['net.inet6.ip6.maxifprefixes'].should == '16'
794
+ @plugin["network"]["settings"]['net.inet6.ip6.maxifdefrouters'].should == '16'
795
+ @plugin["network"]["settings"]['net.inet6.ip6.maxdynroutes'].should == '1024'
796
+ @plugin["network"]["settings"]['net.inet6.ip6.fw.enable'].should == '1'
797
+ @plugin["network"]["settings"]['net.inet6.ip6.fw.debug'].should == '0'
798
+ @plugin["network"]["settings"]['net.inet6.ip6.fw.verbose'].should == '0'
799
+ @plugin["network"]["settings"]['net.inet6.ip6.fw.verbose_limit'].should == '0'
800
+ @plugin["network"]["settings"]['net.inet6.ip6.scopedroute'].should == '1'
801
+ @plugin["network"]["settings"]['net.inet6.ip6.select_srcif_debug'].should == '0'
802
+ @plugin["network"]["settings"]['net.inet6.ip6.mcast.maxgrpsrc'].should == '512'
803
+ @plugin["network"]["settings"]['net.inet6.ip6.mcast.maxsocksrc'].should == '128'
804
+ @plugin["network"]["settings"]['net.inet6.ip6.mcast.loop'].should == '1'
805
+ @plugin["network"]["settings"]['net.inet6.ip6.only_allow_rfc4193_prefixes'].should == '0'
806
+ @plugin["network"]["settings"]['net.inet6.ipsec6.def_policy'].should == '1'
807
+ @plugin["network"]["settings"]['net.inet6.ipsec6.esp_trans_deflev'].should == '1'
808
+ @plugin["network"]["settings"]['net.inet6.ipsec6.esp_net_deflev'].should == '1'
809
+ @plugin["network"]["settings"]['net.inet6.ipsec6.ah_trans_deflev'].should == '1'
810
+ @plugin["network"]["settings"]['net.inet6.ipsec6.ah_net_deflev'].should == '1'
811
+ @plugin["network"]["settings"]['net.inet6.ipsec6.ecn'].should == '0'
812
+ @plugin["network"]["settings"]['net.inet6.ipsec6.debug'].should == '0'
813
+ @plugin["network"]["settings"]['net.inet6.ipsec6.esp_randpad'].should == '-1'
814
+ @plugin["network"]["settings"]['net.inet6.icmp6.rediraccept'].should == '1'
815
+ @plugin["network"]["settings"]['net.inet6.icmp6.redirtimeout'].should == '600'
816
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_prune'].should == '1'
817
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_delay'].should == '5'
818
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_umaxtries'].should == '3'
819
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_mmaxtries'].should == '3'
820
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_useloopback'].should == '1'
821
+ @plugin["network"]["settings"]['net.inet6.icmp6.nodeinfo'].should == '3'
822
+ @plugin["network"]["settings"]['net.inet6.icmp6.errppslimit'].should == '500'
823
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_maxnudhint'].should == '0'
824
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_debug'].should == '0'
825
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_accept_6to4'].should == '1'
826
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_onlink_ns_rfc4861'].should == '0'
827
+ @plugin["network"]["settings"]['net.inet6.icmp6.nd6_llreach_base'].should == '30'
828
+ @plugin["network"]["settings"]['net.inet6.mld.gsrdelay'].should == '10'
829
+ @plugin["network"]["settings"]['net.inet6.mld.v1enable'].should == '1'
830
+ @plugin["network"]["settings"]['net.inet6.mld.use_allow'].should == '1'
831
+ @plugin["network"]["settings"]['net.inet6.mld.debug'].should == '0'
832
+ @plugin["network"]["settings"]['net.idle.route.expire_timeout'].should == '30'
833
+ @plugin["network"]["settings"]['net.idle.route.drain_interval'].should == '10'
834
+ @plugin["network"]["settings"]['net.statistics'].should == '1'
835
+ @plugin["network"]["settings"]['net.alf.loglevel'].should == '55'
836
+ @plugin["network"]["settings"]['net.alf.perm'].should == '0'
837
+ @plugin["network"]["settings"]['net.alf.defaultaction'].should == '1'
838
+ @plugin["network"]["settings"]['net.alf.mqcount'].should == '0'
839
+ @plugin["network"]["settings"]['net.smb.fs.version'].should == '107000'
840
+ @plugin["network"]["settings"]['net.smb.fs.loglevel'].should == '0'
841
+ @plugin["network"]["settings"]['net.smb.fs.kern_ntlmssp'].should == '0'
842
+ @plugin["network"]["settings"]['net.smb.fs.kern_deprecatePreXPServers'].should == '1'
843
+ @plugin["network"]["settings"]['net.smb.fs.kern_deadtimer'].should == '60'
844
+ @plugin["network"]["settings"]['net.smb.fs.kern_hard_deadtimer'].should == '600'
845
+ @plugin["network"]["settings"]['net.smb.fs.kern_soft_deadtimer'].should == '30'
846
+ @plugin["network"]["settings"]['net.smb.fs.tcpsndbuf'].should == '261120'
847
+ @plugin["network"]["settings"]['net.smb.fs.tcprcvbuf'].should == '261120'
851
848
  end
852
849
  end
853
850
  end