ohai 14.15.0 → 15.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/ohai/application.rb +0 -4
- data/lib/ohai/common/dmi.rb +43 -43
- data/lib/ohai/config.rb +1 -1
- data/lib/ohai/loader.rb +32 -47
- data/lib/ohai/mixin/dmi_decode.rb +29 -32
- data/lib/ohai/mixin/os.rb +0 -2
- data/lib/ohai/mixin/softlayer_metadata.rb +5 -5
- data/lib/ohai/plugins/aix/virtualization.rb +4 -4
- data/lib/ohai/plugins/bsd/virtualization.rb +10 -12
- data/lib/ohai/plugins/c.rb +0 -20
- data/lib/ohai/plugins/elixir.rb +13 -13
- data/lib/ohai/plugins/filesystem.rb +10 -10
- data/lib/ohai/plugins/gce.rb +42 -8
- data/lib/ohai/plugins/go.rb +11 -11
- data/lib/ohai/plugins/groovy.rb +12 -12
- data/lib/ohai/plugins/hostname.rb +9 -2
- data/lib/ohai/plugins/linux/fips.rb +2 -9
- data/lib/ohai/plugins/linux/memory.rb +5 -0
- data/lib/ohai/plugins/linux/network.rb +1 -1
- data/lib/ohai/plugins/linux/platform.rb +84 -83
- data/lib/ohai/plugins/linux/systemd_paths.rb +0 -3
- data/lib/ohai/plugins/linux/virtualization.rb +10 -20
- data/lib/ohai/plugins/lua.rb +13 -13
- data/lib/ohai/plugins/mono.rb +23 -23
- data/lib/ohai/plugins/nodejs.rb +13 -13
- data/lib/ohai/plugins/openstack.rb +1 -1
- data/lib/ohai/plugins/packages.rb +1 -28
- data/lib/ohai/plugins/perl.rb +17 -17
- data/lib/ohai/plugins/php.rb +22 -22
- data/lib/ohai/plugins/powershell.rb +30 -30
- data/lib/ohai/plugins/ps.rb +1 -1
- data/lib/ohai/plugins/python.rb +15 -15
- data/lib/ohai/plugins/rust.rb +11 -11
- data/lib/ohai/plugins/solaris2/dmi.rb +48 -48
- data/lib/ohai/plugins/solaris2/virtualization.rb +8 -10
- data/lib/ohai/plugins/virtualbox.rb +21 -21
- data/lib/ohai/plugins/windows/filesystem.rb +2 -2
- data/lib/ohai/plugins/windows/fips.rb +2 -21
- data/lib/ohai/plugins/windows/virtualization.rb +9 -35
- data/lib/ohai/runner.rb +2 -2
- data/lib/ohai/system.rb +0 -17
- data/lib/ohai/version.rb +1 -1
- data/ohai.gemspec +2 -2
- data/spec/data/plugins/rpmquery.output +0 -2
- data/spec/functional/application_spec.rb +1 -1
- data/spec/functional/loader_spec.rb +2 -2
- data/spec/functional/plugins/powershell_spec.rb +2 -2
- data/spec/functional/plugins/root_group_spec.rb +1 -1
- data/spec/functional/plugins/windows/uptime_spec.rb +2 -2
- data/spec/ohai_spec.rb +1 -1
- data/spec/unit/application_spec.rb +1 -1
- data/spec/unit/config_spec.rb +1 -1
- data/spec/unit/dsl/plugin_spec.rb +1 -1
- data/spec/unit/hints_spec.rb +2 -2
- data/spec/unit/loader_spec.rb +12 -12
- data/spec/unit/mixin/azure_metadata_spec.rb +1 -1
- data/spec/unit/mixin/command_spec.rb +1 -1
- data/spec/unit/mixin/dmi_decode.rb +68 -0
- data/spec/unit/mixin/ec2_metadata_spec.rb +1 -1
- data/spec/unit/mixin/softlayer_metadata_spec.rb +1 -1
- data/spec/unit/plugin_config_spec.rb +1 -1
- data/spec/unit/plugins/abort_spec.rb +9 -9
- data/spec/unit/plugins/aix/cpu_spec.rb +4 -4
- data/spec/unit/plugins/aix/filesystem_spec.rb +5 -5
- data/spec/unit/plugins/aix/hostname_spec.rb +1 -1
- data/spec/unit/plugins/aix/kernel_spec.rb +1 -1
- data/spec/unit/plugins/aix/memory_spec.rb +1 -1
- data/spec/unit/plugins/aix/network_spec.rb +6 -6
- data/spec/unit/plugins/aix/platform_spec.rb +1 -1
- data/spec/unit/plugins/aix/uptime_spec.rb +1 -1
- data/spec/unit/plugins/aix/virtualization_spec.rb +2 -2
- data/spec/unit/plugins/azure_spec.rb +1 -1
- data/spec/unit/plugins/bsd/filesystem_spec.rb +4 -4
- data/spec/unit/plugins/bsd/virtualization_spec.rb +3 -3
- data/spec/unit/plugins/c_spec.rb +1 -53
- data/spec/unit/plugins/chef_spec.rb +1 -1
- data/spec/unit/plugins/cloud_spec.rb +1 -1
- data/spec/unit/plugins/darwin/cpu_spec.rb +2 -2
- data/spec/unit/plugins/darwin/filesystem_spec.rb +5 -5
- data/spec/unit/plugins/darwin/hardware_spec.rb +2 -2
- data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +3 -3
- data/spec/unit/plugins/darwin/hostname_spec.rb +1 -1
- data/spec/unit/plugins/darwin/kernel_spec.rb +1 -1
- data/spec/unit/plugins/darwin/memory_spec.rb +1 -1
- data/spec/unit/plugins/darwin/network_spec.rb +1 -1
- data/spec/unit/plugins/darwin/platform_spec.rb +1 -1
- data/spec/unit/plugins/darwin/virtualization_spec.rb +1 -1
- data/spec/unit/plugins/dmi_spec.rb +1 -1
- data/spec/unit/plugins/docker_spec.rb +1 -1
- data/spec/unit/plugins/ec2_spec.rb +1 -1
- data/spec/unit/plugins/elixir_spec.rb +1 -1
- data/spec/unit/plugins/erlang_spec.rb +1 -1
- data/spec/unit/plugins/eucalyptus_spec.rb +1 -1
- data/spec/unit/plugins/fail_spec.rb +28 -28
- data/spec/unit/plugins/freebsd/cpu_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/gce_spec.rb +1 -1
- data/spec/unit/plugins/go_spec.rb +1 -1
- data/spec/unit/plugins/groovy_spec.rb +1 -1
- data/spec/unit/plugins/haskell_spec.rb +1 -1
- data/spec/unit/plugins/hostname_spec.rb +68 -1
- data/spec/unit/plugins/init_package_spec.rb +1 -1
- data/spec/unit/plugins/java_spec.rb +1 -1
- data/spec/unit/plugins/joyent_spec.rb +3 -3
- data/spec/unit/plugins/kernel_spec.rb +1 -1
- data/spec/unit/plugins/linode_spec.rb +1 -1
- data/spec/unit/plugins/linux/block_device_spec.rb +1 -1
- data/spec/unit/plugins/linux/cpu_spec.rb +6 -6
- data/spec/unit/plugins/linux/filesystem_spec.rb +21 -21
- data/spec/unit/plugins/linux/fips_spec.rb +13 -45
- data/spec/unit/plugins/linux/hostname_spec.rb +1 -1
- data/spec/unit/plugins/linux/hostnamectl_spec.rb +2 -2
- data/spec/unit/plugins/linux/kernel_spec.rb +8 -8
- data/spec/unit/plugins/linux/lsb_spec.rb +3 -3
- data/spec/unit/plugins/linux/lspci_spec.rb +2 -2
- data/spec/unit/plugins/linux/machineid_spec.rb +1 -1
- data/spec/unit/plugins/linux/mdadm_spec.rb +2 -2
- data/spec/unit/plugins/linux/memory_spec.rb +26 -1
- data/spec/unit/plugins/linux/network_spec.rb +37 -37
- data/spec/unit/plugins/linux/platform_spec.rb +580 -837
- data/spec/unit/plugins/linux/sessions_spec.rb +2 -2
- data/spec/unit/plugins/linux/systemd_paths_spec.rb +1 -1
- data/spec/unit/plugins/linux/uptime_spec.rb +1 -1
- data/spec/unit/plugins/linux/virtualization_spec.rb +28 -227
- data/spec/unit/plugins/lua_spec.rb +1 -1
- data/spec/unit/plugins/mono_spec.rb +2 -2
- data/spec/unit/plugins/netbsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/netbsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/netbsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/network_spec.rb +11 -11
- data/spec/unit/plugins/nodejs_spec.rb +1 -1
- data/spec/unit/plugins/ohai_spec.rb +1 -1
- data/spec/unit/plugins/ohai_time_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/openstack_spec.rb +8 -4
- data/spec/unit/plugins/os_spec.rb +1 -1
- data/spec/unit/plugins/packages_spec.rb +1 -21
- data/spec/unit/plugins/passwd_spec.rb +1 -1
- data/spec/unit/plugins/perl_spec.rb +1 -1
- data/spec/unit/plugins/php_spec.rb +6 -6
- data/spec/unit/plugins/platform_spec.rb +1 -1
- data/spec/unit/plugins/powershell_spec.rb +3 -3
- data/spec/unit/plugins/python_spec.rb +1 -1
- data/spec/unit/plugins/rackspace_spec.rb +2 -2
- data/spec/unit/plugins/root_group_spec.rb +1 -11
- data/spec/unit/plugins/ruby_spec.rb +1 -1
- data/spec/unit/plugins/rust_spec.rb +1 -1
- data/spec/unit/plugins/scala_spec.rb +1 -1
- data/spec/unit/plugins/scsi_spec.rb +2 -2
- data/spec/unit/plugins/shard_spec.rb +1 -1
- data/spec/unit/plugins/shells_spec.rb +1 -1
- data/spec/unit/plugins/softlayer_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/cpu_spec.rb +3 -3
- data/spec/unit/plugins/solaris2/dmi_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/filesystem.rb +4 -4
- data/spec/unit/plugins/solaris2/hostname_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/kernel_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/memory_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/network_spec.rb +6 -6
- data/spec/unit/plugins/solaris2/platform_spec.rb +3 -3
- data/spec/unit/plugins/solaris2/virtualization_spec.rb +41 -69
- data/spec/unit/plugins/ssh_host_keys_spec.rb +3 -3
- data/spec/unit/plugins/sysconf_spec.rb +2 -2
- data/spec/unit/plugins/timezone_spec.rb +1 -1
- data/spec/unit/plugins/virtualbox_spec.rb +1 -1
- data/spec/unit/plugins/vmware_spec.rb +1 -1
- data/spec/unit/plugins/windows/cpu_spec.rb +1 -2
- data/spec/unit/plugins/windows/filesystem_spec.rb +2 -2
- data/spec/unit/plugins/windows/fips_spec.rb +17 -77
- data/spec/unit/plugins/windows/kernel_spec.rb +1 -1
- data/spec/unit/plugins/windows/memory_spec.rb +2 -2
- data/spec/unit/plugins/windows/network_spec.rb +1 -1
- data/spec/unit/plugins/windows/system_enclosure_spec.rb +1 -1
- data/spec/unit/plugins/windows/uptime_spec.rb +1 -1
- data/spec/unit/plugins/windows/virtualization_spec.rb +20 -238
- data/spec/unit/plugins/zpools_spec.rb +7 -7
- data/spec/unit/provides_map_spec.rb +1 -1
- data/spec/unit/runner_spec.rb +1 -1
- data/spec/unit/system_spec.rb +10 -77
- data/spec/unit/util/file_helper_spec.rb +1 -1
- data/spec/unit/util/ip_helper_spec.rb +1 -1
- metadata +6 -9
- data/lib/ohai/plugins/darwin/system_profiler.rb +0 -72
- data/lib/ohai/util/win32/group_helper.rb +0 -76
- data/spec/unit/plugins/darwin/system_profiler_output.rb +0 -79524
- data/spec/unit/plugins/darwin/system_profiler_spec.rb +0 -40
data/spec/unit/config_spec.rb
CHANGED
data/spec/unit/hints_spec.rb
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
-
|
20
|
+
require "spec_helper"
|
21
21
|
|
22
22
|
describe "Ohai::Hints" do
|
23
23
|
# We are using the plugins directory infrastructure to test hints
|
@@ -44,7 +44,7 @@ describe "Ohai::Hints" do
|
|
44
44
|
when_plugins_directory "contains empty and full hints" do
|
45
45
|
with_plugin("cloud.json", <<~EOF)
|
46
46
|
{"name":"circus"}
|
47
|
-
EOF
|
47
|
+
EOF
|
48
48
|
|
49
49
|
with_plugin("cloud_empty.json", <<EOF)
|
50
50
|
EOF
|
data/spec/unit/loader_spec.rb
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
-
|
20
|
+
require "spec_helper"
|
21
21
|
|
22
22
|
describe Ohai::Loader do
|
23
23
|
extend IntegrationSupport
|
@@ -38,13 +38,13 @@ describe Ohai::Loader do
|
|
38
38
|
Ohai.plugin(:Alpha) do
|
39
39
|
provides "alpha"
|
40
40
|
end
|
41
|
-
EOF
|
41
|
+
EOF
|
42
42
|
|
43
43
|
with_plugin("cookbook_b/beta.rb", <<~EOF)
|
44
44
|
Ohai.plugin(:Beta) do
|
45
45
|
provides "beta"
|
46
46
|
end
|
47
|
-
EOF
|
47
|
+
EOF
|
48
48
|
|
49
49
|
describe "#load_additional" do
|
50
50
|
it "adds the plugins to the map" do
|
@@ -63,13 +63,13 @@ EOF
|
|
63
63
|
Ohai.plugins(:ExtraS) do
|
64
64
|
provides "the_letter_s"
|
65
65
|
end
|
66
|
-
EOF
|
66
|
+
EOF
|
67
67
|
|
68
68
|
with_plugin("no_method.rb", <<~EOF)
|
69
69
|
Ohai.plugin(:NoMethod) do
|
70
70
|
really_wants "this_attribute"
|
71
71
|
end
|
72
|
-
EOF
|
72
|
+
EOF
|
73
73
|
|
74
74
|
with_plugin("illegal_def.rb", <<~EOF)
|
75
75
|
Ohai.plugin(:Zoo) do
|
@@ -78,32 +78,32 @@ EOF
|
|
78
78
|
collect_data(:darwin) do
|
79
79
|
end
|
80
80
|
end
|
81
|
-
EOF
|
81
|
+
EOF
|
82
82
|
|
83
83
|
with_plugin("unexpected_error.rb", <<~EOF)
|
84
84
|
Ohai.plugin(:Zoo) do
|
85
85
|
raise "You aren't expecting this."
|
86
86
|
end
|
87
|
-
EOF
|
87
|
+
EOF
|
88
88
|
|
89
89
|
with_plugin("bad_symbol.rb", <<~EOF)
|
90
90
|
Ohai.plugin(:1nval!d) do
|
91
91
|
provides "not_a_symbol"
|
92
92
|
end
|
93
|
-
EOF
|
93
|
+
EOF
|
94
94
|
|
95
95
|
with_plugin("no_end.rb", <<~EOF)
|
96
96
|
Ohai.plugin(:NoEnd) do
|
97
97
|
provides "fish_oil"
|
98
98
|
collect_data do
|
99
99
|
end
|
100
|
-
EOF
|
100
|
+
EOF
|
101
101
|
|
102
102
|
with_plugin("bad_name.rb", <<~EOF)
|
103
103
|
Ohai.plugin(:you_give_plugins_a_bad_name) do
|
104
104
|
provides "that/one/song"
|
105
105
|
end
|
106
|
-
EOF
|
106
|
+
EOF
|
107
107
|
|
108
108
|
describe "load_plugin() method" do
|
109
109
|
describe "when the plugin uses Ohai.plugin instead of Ohai.plugins" do
|
@@ -185,9 +185,9 @@ EOF
|
|
185
185
|
|
186
186
|
describe "when plugin directory does not exist" do
|
187
187
|
it "logs an invalid plugin path warning" do
|
188
|
-
expect(Ohai::Log).to receive(:
|
188
|
+
expect(Ohai::Log).to receive(:debug).with(/The plugin path.*does not exist/)
|
189
189
|
allow(Dir).to receive(:exist?).with("/bogus/dir").and_return(false)
|
190
|
-
|
190
|
+
loader.plugin_files_by_dir("/bogus/dir")
|
191
191
|
end
|
192
192
|
end
|
193
193
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Tim Smith (tsmith@chef.io)
|
3
|
+
# Copyright:: Copyright (c) 2018 Chef Software, Inc.
|
4
|
+
# License:: Apache License, Version 2.0
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require "spec_helper"
|
20
|
+
require "ohai/mixin/dmi_decode"
|
21
|
+
|
22
|
+
describe Ohai::Mixin::DmiDecode, "guest_from_dmi_data" do
|
23
|
+
let(:mixin) { Object.new.extend(Ohai::Mixin::DmiDecode) }
|
24
|
+
|
25
|
+
# for the full DMI data used in these tests see https://github.com/chef/dmidecode_collection
|
26
|
+
{
|
27
|
+
xen: ["Xen", "HVM domU", "4.2.amazon"],
|
28
|
+
vmware: ["VMware, Inc.", "VMware Virtual Platform", "None"],
|
29
|
+
hyperv: ["Microsoft", "Virtual Machine", "7.0"],
|
30
|
+
amazonec2: ["Amazon EC2", "c5n.large", "Not Specified"],
|
31
|
+
veertu: ["Veertu", "Veertu", "Not Specified"],
|
32
|
+
parallels: ["Parallels Software International Inc.", "Parallels Virtual Platform", "None"],
|
33
|
+
vbox: ["Oracle Corporation", "VirtualBox", "1.2"],
|
34
|
+
openstack: ["Red Hat Inc.", "OpenStack Nova", "2014.1.2-1.el6"],
|
35
|
+
kvm: ["Red Hat", "KVM", "RHEL 7.0.0 PC (i440FX + PIIX, 1996"],
|
36
|
+
bhyve: ["", "BHYVE", "1.0"],
|
37
|
+
}.each_pair do |hypervisor, values|
|
38
|
+
describe "when passed #{hypervisor} dmi data" do
|
39
|
+
it "returns '#{hypervisor}'" do
|
40
|
+
expect(mixin.guest_from_dmi_data(values[0], values[1], values[2])).to eq("#{hypervisor}")
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "When running on RHEV Hypervisor" do
|
46
|
+
it "returns 'kvm'" do
|
47
|
+
expect(mixin.guest_from_dmi_data("Red Hat", "RHEV Hypervisor", "6.7-20150911.0.el6ev")).to eq("kvm")
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "When the manufactuer is 'QEMU'" do
|
52
|
+
it "return kvm" do
|
53
|
+
expect(mixin.guest_from_dmi_data("QEMU", "", "")).to eq("kvm")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe "returns nil if manufactuer is 'Microsoft', but product is not 'Virtual Machine'" do
|
58
|
+
it "returns nil" do
|
59
|
+
expect(mixin.guest_from_dmi_data("Microsot", "Zune", "2018")).to be_nil
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "When running on an unkown system" do
|
64
|
+
it "returns nil" do
|
65
|
+
expect(mixin.guest_from_dmi_data("TimCorp", "SuperServer", "2018")).to be_nil
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# See the License for the specific language governing permissions and
|
18
18
|
# limitations under the License.
|
19
19
|
|
20
|
-
|
20
|
+
require "spec_helper"
|
21
21
|
require "ohai/mixin/softlayer_metadata"
|
22
22
|
|
23
23
|
describe ::Ohai::Mixin::SoftlayerMetadata do
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
tmp = ENV["TMPDIR"] || ENV["TMP"] || ENV["TEMP"] || "/tmp"
|
22
22
|
|
@@ -31,11 +31,11 @@ EOF
|
|
31
31
|
|
32
32
|
describe "a plug-in that aborts execution" do
|
33
33
|
before(:all) do
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
|
35
|
+
Dir.mkdir("#{tmp}/plugins")
|
36
|
+
rescue Errno::EEXIST
|
37
37
|
# ignore
|
38
|
-
|
38
|
+
|
39
39
|
end
|
40
40
|
|
41
41
|
before(:each) do
|
@@ -49,11 +49,11 @@ describe "a plug-in that aborts execution" do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
after(:all) do
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
|
53
|
+
Dir.delete("#{tmp}/plugins")
|
54
|
+
rescue
|
55
55
|
# ignore
|
56
|
-
|
56
|
+
|
57
57
|
end
|
58
58
|
|
59
59
|
before(:each) do
|
@@ -16,14 +16,14 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "AIX cpu plugin" do
|
22
22
|
before(:each) do
|
23
23
|
@lsdev_cc_processor = <<~LSDEV_CC_PROCESSOR
|
24
24
|
proc0 Available 00-00 Processor
|
25
25
|
proc4 Defined 00-04 Processor
|
26
|
-
LSDEV_CC_PROCESSOR
|
26
|
+
LSDEV_CC_PROCESSOR
|
27
27
|
|
28
28
|
@lsattr_el_proc0 = <<~LSATTR_EL
|
29
29
|
frequency 1654344000 Processor Speed False
|
@@ -31,14 +31,14 @@ LSDEV_CC_PROCESSOR
|
|
31
31
|
smt_threads 2 Processor SMT threads False
|
32
32
|
state enable Processor state False
|
33
33
|
type PowerPC_POWER5 Processor type False
|
34
|
-
LSATTR_EL
|
34
|
+
LSATTR_EL
|
35
35
|
|
36
36
|
@pmcycles_m = <<~PMCYCLES_M
|
37
37
|
CPU 0 runs at 1654 MHz
|
38
38
|
CPU 1 runs at 1654 MHz
|
39
39
|
CPU 2 runs at 1654 MHz
|
40
40
|
CPU 3 runs at 1654 MHz
|
41
|
-
PMCYCLES_M
|
41
|
+
PMCYCLES_M
|
42
42
|
|
43
43
|
@plugin = get_plugin("cpu")
|
44
44
|
allow(@plugin).to receive(:collect_os).and_return(:aix)
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "AIX filesystem plugin" do
|
22
22
|
before(:each) do
|
@@ -45,7 +45,7 @@ describe Ohai::System, "AIX filesystem plugin" do
|
|
45
45
|
/dev/fslv10 5242880 42884 5199996 1% /wpars/toolchain-tester-5c969f/tmp
|
46
46
|
/dev/fslv11 5242880 2725048 2517832 52% /wpars/toolchain-tester-5c969f/usr
|
47
47
|
/dev/fslv12 10485760 272376 10213384 3% /wpars/toolchain-tester-5c969f/var
|
48
|
-
DF_PK
|
48
|
+
DF_PK
|
49
49
|
|
50
50
|
@df_pk_wpar = <<~DF_PK
|
51
51
|
Filesystem 1024-blocks Used Available Capacity Mounted on
|
@@ -56,7 +56,7 @@ DF_PK
|
|
56
56
|
Global 5242880 42884 5199996 1% /tmp
|
57
57
|
Global 5242880 2725048 2517832 52% /usr
|
58
58
|
Global 10485760 272376 10213384 3% /var
|
59
|
-
DF_PK
|
59
|
+
DF_PK
|
60
60
|
|
61
61
|
@mount_lpar = <<~MOUNT
|
62
62
|
node mounted mounted over vfs date options
|
@@ -70,7 +70,7 @@ DF_PK
|
|
70
70
|
/proc /proc procfs Jul 17 13:22 rw
|
71
71
|
/dev/hd10opt /opt jfs2 Jul 17 13:22 rw,log=/dev/hd8
|
72
72
|
192.168.1.11 /stage/middleware1 /stage/middleware2 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys
|
73
|
-
MOUNT
|
73
|
+
MOUNT
|
74
74
|
|
75
75
|
@mount_wpar = <<~MOUNT
|
76
76
|
node mounted mounted over vfs date options
|
@@ -83,7 +83,7 @@ MOUNT
|
|
83
83
|
Global /usr jfs2 Nov 23 21:03 rw,log=NULL
|
84
84
|
Global /var jfs2 Nov 23 21:03 rw,log=NULL
|
85
85
|
192.168.1.11 /stage/middleware3 /stage/middleware4 nfs3 Jul 17 13:24 ro,bg,hard,intr,sec=sys
|
86
|
-
MOUNT
|
86
|
+
MOUNT
|
87
87
|
|
88
88
|
@plugin = get_plugin("filesystem")
|
89
89
|
allow(@plugin).to receive(:collect_os).and_return(:aix)
|
@@ -16,14 +16,14 @@
|
|
16
16
|
# See the License for the specific language governing permissions and
|
17
17
|
# limitations under the License.
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "AIX network plugin" do
|
22
22
|
|
23
23
|
before(:each) do
|
24
24
|
@netstat_rn_grep_default = <<~NETSTAT_RN_GREP_DEFAULT
|
25
25
|
default 172.31.8.1 UG 2 121789 en0 - -
|
26
|
-
NETSTAT_RN_GREP_DEFAULT
|
26
|
+
NETSTAT_RN_GREP_DEFAULT
|
27
27
|
|
28
28
|
@ifconfig = <<~IFCONFIG
|
29
29
|
en0: flags=1e080863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> metric 1
|
@@ -39,7 +39,7 @@ NETSTAT_RN_GREP_DEFAULT
|
|
39
39
|
inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
|
40
40
|
inet6 ::1%1/0
|
41
41
|
tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
|
42
|
-
IFCONFIG
|
42
|
+
IFCONFIG
|
43
43
|
|
44
44
|
@netstat_nrf_inet = <<~NETSTAT_NRF_INET
|
45
45
|
Destination Gateway Flags Refs Use If Exp Groups
|
@@ -48,14 +48,14 @@ IFCONFIG
|
|
48
48
|
172.29.128.0 172.29.174.58 UHSb 0 0 en0 - - =>
|
49
49
|
172.29.128/18 172.29.174.58 U 7 1035485 en0 - -
|
50
50
|
172.29.191.255 172.29.174.58 UHSb 0 1 en0 - -
|
51
|
-
NETSTAT_NRF_INET
|
51
|
+
NETSTAT_NRF_INET
|
52
52
|
|
53
53
|
@entstat_err = <<~ENSTAT_ERR
|
54
54
|
|
55
55
|
|
56
56
|
entstat: 0909-002 Unable to open device en0, errno = 13
|
57
57
|
grep: 0652-033 Cannot open Address".
|
58
|
-
ENSTAT_ERR
|
58
|
+
ENSTAT_ERR
|
59
59
|
|
60
60
|
@aix_arp_an = <<~ARP_AN
|
61
61
|
? (172.29.131.16) at 6e:87:70:0:40:3 [ethernet] stored in bucket 16
|
@@ -72,7 +72,7 @@ ENSTAT_ERR
|
|
72
72
|
|
73
73
|
bucket: 0 contains: 0 entries
|
74
74
|
There are 6 entries in the arp table.
|
75
|
-
ARP_AN
|
75
|
+
ARP_AN
|
76
76
|
|
77
77
|
@plugin = get_plugin("aix/network")
|
78
78
|
allow(@plugin).to receive(:collect_os).and_return(:aix)
|