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.
- data/lib/ohai.rb +1 -1
- data/lib/ohai/application.rb +5 -12
- data/lib/ohai/common/dmi.rb +126 -0
- data/lib/ohai/config.rb +9 -9
- data/lib/ohai/{plugins/darwin/hostname.rb → dsl.rb} +7 -7
- data/lib/ohai/dsl/plugin.rb +186 -0
- data/lib/ohai/dsl/plugin/versionvi.rb +62 -0
- data/lib/ohai/dsl/plugin/versionvii.rb +106 -0
- data/lib/ohai/exception.rb +11 -2
- data/lib/ohai/hints.rb +48 -0
- data/lib/ohai/loader.rb +205 -0
- data/lib/ohai/mixin/command.rb +14 -18
- data/lib/ohai/mixin/constant_helper.rb +53 -0
- data/lib/ohai/mixin/gce_metadata.rb +0 -2
- data/lib/ohai/{plugins/freebsd/uptime.rb → mixin/network_constants.rb} +15 -13
- data/lib/ohai/mixin/os.rb +59 -0
- data/lib/ohai/mixin/seconds_to_human.rb +48 -0
- data/lib/ohai/plugins/aix/cpu.rb +26 -22
- data/lib/ohai/plugins/aix/filesystem.rb +47 -48
- data/lib/ohai/plugins/aix/kernel.rb +11 -7
- data/lib/ohai/plugins/aix/memory.rb +8 -4
- data/lib/ohai/plugins/aix/network.rb +73 -82
- data/lib/ohai/plugins/aix/platform.rb +9 -6
- data/lib/ohai/plugins/aix/uptime.rb +14 -12
- data/lib/ohai/plugins/azure.rb +33 -11
- data/lib/ohai/plugins/c.rb +103 -78
- data/lib/ohai/plugins/chef.rb +20 -8
- data/lib/ohai/plugins/cloud.rb +234 -230
- data/lib/ohai/plugins/command.rb +6 -2
- data/lib/ohai/plugins/darwin/cpu.rb +10 -4
- data/lib/ohai/plugins/darwin/filesystem.rb +32 -32
- data/lib/ohai/plugins/darwin/network.rb +157 -154
- data/lib/ohai/plugins/darwin/platform.rb +18 -16
- data/lib/ohai/plugins/darwin/system_profiler.rb +49 -46
- data/lib/ohai/plugins/dmi.rb +102 -102
- data/lib/ohai/plugins/ec2.rb +30 -28
- data/lib/ohai/plugins/erlang.rb +19 -16
- data/lib/ohai/plugins/eucalyptus.rb +37 -36
- data/lib/ohai/plugins/freebsd/cpu.rb +34 -29
- data/lib/ohai/plugins/freebsd/filesystem.rb +32 -32
- data/lib/ohai/plugins/freebsd/memory.rb +35 -25
- data/lib/ohai/plugins/freebsd/network.rb +94 -89
- data/lib/ohai/plugins/freebsd/platform.rb +10 -4
- data/lib/ohai/plugins/freebsd/virtualization.rb +62 -61
- data/lib/ohai/plugins/gce.rb +30 -36
- data/lib/ohai/plugins/groovy.rb +14 -11
- data/lib/ohai/plugins/hostname.rb +132 -10
- data/lib/ohai/plugins/ip_scopes.rb +31 -16
- data/lib/ohai/plugins/java.rb +45 -21
- data/lib/ohai/plugins/kernel.rb +186 -19
- data/lib/ohai/plugins/keys.rb +6 -2
- data/lib/ohai/plugins/languages.rb +6 -2
- data/lib/ohai/plugins/linode.rb +38 -30
- data/lib/ohai/plugins/linux/block_device.rb +19 -15
- data/lib/ohai/plugins/linux/cpu.rb +42 -38
- data/lib/ohai/plugins/linux/filesystem.rb +70 -130
- data/lib/ohai/plugins/linux/lsb.rb +35 -35
- data/lib/ohai/plugins/linux/memory.rb +65 -61
- data/lib/ohai/plugins/linux/network.rb +343 -362
- data/lib/ohai/plugins/linux/platform.rb +90 -88
- data/lib/ohai/plugins/linux/virtualization.rb +95 -90
- data/lib/ohai/plugins/lua.rb +14 -10
- data/lib/ohai/plugins/mono.rb +17 -13
- data/lib/ohai/plugins/netbsd/cpu.rb +25 -23
- data/lib/ohai/plugins/netbsd/filesystem.rb +32 -32
- data/lib/ohai/plugins/netbsd/memory.rb +59 -59
- data/lib/ohai/plugins/netbsd/network.rb +92 -88
- data/lib/ohai/plugins/netbsd/platform.rb +10 -3
- data/lib/ohai/plugins/netbsd/virtualization.rb +41 -38
- data/lib/ohai/plugins/network.rb +131 -130
- data/lib/ohai/plugins/network_listeners.rb +26 -22
- data/lib/ohai/plugins/nodejs.rb +14 -10
- data/lib/ohai/plugins/ohai.rb +11 -6
- data/lib/ohai/plugins/ohai_time.rb +6 -2
- data/lib/ohai/plugins/openbsd/cpu.rb +20 -15
- data/lib/ohai/plugins/openbsd/filesystem.rb +32 -32
- data/lib/ohai/plugins/openbsd/memory.rb +59 -59
- data/lib/ohai/plugins/openbsd/network.rb +92 -88
- data/lib/ohai/plugins/openbsd/platform.rb +10 -4
- data/lib/ohai/plugins/openbsd/virtualization.rb +41 -39
- data/lib/ohai/plugins/openstack.rb +23 -21
- data/lib/ohai/plugins/os.rb +8 -32
- data/lib/ohai/plugins/passwd.rb +27 -22
- data/lib/ohai/plugins/perl.rb +21 -16
- data/lib/ohai/plugins/php.rb +15 -12
- data/lib/ohai/plugins/platform.rb +9 -9
- data/lib/ohai/plugins/{linux/kernel.rb → ps.rb} +13 -12
- data/lib/ohai/plugins/python.rb +16 -12
- data/lib/ohai/plugins/rackspace.rb +82 -77
- data/lib/ohai/plugins/root_group.rb +13 -9
- data/lib/ohai/plugins/ruby.rb +50 -48
- data/lib/ohai/plugins/sigar/cpu.rb +21 -17
- data/lib/ohai/plugins/sigar/filesystem.rb +26 -23
- data/lib/ohai/plugins/sigar/memory.rb +17 -14
- data/lib/ohai/plugins/sigar/network.rb +133 -67
- data/lib/ohai/plugins/sigar/network_route.rb +33 -28
- data/lib/ohai/plugins/sigar/platform.rb +10 -6
- data/lib/ohai/plugins/solaris2/cpu.rb +41 -33
- data/lib/ohai/plugins/solaris2/dmi.rb +146 -146
- data/lib/ohai/plugins/solaris2/filesystem.rb +74 -77
- data/lib/ohai/plugins/{aix/hostname.rb → solaris2/memory.rb} +7 -4
- data/lib/ohai/plugins/solaris2/network.rb +91 -86
- data/lib/ohai/plugins/solaris2/platform.rb +40 -36
- data/lib/ohai/plugins/solaris2/virtualization.rb +54 -59
- data/lib/ohai/plugins/solaris2/zpools.rb +38 -38
- data/lib/ohai/plugins/ssh_host_key.rb +49 -45
- data/lib/ohai/plugins/uptime.rb +87 -25
- data/lib/ohai/plugins/virtualization.rb +59 -55
- data/lib/ohai/plugins/windows/cpu.rb +44 -40
- data/lib/ohai/plugins/windows/filesystem.rb +28 -22
- data/lib/ohai/plugins/windows/network.rb +88 -79
- data/lib/ohai/plugins/windows/platform.rb +10 -3
- data/lib/ohai/provides_map.rb +184 -0
- data/lib/ohai/runner.rb +109 -0
- data/lib/ohai/system.rb +103 -184
- data/lib/ohai/version.rb +4 -3
- data/spec/data/plugins/___lib64___libc.so.6.output +135 -0
- data/spec/data/plugins/___lib___libc.so.6.output +135 -0
- data/spec/data/plugins/cc.output +135 -0
- data/spec/data/plugins/cl.output +135 -0
- data/spec/data/plugins/devenv.com.output +135 -0
- data/spec/data/plugins/env.output +71 -0
- data/spec/data/plugins/erl.output +144 -0
- data/spec/data/plugins/gcc.output +135 -0
- data/spec/data/plugins/groovy.output +159 -0
- data/spec/data/plugins/java.output +143 -0
- data/spec/data/plugins/lua.output +143 -0
- data/spec/data/plugins/messages.rb +8 -0
- data/spec/data/plugins/node.output +143 -0
- data/spec/data/plugins/perl.output +143 -0
- data/spec/data/plugins/php.output +143 -0
- data/spec/data/plugins/python.output +143 -0
- data/spec/data/plugins/uname.output +71 -0
- data/spec/data/plugins/v6message.rb +2 -0
- data/spec/data/plugins/v7message.rb +7 -0
- data/spec/data/plugins/what.output +135 -0
- data/spec/data/plugins/xlc.output +135 -0
- data/spec/spec_helper.rb +52 -18
- data/spec/support/integration_helper.rb +44 -0
- data/spec/unit/dsl/plugin_spec.rb +298 -0
- data/spec/unit/hints_spec.rb +65 -0
- data/spec/unit/loader_spec.rb +226 -0
- data/spec/unit/mixin/ec2_metadata_spec.rb +9 -9
- data/spec/unit/plugins/aix/cpu_spec.rb +17 -18
- data/spec/unit/plugins/aix/filesystem_spec.rb +20 -18
- data/spec/unit/plugins/aix/hostname_spec.rb +8 -4
- data/spec/unit/plugins/aix/kernel_spec.rb +13 -12
- data/spec/unit/plugins/aix/network_spec.rb +66 -45
- data/spec/unit/plugins/aix/platform_spec.rb +11 -10
- data/spec/unit/plugins/aix/uptime_spec.rb +7 -8
- data/spec/unit/plugins/azure_spec.rb +20 -21
- data/spec/unit/plugins/c_spec.rb +88 -87
- data/spec/unit/plugins/chef_spec.rb +5 -6
- data/spec/unit/plugins/cloud_spec.rb +81 -82
- data/spec/unit/plugins/darwin/cpu_spec.rb +8 -9
- data/spec/unit/plugins/darwin/hostname_spec.rb +23 -11
- data/spec/unit/plugins/darwin/kernel_spec.rb +39 -16
- data/spec/unit/plugins/darwin/network_spec.rb +375 -378
- data/spec/unit/plugins/darwin/platform_spec.rb +23 -50
- data/spec/unit/plugins/darwin/system_profiler_spec.rb +7 -8
- data/spec/unit/plugins/dmi_spec.rb +7 -12
- data/spec/unit/plugins/ec2_spec.rb +70 -59
- data/spec/unit/plugins/erlang_spec.rb +18 -20
- data/spec/unit/plugins/eucalyptus_spec.rb +37 -33
- data/spec/unit/plugins/fail_spec.rb +276 -23
- data/spec/unit/plugins/freebsd/hostname_spec.rb +11 -9
- data/spec/unit/plugins/freebsd/kernel_spec.rb +8 -8
- data/spec/unit/plugins/freebsd/platform_spec.rb +9 -10
- data/spec/unit/plugins/freebsd/virtualization_spec.rb +32 -32
- data/spec/unit/plugins/gce_spec.rb +19 -25
- data/spec/unit/plugins/groovy_spec.rb +10 -16
- data/spec/unit/plugins/hostname_spec.rb +45 -20
- data/spec/unit/plugins/ip_scopes_spec.rb +97 -0
- data/spec/unit/plugins/java_spec.rb +145 -99
- data/spec/unit/plugins/kernel_spec.rb +51 -15
- data/spec/unit/plugins/linode_spec.rb +31 -29
- data/spec/unit/plugins/linux/cpu_spec.rb +42 -43
- data/spec/unit/plugins/linux/filesystem_spec.rb +143 -324
- data/spec/unit/plugins/linux/hostname_spec.rb +16 -23
- data/spec/unit/plugins/linux/kernel_spec.rb +22 -8
- data/spec/unit/plugins/linux/lsb_spec.rb +54 -56
- data/spec/unit/plugins/linux/network_spec.rb +196 -238
- data/spec/unit/plugins/linux/platform_spec.rb +186 -205
- data/spec/unit/plugins/linux/uptime_spec.rb +13 -25
- data/spec/unit/plugins/linux/virtualization_spec.rb +149 -129
- data/spec/unit/plugins/lua_spec.rb +12 -15
- data/spec/unit/plugins/mono_spec.rb +10 -15
- data/spec/unit/plugins/netbsd/hostname_spec.rb +17 -7
- data/spec/unit/plugins/netbsd/kernel_spec.rb +8 -8
- data/spec/unit/plugins/netbsd/platform_spec.rb +8 -10
- data/spec/unit/plugins/network_spec.rb +358 -235
- data/spec/unit/plugins/nodejs_spec.rb +13 -15
- data/spec/unit/plugins/ohai_spec.rb +3 -4
- data/spec/unit/plugins/ohai_time_spec.rb +8 -9
- data/spec/unit/plugins/openbsd/hostname_spec.rb +21 -11
- data/spec/unit/plugins/openbsd/kernel_spec.rb +8 -8
- data/spec/unit/plugins/openbsd/platform_spec.rb +6 -12
- data/spec/unit/plugins/openstack_spec.rb +214 -0
- data/spec/unit/plugins/os_spec.rb +13 -16
- data/spec/unit/plugins/passwd_spec.rb +12 -13
- data/spec/unit/plugins/perl_spec.rb +20 -44
- data/spec/unit/plugins/php_spec.rb +20 -15
- data/spec/unit/plugins/platform_spec.rb +24 -29
- data/spec/unit/plugins/python_spec.rb +13 -17
- data/spec/unit/plugins/rackspace_spec.rb +90 -57
- data/spec/unit/plugins/root_group_spec.rb +17 -19
- data/spec/unit/plugins/ruby_spec.rb +15 -16
- data/spec/unit/plugins/sigar/network_route_spec.rb +12 -13
- data/spec/unit/plugins/solaris2/cpu_spec.rb +82 -0
- data/spec/unit/plugins/solaris2/hostname_spec.rb +12 -13
- data/spec/unit/plugins/solaris2/kernel_spec.rb +11 -15
- data/{lib/ohai/plugins/openbsd/uptime.rb → spec/unit/plugins/solaris2/memory_spec.rb} +10 -12
- data/spec/unit/plugins/solaris2/network_spec.rb +44 -20
- data/spec/unit/plugins/solaris2/platform_spec.rb +13 -22
- data/spec/unit/plugins/solaris2/virtualization_spec.rb +37 -45
- data/spec/unit/plugins/ssh_host_keys_spec.rb +11 -15
- data/spec/unit/provides_map_spec.rb +208 -0
- data/spec/unit/runner_spec.rb +488 -0
- data/spec/unit/system_spec.rb +639 -104
- metadata +151 -87
- checksums.yaml +0 -7
- data/lib/ohai/mixin/from_file.rb +0 -36
- data/lib/ohai/plugins/aix/ps.rb +0 -23
- data/lib/ohai/plugins/darwin/kernel.rb +0 -37
- data/lib/ohai/plugins/darwin/ps.rb +0 -23
- data/lib/ohai/plugins/darwin/uptime.rb +0 -32
- data/lib/ohai/plugins/dmi_common.rb +0 -121
- data/lib/ohai/plugins/freebsd/hostname.rb +0 -22
- data/lib/ohai/plugins/freebsd/kernel.rb +0 -37
- data/lib/ohai/plugins/freebsd/ps.rb +0 -24
- data/lib/ohai/plugins/hpux/cpu.rb +0 -19
- data/lib/ohai/plugins/hpux/filesystem.rb +0 -19
- data/lib/ohai/plugins/hpux/hostname.rb +0 -19
- data/lib/ohai/plugins/hpux/memory.rb +0 -19
- data/lib/ohai/plugins/hpux/network.rb +0 -19
- data/lib/ohai/plugins/hpux/platform.rb +0 -19
- data/lib/ohai/plugins/hpux/ps.rb +0 -23
- data/lib/ohai/plugins/hpux/uptime.rb +0 -19
- data/lib/ohai/plugins/linux/hostname.rb +0 -40
- data/lib/ohai/plugins/linux/ps.rb +0 -23
- data/lib/ohai/plugins/linux/uptime.rb +0 -28
- data/lib/ohai/plugins/netbsd/hostname.rb +0 -22
- data/lib/ohai/plugins/netbsd/kernel.rb +0 -35
- data/lib/ohai/plugins/netbsd/ps.rb +0 -24
- data/lib/ohai/plugins/netbsd/uptime.rb +0 -31
- data/lib/ohai/plugins/openbsd/hostname.rb +0 -22
- data/lib/ohai/plugins/openbsd/kernel.rb +0 -35
- data/lib/ohai/plugins/openbsd/ps.rb +0 -24
- data/lib/ohai/plugins/sigar/hostname.rb +0 -28
- data/lib/ohai/plugins/sigar/uptime.rb +0 -27
- data/lib/ohai/plugins/solaris2/hostname.rb +0 -34
- data/lib/ohai/plugins/solaris2/kernel.rb +0 -40
- data/lib/ohai/plugins/solaris2/ps.rb +0 -23
- data/lib/ohai/plugins/solaris2/uptime.rb +0 -36
- data/lib/ohai/plugins/windows/hostname.rb +0 -33
- data/lib/ohai/plugins/windows/kernel.rb +0 -58
- data/lib/ohai/plugins/windows/kernel_devices.rb +0 -39
- data/lib/ohai/plugins/windows/uptime.rb +0 -23
- 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
|
-
@
|
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
|
-
@
|
29
|
-
@
|
30
|
-
@
|
31
|
-
@
|
32
|
-
@
|
33
|
-
@
|
34
|
-
@
|
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
|
-
@
|
39
|
+
@plugin[:ec2] = Mash.new()
|
41
40
|
end
|
42
41
|
|
43
42
|
it "populates cloud public ip" do
|
44
|
-
@
|
45
|
-
@
|
46
|
-
@
|
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
|
-
@
|
51
|
-
@
|
52
|
-
@
|
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
|
-
@
|
57
|
-
@
|
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
|
-
@
|
62
|
+
@plugin[:rackspace] = Mash.new()
|
64
63
|
end
|
65
64
|
|
66
65
|
it "populates cloud public ip" do
|
67
|
-
@
|
68
|
-
@
|
69
|
-
@
|
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
|
-
@
|
74
|
-
@
|
75
|
-
@
|
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
|
-
@
|
80
|
-
@
|
81
|
-
@
|
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
|
-
@
|
86
|
-
@
|
87
|
-
@
|
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
|
-
@
|
92
|
-
@
|
93
|
-
@
|
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
|
-
@
|
98
|
-
@
|
99
|
-
@
|
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
|
-
@
|
104
|
-
@
|
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
|
-
@
|
109
|
+
@plugin[:linode] = Mash.new()
|
111
110
|
end
|
112
111
|
|
113
112
|
it "populates cloud public ip" do
|
114
|
-
@
|
115
|
-
@
|
116
|
-
@
|
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
|
-
@
|
121
|
-
@
|
122
|
-
@
|
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
|
-
@
|
127
|
-
@
|
128
|
-
@
|
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
|
-
@
|
133
|
-
@
|
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
|
-
@
|
138
|
+
@plugin[:eucalyptus] = Mash.new()
|
140
139
|
end
|
141
140
|
|
142
141
|
it "populates cloud public ip" do
|
143
|
-
@
|
144
|
-
@
|
145
|
-
@
|
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
|
-
@
|
150
|
-
@
|
151
|
-
@
|
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
|
-
@
|
156
|
-
@
|
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
|
-
@
|
161
|
+
@plugin[:azure] = Mash.new()
|
163
162
|
end
|
164
163
|
|
165
164
|
it "populates cloud public ip" do
|
166
|
-
@
|
167
|
-
@
|
168
|
-
@
|
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
|
-
@
|
173
|
-
@
|
174
|
-
@
|
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
|
-
@
|
179
|
-
@
|
180
|
-
@
|
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
|
-
@
|
185
|
-
@
|
186
|
-
@
|
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
|
-
@
|
191
|
-
@
|
192
|
-
@
|
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
|
-
@
|
197
|
-
@
|
198
|
-
@
|
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
|
-
@
|
203
|
-
@
|
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
|
-
@
|
25
|
-
@
|
26
|
-
@
|
27
|
-
@
|
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
|
-
@
|
33
|
-
@
|
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
|
-
@
|
38
|
-
@
|
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
|
-
@
|
25
|
-
@
|
26
|
-
@
|
27
|
-
@
|
28
|
-
@
|
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("
|
34
|
-
|
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
|
-
@
|
25
|
-
@
|
26
|
-
@
|
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
|
-
@
|
32
|
-
@
|
33
|
-
@
|
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
|
-
@
|
38
|
-
@
|
39
|
-
@
|
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
|
-
@
|
44
|
-
@
|
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
|
-
@
|
416
|
-
@
|
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
|
-
@
|
429
|
-
@
|
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
|
-
@
|
438
|
-
@
|
439
|
-
@
|
440
|
-
@
|
441
|
-
@
|
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
|
-
@
|
442
|
+
@plugin['network'].should_not be_nil
|
446
443
|
end
|
447
444
|
|
448
445
|
it "detects the interfaces" do
|
449
|
-
@
|
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
|
-
@
|
454
|
-
@
|
455
|
-
@
|
456
|
-
@
|
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
|
-
@
|
461
|
-
@
|
462
|
-
@
|
463
|
-
@
|
464
|
-
|
465
|
-
@
|
466
|
-
@
|
467
|
-
@
|
468
|
-
@
|
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
|
-
@
|
473
|
-
@
|
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
|
-
@
|
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
|
-
@
|
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
|
-
@
|
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
|
-
@
|
491
|
-
@
|
492
|
-
@
|
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
|
-
@
|
497
|
-
@
|
498
|
-
@
|
499
|
-
@
|
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
|
-
@
|
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
|
-
@
|
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
|
-
@
|
508
|
+
@plugin['network']['interfaces']['lo0']['mtu'].should == "16384"
|
512
509
|
end
|
513
510
|
|
514
511
|
it "detects the arp entries" do
|
515
|
-
@
|
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
|
-
@
|
520
|
-
@
|
521
|
-
@
|
522
|
-
@
|
523
|
-
@
|
524
|
-
@
|
525
|
-
|
526
|
-
@
|
527
|
-
@
|
528
|
-
@
|
529
|
-
@
|
530
|
-
@
|
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
|
-
@
|
535
|
-
@
|
536
|
-
@
|
537
|
-
@
|
538
|
-
@
|
539
|
-
@
|
540
|
-
|
541
|
-
@
|
542
|
-
@
|
543
|
-
@
|
544
|
-
@
|
545
|
-
@
|
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
|
-
@
|
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
|
-
@
|
550
|
+
@plugin['network'][:default_gateway].should == '10.20.10.1'
|
554
551
|
end
|
555
552
|
|
556
553
|
it "should detect network settings" do
|
557
|
-
@
|
558
|
-
@
|
559
|
-
@
|
560
|
-
@
|
561
|
-
@
|
562
|
-
@
|
563
|
-
@
|
564
|
-
@
|
565
|
-
@
|
566
|
-
@
|
567
|
-
@
|
568
|
-
@
|
569
|
-
@
|
570
|
-
@
|
571
|
-
@
|
572
|
-
@
|
573
|
-
@
|
574
|
-
@
|
575
|
-
@
|
576
|
-
@
|
577
|
-
@
|
578
|
-
@
|
579
|
-
@
|
580
|
-
@
|
581
|
-
@
|
582
|
-
@
|
583
|
-
@
|
584
|
-
@
|
585
|
-
@
|
586
|
-
@
|
587
|
-
@
|
588
|
-
@
|
589
|
-
@
|
590
|
-
@
|
591
|
-
@
|
592
|
-
@
|
593
|
-
@
|
594
|
-
@
|
595
|
-
@
|
596
|
-
@
|
597
|
-
@
|
598
|
-
@
|
599
|
-
@
|
600
|
-
@
|
601
|
-
@
|
602
|
-
@
|
603
|
-
@
|
604
|
-
@
|
605
|
-
@
|
606
|
-
@
|
607
|
-
@
|
608
|
-
@
|
609
|
-
@
|
610
|
-
@
|
611
|
-
@
|
612
|
-
@
|
613
|
-
@
|
614
|
-
@
|
615
|
-
@
|
616
|
-
@
|
617
|
-
@
|
618
|
-
@
|
619
|
-
@
|
620
|
-
@
|
621
|
-
@
|
622
|
-
@
|
623
|
-
@
|
624
|
-
@
|
625
|
-
@
|
626
|
-
@
|
627
|
-
@
|
628
|
-
@
|
629
|
-
@
|
630
|
-
@
|
631
|
-
@
|
632
|
-
@
|
633
|
-
@
|
634
|
-
@
|
635
|
-
@
|
636
|
-
@
|
637
|
-
@
|
638
|
-
@
|
639
|
-
@
|
640
|
-
@
|
641
|
-
@
|
642
|
-
@
|
643
|
-
@
|
644
|
-
@
|
645
|
-
@
|
646
|
-
@
|
647
|
-
@
|
648
|
-
@
|
649
|
-
@
|
650
|
-
@
|
651
|
-
@
|
652
|
-
@
|
653
|
-
@
|
654
|
-
@
|
655
|
-
@
|
656
|
-
@
|
657
|
-
@
|
658
|
-
@
|
659
|
-
@
|
660
|
-
@
|
661
|
-
@
|
662
|
-
@
|
663
|
-
@
|
664
|
-
@
|
665
|
-
@
|
666
|
-
@
|
667
|
-
@
|
668
|
-
@
|
669
|
-
@
|
670
|
-
@
|
671
|
-
@
|
672
|
-
@
|
673
|
-
@
|
674
|
-
@
|
675
|
-
@
|
676
|
-
@
|
677
|
-
@
|
678
|
-
@
|
679
|
-
@
|
680
|
-
@
|
681
|
-
@
|
682
|
-
@
|
683
|
-
@
|
684
|
-
@
|
685
|
-
@
|
686
|
-
@
|
687
|
-
@
|
688
|
-
@
|
689
|
-
@
|
690
|
-
@
|
691
|
-
@
|
692
|
-
@
|
693
|
-
@
|
694
|
-
@
|
695
|
-
@
|
696
|
-
@
|
697
|
-
@
|
698
|
-
@
|
699
|
-
@
|
700
|
-
@
|
701
|
-
@
|
702
|
-
@
|
703
|
-
@
|
704
|
-
@
|
705
|
-
@
|
706
|
-
@
|
707
|
-
@
|
708
|
-
@
|
709
|
-
@
|
710
|
-
@
|
711
|
-
@
|
712
|
-
@
|
713
|
-
@
|
714
|
-
@
|
715
|
-
@
|
716
|
-
@
|
717
|
-
@
|
718
|
-
@
|
719
|
-
@
|
720
|
-
@
|
721
|
-
@
|
722
|
-
@
|
723
|
-
@
|
724
|
-
@
|
725
|
-
@
|
726
|
-
@
|
727
|
-
@
|
728
|
-
@
|
729
|
-
@
|
730
|
-
@
|
731
|
-
@
|
732
|
-
@
|
733
|
-
@
|
734
|
-
@
|
735
|
-
@
|
736
|
-
@
|
737
|
-
@
|
738
|
-
@
|
739
|
-
@
|
740
|
-
@
|
741
|
-
@
|
742
|
-
@
|
743
|
-
@
|
744
|
-
@
|
745
|
-
@
|
746
|
-
@
|
747
|
-
@
|
748
|
-
@
|
749
|
-
@
|
750
|
-
@
|
751
|
-
@
|
752
|
-
@
|
753
|
-
@
|
754
|
-
@
|
755
|
-
@
|
756
|
-
@
|
757
|
-
@
|
758
|
-
@
|
759
|
-
@
|
760
|
-
@
|
761
|
-
@
|
762
|
-
@
|
763
|
-
@
|
764
|
-
@
|
765
|
-
@
|
766
|
-
@
|
767
|
-
@
|
768
|
-
@
|
769
|
-
@
|
770
|
-
@
|
771
|
-
@
|
772
|
-
@
|
773
|
-
@
|
774
|
-
@
|
775
|
-
@
|
776
|
-
@
|
777
|
-
@
|
778
|
-
@
|
779
|
-
@
|
780
|
-
@
|
781
|
-
@
|
782
|
-
@
|
783
|
-
@
|
784
|
-
@
|
785
|
-
@
|
786
|
-
@
|
787
|
-
@
|
788
|
-
@
|
789
|
-
@
|
790
|
-
@
|
791
|
-
@
|
792
|
-
@
|
793
|
-
@
|
794
|
-
@
|
795
|
-
@
|
796
|
-
@
|
797
|
-
@
|
798
|
-
@
|
799
|
-
@
|
800
|
-
@
|
801
|
-
@
|
802
|
-
@
|
803
|
-
@
|
804
|
-
@
|
805
|
-
@
|
806
|
-
@
|
807
|
-
@
|
808
|
-
@
|
809
|
-
@
|
810
|
-
@
|
811
|
-
@
|
812
|
-
@
|
813
|
-
@
|
814
|
-
@
|
815
|
-
@
|
816
|
-
@
|
817
|
-
@
|
818
|
-
@
|
819
|
-
@
|
820
|
-
@
|
821
|
-
@
|
822
|
-
@
|
823
|
-
@
|
824
|
-
@
|
825
|
-
@
|
826
|
-
@
|
827
|
-
@
|
828
|
-
@
|
829
|
-
@
|
830
|
-
@
|
831
|
-
@
|
832
|
-
@
|
833
|
-
@
|
834
|
-
@
|
835
|
-
@
|
836
|
-
@
|
837
|
-
@
|
838
|
-
@
|
839
|
-
@
|
840
|
-
@
|
841
|
-
@
|
842
|
-
@
|
843
|
-
@
|
844
|
-
@
|
845
|
-
@
|
846
|
-
@
|
847
|
-
@
|
848
|
-
@
|
849
|
-
@
|
850
|
-
@
|
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
|