ohai 7.0.0.rc.0 → 7.0.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 87c20193b00541eb3fa82ee6c3bcd45c78636a73
4
+ data.tar.gz: fdc15bb6c846111f6208a280d1c0b6a0dd38e347
5
+ SHA512:
6
+ metadata.gz: 6ae37b1d6f17e5b02669d1f511e2af2f7292c6a3a985c938fd498899131a267758a3c9feea5ddb94feb60c9ae70fe83bc3af05717546f9110063557bb23d29cd
7
+ data.tar.gz: c940b03c17459ecb3190c1b801144017d888e38941512b5929d1ffab8bc78018d9067e9cb619d4987c6b92d7d20a0b56d972e1dc96e8bee60888a9cdfa662630
@@ -1,4 +1,4 @@
1
- .TH "OHAI" "1" "Ohai 6.20.0" "" "ohai"
1
+ .TH "OHAI" "1" "Ohai 7.0.0" "" "ohai"
2
2
  .SH NAME
3
3
  ohai \- The man page for the ohai command line tool.
4
4
  .
@@ -31,12 +31,14 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
31
31
  .\" Man page generated from reStructuredText.
32
32
  .
33
33
  .sp
34
- Ohai is a tool that is used to detect attributes on a node, and then provide these attributes to the chef\-client at the start of every chef\-client run. Ohai is required by the chef\-client and must be present on a node. The types of attributes Ohai collects include:
34
+ Ohai is a tool that is used to detect attributes on a node, and then provide these attributes to the chef\-client at the start of every chef\-client run. Ohai is required by the chef\-client and must be present on a node. (Ohai is installed on a node as part of the chef\-client install process.)
35
+ .sp
36
+ The types of attributes Ohai collects include (but are not limited to):
35
37
  .INDENT 0.0
36
38
  .IP \(bu 2
37
39
  Platform details
38
40
  .IP \(bu 2
39
- Networking usage
41
+ Network usage
40
42
  .IP \(bu 2
41
43
  Memory usage
42
44
  .IP \(bu 2
@@ -67,17 +69,17 @@ ohai OPTION
67
69
  This tool has the following options:
68
70
  .INDENT 0.0
69
71
  .TP
72
+ .B \fBATTRIBUTE_NAME ATTRIBUTE NAME ...\fP
73
+ Use to have Ohai show only output for named attributes.
74
+ .TP
70
75
  .B \fB\-d PATH\fP, \fB\-\-directory PATH\fP
71
76
  The directory in which Ohai plugins are located. For example: \fB/etc/ohai/plugins\fP.
72
77
  .TP
73
- .B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP
74
- The file against which Ohai will run.
75
- .TP
76
78
  .B \fB\-h\fP, \fB\-\-help\fP
77
79
  Shows help for the command.
78
80
  .TP
79
81
  .B \fB\-l LEVEL\fP, \fB\-\-log_level LEVEL\fP
80
- The level of logging that will be stored in a log file: \fBdebug\fP, \fBinfo\fP, \fBwarn\fP, \fBerror\fP, or \fBfatal\fP.
82
+ The level of logging that will be stored in a log file.
81
83
  .TP
82
84
  .B \fB\-L LOGLOCATION\fP, \fB\-\-logfile c\fP
83
85
  The location in which log file output files will be saved. If this location is set to something other than \fBSTDOUT\fP, standard output logging will still be performed (otherwise there would be no output other than to a file).
@@ -1,5 +1,6 @@
1
1
  #
2
2
  # Author:: Nathan L Smith (<nlloyds@gmail.com>)
3
+ # Author:: Tim Smith (<tsmith@limelight.com>)
3
4
  # Copyright:: Copyright (c) 2013 Opscode, Inc.
4
5
  # License:: Apache License, Version 2.0
5
6
  #
@@ -25,5 +26,19 @@ Ohai.plugin(:CPU) do
25
26
  cpu[:real] = so.stdout.to_i
26
27
  so = shell_out("sysctl -n hw.logicalcpu")
27
28
  cpu[:total] = so.stdout.to_i
29
+ so = shell_out("sysctl -n hw.cpufrequency")
30
+ cpu[:mhz] = so.stdout.to_i / 1000000
31
+ so = shell_out("sysctl -n machdep.cpu.vendor")
32
+ cpu[:vendor_id] = so.stdout
33
+ so = shell_out("sysctl -n machdep.cpu.brand_string")
34
+ cpu[:model_name] = so.stdout
35
+ so = shell_out("sysctl -n machdep.cpu.model")
36
+ cpu[:model] = so.stdout.to_i
37
+ so = shell_out("sysctl -n machdep.cpu.family")
38
+ cpu[:family] = so.stdout.to_i
39
+ so = shell_out("sysctl -n machdep.cpu.stepping")
40
+ cpu[:stepping] = so.stdout.to_i
41
+ so = shell_out("sysctl -n machdep.cpu.features")
42
+ cpu[:flags] = so.stdout.downcase.split(' ')
28
43
  end
29
44
  end
@@ -115,9 +115,24 @@ Ohai.plugin(:Hostname) do
115
115
  hostname from_cmd("hostname -s")
116
116
  machinename from_cmd("hostname")
117
117
  begin
118
- fqdn from_cmd("hostname --fqdn")
118
+ ourfqdn = from_cmd("hostname --fqdn")
119
+ # Sometimes... very rarely, but sometimes, 'hostname --fqdn' falsely
120
+ # returns a blank string. WTF.
121
+ if ourfqdn.nil? || ourfqdn.empty?
122
+ Ohai::Log.debug("hostname --fqdn returned an empty string, retrying " +
123
+ "once.")
124
+ ourfqdn = from_cmd("hostname --fqdn")
125
+ end
126
+
127
+ if ourfqdn.nil? || ourfqdn.empty?
128
+ Ohai::Log.debug("hostname --fqdn returned an empty string twice and " +
129
+ "will not be set.")
130
+ else
131
+ fqdn ourfqdn
132
+ end
119
133
  rescue
120
- Ohai::Log.debug("hostname -f returned an error, probably no domain is set")
134
+ Ohai::Log.debug(
135
+ "hostname --fqdn returned an error, probably no domain set")
121
136
  end
122
137
  domain collect_domain
123
138
  end
@@ -0,0 +1,31 @@
1
+ #
2
+ # Author:: Caleb Tennis (<caleb.tennis@gmail.com>)
3
+ # Copyright:: Copyright (c) 2012 Opscode, 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
+ Ohai.plugin(:InitPackage) do
20
+ provides "init_package"
21
+
22
+ collect_data(:linux) do
23
+ package_name = nil
24
+
25
+ if File.exists?("/proc/1/comm")
26
+ package_name = File.open("/proc/1/comm").gets.chomp
27
+ end
28
+
29
+ init_package package_name
30
+ end
31
+ end
@@ -29,7 +29,7 @@ Ohai.plugin(:Platform) do
29
29
  end
30
30
 
31
31
  collect_data(:linux) do
32
- # platform [ and platform_version ? ] should be lower case to avoid dealing with RedHat/Redhat/redhat matching
32
+ # platform [ and platform_version ? ] should be lower case to avoid dealing with RedHat/Redhat/redhat matching
33
33
  if File.exists?("/etc/oracle-release")
34
34
  contents = File.read("/etc/oracle-release").chomp
35
35
  platform "oracle"
@@ -47,7 +47,7 @@ Ohai.plugin(:Platform) do
47
47
  elsif lsb[:id] =~ /LinuxMint/i
48
48
  platform "linuxmint"
49
49
  platform_version lsb[:release]
50
- else
50
+ else
51
51
  if File.exists?("/usr/bin/raspi-config")
52
52
  platform "raspbian"
53
53
  else
@@ -67,10 +67,15 @@ Ohai.plugin(:Platform) do
67
67
  platform "gentoo"
68
68
  platform_version File.read('/etc/gentoo-release').scan(/(\d+|\.+)/).join
69
69
  elsif File.exists?('/etc/SuSE-release')
70
- platform "suse"
71
70
  suse_release = File.read("/etc/SuSE-release")
72
- platform_version suse_release.scan(/VERSION = (\d+)\nPATCHLEVEL = (\d+)/).flatten.join(".")
73
- platform_version suse_release.scan(/VERSION = ([\d\.]{2,})/).flatten.join(".") if platform_version == ""
71
+ suse_version = suse_release.scan(/VERSION = (\d+)\nPATCHLEVEL = (\d+)/).flatten.join(".")
72
+ suse_version = suse_release[/VERSION = ([\d\.]{2,})/, 1] if suse_version == ""
73
+ platform_version suse_version
74
+ if suse_release =~ /^openSUSE/
75
+ platform "opensuse"
76
+ else
77
+ platform "suse"
78
+ end
74
79
  elsif File.exists?('/etc/slackware-version')
75
80
  platform "slackware"
76
81
  platform_version File.read("/etc/slackware-version").scan(/(\d+|\.+)/).join
@@ -90,7 +95,7 @@ Ohai.plugin(:Platform) do
90
95
  elsif lsb[:id] =~ /XenServer/i
91
96
  platform "xenserver"
92
97
  platform_version lsb[:release]
93
- elsif lsb[:id] # LSB can provide odd data that changes between releases, so we currently fall back on it rather than dealing with its subtleties
98
+ elsif lsb[:id] # LSB can provide odd data that changes between releases, so we currently fall back on it rather than dealing with its subtleties
94
99
  platform lsb[:id].downcase
95
100
  platform_version lsb[:release]
96
101
  end
@@ -108,8 +113,8 @@ Ohai.plugin(:Platform) do
108
113
  platform_family "gentoo"
109
114
  when /slackware/
110
115
  platform_family "slackware"
111
- when /arch/
112
- platform_family "arch"
116
+ when /arch/
117
+ platform_family "arch"
113
118
  end
114
119
  end
115
120
  end
@@ -79,7 +79,7 @@ Ohai.plugin(:NetworkAddresses) do
79
79
  elsif network[gw_attr] and
80
80
  network["interfaces"][network[int_attr]] and
81
81
  network["interfaces"][network[int_attr]]["addresses"]
82
- if [ "0.0.0.0", "::" ].include? network[gw_attr]
82
+ if [ "0.0.0.0", "::", /^fe80:/ ].any? { |pat| pat === network[gw_attr] }
83
83
  # link level default route
84
84
  Ohai::Log.debug("link level default #{family} route, picking ip from #{network[gw_attr]}")
85
85
  r = gw_if_ips.first
@@ -156,7 +156,7 @@ Ohai.plugin(:NetworkAddresses) do
156
156
  end
157
157
  elsif family == "inet6" and ip6address.nil?
158
158
  if r["ip"].nil?
159
- Ohai::Log.warn("unable to detect ip6address")
159
+ Ohai::Log.debug("unable to detect ip6address")
160
160
  else
161
161
  ip6address r["ip"]
162
162
  if r["mac"] and macaddress.nil? and ipaddress.nil?
@@ -93,6 +93,28 @@ Ohai.plugin(:Rackspace) do
93
93
  Ohai::Log.debug("Unable to find xenstore-ls, cannot capture region information for Rackspace cloud")
94
94
  end
95
95
 
96
+ # Get the rackspace private networks
97
+ #
98
+ def get_private_networks()
99
+ so = shell_out('xenstore-ls vm-data/networking')
100
+ if so.exitstatus == 0
101
+ networks = []
102
+ so.stdout.split("\n").map{|l| l.split('=').first.strip }.map do |item|
103
+ _so = shell_out("xenstore-read vm-data/networking/#{item}")
104
+ if _so.exitstatus == 0
105
+ networks.push(Yajl::Parser.new.parse(_so.stdout))
106
+ else
107
+ raise Ohai::Exceptions::Exec
108
+ end
109
+ end
110
+ # these networks are already known to ohai, and are not 'private networks'
111
+ networks.delete_if { |hash| hash['label'] == 'private' }
112
+ networks.delete_if { |hash| hash['label'] == 'public' }
113
+ end
114
+ rescue Ohai::Exceptions::Exec
115
+ Ohai::Log.debug('Unable to capture custom private networking information for Rackspace cloud')
116
+ end
117
+
96
118
  collect_data do
97
119
  # Adds rackspace Mash
98
120
  if looks_like_rackspace?
@@ -109,6 +131,9 @@ Ohai.plugin(:Rackspace) do
109
131
  rackspace[:local_ipv4] = rackspace[:private_ip]
110
132
  get_global_ipv6_address(:local_ipv6, :eth1)
111
133
  rackspace[:local_hostname] = hostname
134
+ private_networks = get_private_networks
135
+ rackspace[:private_networks] = private_networks if private_networks
112
136
  end
113
137
  end
138
+
114
139
  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.
@@ -18,6 +18,5 @@
18
18
 
19
19
  module Ohai
20
20
  OHAI_ROOT = File.expand_path(File.dirname(__FILE__))
21
- VERSION = '7.0.0.rc.0'
21
+ VERSION = '7.0.0.rc.1'
22
22
  end
23
-
@@ -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.
@@ -23,17 +23,51 @@ describe Ohai::System, "Darwin cpu plugin" do
23
23
  before(:each) do
24
24
  @plugin = get_plugin("darwin/cpu")
25
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", ""))
26
+ @plugin.stub(:shell_out).with("sysctl -n hw.physicalcpu").and_return(mock_shell_out(0, "4", ""))
27
+ @plugin.stub(:shell_out).with("sysctl -n hw.logicalcpu").and_return(mock_shell_out(0, "8", ""))
28
+ @plugin.stub(:shell_out).with("sysctl -n hw.cpufrequency").and_return(mock_shell_out(0, "2300000000", ""))
29
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.vendor").and_return(mock_shell_out(0, "GenuineIntel", ""))
30
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.brand_string").and_return(mock_shell_out(0, "Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz", ""))
31
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.model").and_return(mock_shell_out(0, "58", ""))
32
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.family").and_return(mock_shell_out(0, "6", ""))
33
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.stepping").and_return(mock_shell_out(0, "9", ""))
34
+ @plugin.stub(:shell_out).with("sysctl -n machdep.cpu.features").and_return(mock_shell_out(0, "FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C", ""))
35
+ @plugin.run
28
36
  end
29
37
 
30
- it "should set cpu[:total] to 2" do
31
- @plugin.run
32
- @plugin[:cpu][:total].should == 2
38
+ it "should set cpu[:total] to 8" do
39
+ @plugin[:cpu][:total].should == 8
33
40
  end
34
41
 
35
- it "should set cpu[:real] to 1" do
36
- @plugin.run
37
- @plugin[:cpu][:real].should == 1
42
+ it "should set cpu[:real] to 4" do
43
+ @plugin[:cpu][:real].should == 4
44
+ end
45
+
46
+ it "should set cpu[:mhz] to 2300" do
47
+ @plugin[:cpu][:mhz].should == 2300
48
+ end
49
+
50
+ it "should set cpu[:vendor_id] to GenuineIntel" do
51
+ @plugin[:cpu][:vendor_id].should == "GenuineIntel"
52
+ end
53
+
54
+ it "should set cpu[:model_name] to Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz" do
55
+ @plugin[:cpu][:model_name].should == "Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz"
56
+ end
57
+
58
+ it "should set cpu[:model] to 58" do
59
+ @plugin[:cpu][:model].should == 58
60
+ end
61
+
62
+ it "should set cpu[:family] to 6" do
63
+ @plugin[:cpu][:family].should == 6
64
+ end
65
+
66
+ it "should set cpu[:stepping] to 9" do
67
+ @plugin[:cpu][:stepping].should == 9
68
+ end
69
+
70
+ it "should set cpu[:flags] to array of flags" do
71
+ @plugin[:cpu][:flags].should == ["fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "clfsh", "ds", "acpi", "mmx", "fxsr", "sse", "sse2", "ss", "htt", "tm", "pbe", "sse3", "pclmulqdq", "dtes64", "mon", "dscpl", "vmx", "est", "tm2", "ssse3", "cx16", "tpr", "pdcm", "sse4.1", "sse4.2", "x2apic", "popcnt", "aes", "pcid", "xsave", "osxsave", "tsctmr", "avx1.0", "rdrand", "f16c"]
38
72
  end
39
73
  end
@@ -71,4 +71,34 @@ describe Ohai::System, "hostname plugin" do
71
71
  @plugin[:hostname].should == "katie"
72
72
  end
73
73
  end
74
+
75
+ context "hostname --fqdn when it returns empty string" do
76
+ before(:each) do
77
+ @plugin.stub(:collect_os).and_return(:linux)
78
+ @plugin.stub(:shell_out).with("hostname -s").and_return(
79
+ mock_shell_out(0, "katie", ""))
80
+ @plugin.stub(:shell_out).with("hostname --fqdn").and_return(
81
+ mock_shell_out(0, "", ""), mock_shell_out(0, "katie.local", ""))
82
+ end
83
+
84
+ it "should be called twice" do
85
+ @plugin.run
86
+ @plugin[:fqdn].should == "katie.local"
87
+ end
88
+ end
89
+
90
+ context "hostname --fqdn when it works" do
91
+ before(:each) do
92
+ @plugin.stub(:collect_os).and_return(:linux)
93
+ @plugin.stub(:shell_out).with("hostname -s").and_return(
94
+ mock_shell_out(0, "katie", ""))
95
+ @plugin.stub(:shell_out).with("hostname --fqdn").and_return(
96
+ mock_shell_out(0, "katie.local", ""))
97
+ end
98
+
99
+ it "should be not be called twice" do
100
+ @plugin.run
101
+ @plugin[:fqdn].should == "katie.local"
102
+ end
103
+ end
74
104
  end
@@ -0,0 +1,50 @@
1
+ #
2
+ # Author:: Caleb Tennis (<caleb.tennis@gmail.com>)
3
+ # Copyright:: Copyright (c) 2012 Opscode, 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 File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '/spec_helper.rb'))
20
+
21
+ describe Ohai::System, "Init package" do
22
+ let(:plugin) {
23
+ p = get_plugin("init_package")
24
+ p.stub(:collect_os).and_return("linux")
25
+ p
26
+ }
27
+
28
+ let(:proc1_content) { "init\n" }
29
+ let(:proc_1_file_path) { "/proc/1/comm" }
30
+ let(:proc_1_file) { double(proc_1_file_path, :gets => proc1_content) }
31
+
32
+ before(:each) do
33
+ File.stub(:exists?).with(proc_1_file_path).and_return(true)
34
+ File.stub(:open).with(proc_1_file_path).and_return(proc_1_file)
35
+ end
36
+
37
+ it "should set init_package to init" do
38
+ plugin.run
39
+ plugin[:init_package].should == "init"
40
+ end
41
+
42
+ describe "when init_package is systemd" do
43
+ let(:proc1_content) { "systemd\n" }
44
+
45
+ it "should set init_package to systemd" do
46
+ plugin.run
47
+ plugin[:init_package].should == "systemd"
48
+ end
49
+ end
50
+ 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.
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
  require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
+ require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
22
22
 
23
23
  describe Ohai::System, "Linux plugin platform" do
24
24
  before(:each) do
@@ -42,12 +42,12 @@ describe Ohai::System, "Linux plugin platform" do
42
42
  @plugin[:lsb][:id] = "Ubuntu"
43
43
  @plugin[:lsb][:release] = "8.04"
44
44
  end
45
-
45
+
46
46
  it "should set platform to lowercased lsb[:id]" do
47
- @plugin.run
47
+ @plugin.run
48
48
  @plugin[:platform].should == "ubuntu"
49
49
  end
50
-
50
+
51
51
  it "should set platform_version to lsb[:release]" do
52
52
  @plugin.run
53
53
  @plugin[:platform_version].should == "8.04"
@@ -144,7 +144,7 @@ describe Ohai::System, "Linux plugin platform" do
144
144
  @plugin[:platform_family].should == "slackware"
145
145
  end
146
146
  end
147
-
147
+
148
148
  describe "on arch" do
149
149
  before(:each) do
150
150
  @plugin.lsb = nil
@@ -158,7 +158,7 @@ describe Ohai::System, "Linux plugin platform" do
158
158
  end
159
159
 
160
160
  end
161
-
161
+
162
162
  describe "on gentoo" do
163
163
  before(:each) do
164
164
  @plugin.lsb = nil
@@ -219,47 +219,47 @@ describe Ohai::System, "Linux plugin platform" do
219
219
  @plugin[:platform_family].should == "rhel"
220
220
  end
221
221
  end
222
-
222
+
223
223
  describe "without lsb_release results" do
224
224
  before(:each) do
225
225
  @plugin.lsb = nil
226
226
  File.should_receive(:exists?).with("/etc/redhat-release").and_return(true)
227
227
  end
228
-
228
+
229
229
  it "should read the platform as centos and version as 5.3" do
230
230
  File.should_receive(:read).with("/etc/redhat-release").and_return("CentOS release 5.3")
231
231
  @plugin.run
232
232
  @plugin[:platform].should == "centos"
233
233
  end
234
-
234
+
235
235
  it "may be that someone munged Red Hat to be RedHat" do
236
236
  File.should_receive(:read).with("/etc/redhat-release").and_return("RedHat release 5.3")
237
237
  @plugin.run
238
238
  @plugin[:platform].should == "redhat"
239
239
  @plugin[:platform_version].should == "5.3"
240
240
  end
241
-
241
+
242
242
  it "should read the platform as redhat and version as 5.3" do
243
243
  File.should_receive(:read).with("/etc/redhat-release").and_return("Red Hat release 5.3")
244
244
  @plugin.run
245
245
  @plugin[:platform].should == "redhat"
246
246
  @plugin[:platform_version].should == "5.3"
247
247
  end
248
-
248
+
249
249
  it "should read the platform as fedora and version as 13 (rawhide)" do
250
250
  File.should_receive(:read).with("/etc/redhat-release").and_return("Fedora release 13 (Rawhide)")
251
251
  @plugin.run
252
252
  @plugin[:platform].should == "fedora"
253
253
  @plugin[:platform_version].should == "13 (rawhide)"
254
254
  end
255
-
255
+
256
256
  it "should read the platform as fedora and version as 10" do
257
257
  File.should_receive(:read).with("/etc/redhat-release").and_return("Fedora release 10")
258
258
  @plugin.run
259
259
  @plugin[:platform].should == "fedora"
260
260
  @plugin[:platform_version].should == "10"
261
261
  end
262
-
262
+
263
263
  it "should read the platform as fedora and version as 13 using to_i" do
264
264
  File.should_receive(:read).with("/etc/redhat-release").and_return("Fedora release 13 (Rawhide)")
265
265
  @plugin.run
@@ -300,7 +300,7 @@ describe Ohai::System, "Linux plugin platform" do
300
300
  before(:each) do
301
301
  @plugin.lsb = nil
302
302
  end
303
-
303
+
304
304
  it "should read the platform as oracle and version as 5" do
305
305
  File.stub(:exists?).with("/etc/redhat-release").and_return(true)
306
306
  File.stub(:read).with("/etc/redhat-release").and_return("Enterprise Linux Enterprise Linux Server release 5 (Carthage)")
@@ -340,7 +340,7 @@ describe Ohai::System, "Linux plugin platform" do
340
340
  @plugin[:platform].should == "oracle"
341
341
  @plugin[:platform_version].should == "6.0"
342
342
  end
343
-
343
+
344
344
  it "should read the platform as oracle and version as 6.1" do
345
345
  File.stub(:exists?).with("/etc/redhat-release").and_return(true)
346
346
  File.stub(:read).with("/etc/redhat-release").and_return("Red Hat Enterprise Linux Server release 6.1 (Santiago)")
@@ -362,13 +362,12 @@ describe Ohai::System, "Linux plugin platform" do
362
362
  before(:each) do
363
363
  @plugin[:lsb][:id] = "SUSE LINUX"
364
364
  end
365
-
366
- it "should read the platform as suse" do
365
+
366
+ it "should read the platform as opensuse on openSUSE" do
367
367
  @plugin[:lsb][:release] = "12.1"
368
- File.should_receive(:read).with("/etc/SuSE-release").exactly(1).times.and_return("openSUSE 12.1 (x86_64)\nVERSION = 12.1\nCODENAME = Asparagus\n")
368
+ File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 12.1 (x86_64)\nVERSION = 12.1\nCODENAME = Asparagus\n")
369
369
  @plugin.run
370
- @plugin[:platform].should == "suse"
371
- @plugin[:platform_version].should == "12.1"
370
+ @plugin[:platform].should == "opensuse"
372
371
  @plugin[:platform_family].should == "suse"
373
372
  end
374
373
  end
@@ -377,14 +376,14 @@ describe Ohai::System, "Linux plugin platform" do
377
376
  before(:each) do
378
377
  @plugin.lsb = nil
379
378
  end
380
-
379
+
381
380
  it "should set platform and platform_family to suse and bogus verion to 10.0" do
382
381
  File.should_receive(:read).with("/etc/SuSE-release").at_least(:once).and_return("VERSION = 10.0")
383
382
  @plugin.run
384
383
  @plugin[:platform].should == "suse"
385
384
  @plugin[:platform_family].should == "suse"
386
385
  end
387
-
386
+
388
387
  it "should read the version as 10.1 for bogus SLES 10" do
389
388
  File.should_receive(:read).with("/etc/SuSE-release").and_return("SUSE Linux Enterprise Server 10 (i586)\nVERSION = 10\nPATCHLEVEL = 1\n")
390
389
  @plugin.run
@@ -392,7 +391,7 @@ describe Ohai::System, "Linux plugin platform" do
392
391
  @plugin[:platform_version].should == "10.1"
393
392
  @plugin[:platform_family].should == "suse"
394
393
  end
395
-
394
+
396
395
  it "should read the version as 11.2" do
397
396
  File.should_receive(:read).with("/etc/SuSE-release").and_return("SUSE Linux Enterprise Server 11.2 (i586)\nVERSION = 11\nPATCHLEVEL = 2\n")
398
397
  @plugin.run
@@ -400,15 +399,15 @@ describe Ohai::System, "Linux plugin platform" do
400
399
  @plugin[:platform_version].should == "11.2"
401
400
  @plugin[:platform_family].should == "suse"
402
401
  end
403
-
402
+
404
403
  it "[OHAI-272] should read the version as 11.3" do
405
404
  File.should_receive(:read).with("/etc/SuSE-release").exactly(1).times.and_return("openSUSE 11.3 (x86_64)\nVERSION = 11.3")
406
405
  @plugin.run
407
- @plugin[:platform].should == "suse"
406
+ @plugin[:platform].should == "opensuse"
408
407
  @plugin[:platform_version].should == "11.3"
409
408
  @plugin[:platform_family].should == "suse"
410
409
  end
411
-
410
+
412
411
  it "[OHAI-272] should read the version as 9.1" do
413
412
  File.should_receive(:read).with("/etc/SuSE-release").exactly(1).times.and_return("SuSE Linux 9.1 (i586)\nVERSION = 9.1")
414
413
  @plugin.run
@@ -416,16 +415,22 @@ describe Ohai::System, "Linux plugin platform" do
416
415
  @plugin[:platform_version].should == "9.1"
417
416
  @plugin[:platform_family].should == "suse"
418
417
  end
419
-
418
+
420
419
  it "[OHAI-272] should read the version as 11.4" do
421
420
  File.should_receive(:read).with("/etc/SuSE-release").exactly(1).times.and_return("openSUSE 11.4 (i586)\nVERSION = 11.4\nCODENAME = Celadon")
422
421
  @plugin.run
423
- @plugin[:platform].should == "suse"
422
+ @plugin[:platform].should == "opensuse"
424
423
  @plugin[:platform_version].should == "11.4"
425
424
  @plugin[:platform_family].should == "suse"
426
425
  end
426
+
427
+ it "should read the platform as opensuse on openSUSE" do
428
+ File.should_receive(:read).with("/etc/SuSE-release").and_return("openSUSE 12.2 (x86_64)\nVERSION = 12.2\nCODENAME = Mantis\n")
429
+ @plugin.run
430
+ @plugin[:platform].should == "opensuse"
431
+ @plugin[:platform_family].should == "suse"
432
+ end
427
433
  end
428
434
  end
429
435
 
430
436
  end
431
-
@@ -419,7 +419,7 @@ describe Ohai::System, "Network Plugin" do
419
419
  Ohai::Log.should_receive(:warn).with(/^unable to detect ipaddress/).once
420
420
  Ohai::Log.should_receive(:warn).with(/^unable to detect macaddress/).once
421
421
  Ohai::Log.should_receive(:warn).with(/^\[inet\] no ip address on eth0/).once
422
- Ohai::Log.should_receive(:warn).with(/^unable to detect ip6address/).once
422
+ Ohai::Log.should_receive(:debug).with(/^unable to detect ip6address/).once
423
423
  Ohai::Log.should_receive(:warn).with(/^\[inet6\] no ip address on eth0/).once
424
424
  @plugin.run
425
425
  end
@@ -449,7 +449,7 @@ describe Ohai::System, "Network Plugin" do
449
449
  it "should warn about it" do
450
450
  Ohai::Log.should_receive(:warn).with(/^unable to detect ipaddress/).once
451
451
  Ohai::Log.should_receive(:warn).with(/^unable to detect macaddress/).once
452
- Ohai::Log.should_receive(:warn).with(/^unable to detect ip6address/).once
452
+ Ohai::Log.should_receive(:debug).with(/^unable to detect ip6address/).once
453
453
  @plugin.run
454
454
  end
455
455
  end
@@ -652,6 +652,19 @@ describe Ohai::System, "Network Plugin" do
652
652
  end
653
653
  end
654
654
 
655
+ describe "fe80::1 as a default gateway" do
656
+ before do
657
+ @plugin["network"]["default_inet6_gateway"] = "fe80::1"
658
+ end
659
+
660
+ it_does_not_fail
661
+
662
+ it "picks {ip,mac,ip6}address from the default interface" do
663
+ @plugin.run
664
+ @plugin["ip6address"].should == "3ffe:1111:2222::33"
665
+ end
666
+ end
667
+
655
668
  describe "can choose from addresses with different scopes" do
656
669
  before do
657
670
  @plugin["network"]["default_gateway"] = "0.0.0.0"
@@ -58,7 +58,7 @@ describe Ohai::System, "plugin rackspace" do
58
58
  "40:40:F5:AB:28:36" => {
59
59
  "family"=> "lladdr"
60
60
  }
61
- }}
61
+ }}
62
62
 
63
63
  # In olden days we could detect rackspace by a -rscloud suffix on the kernel
64
64
  # This is here to make #has_rackspace_kernel? fail until we remove that check
@@ -133,7 +133,7 @@ OUT
133
133
  describe 'with no public interfaces (empty eth0)' do
134
134
  before do
135
135
  # unset public (eth0) addresses
136
- @plugin[:network][:interfaces][:eth0]['addresses'] = {}
136
+ @plugin[:network][:interfaces][:eth0]['addresses'] = {}
137
137
  end
138
138
 
139
139
  it "should have all required attributes" do
@@ -149,7 +149,7 @@ OUT
149
149
  @plugin[:rackspace][:local_ipv6].should be_nil
150
150
  @plugin[:rackspace][:local_hostname].should_not be_nil
151
151
  end
152
-
152
+
153
153
  it "should have correct values for all attributes" do
154
154
  @plugin.run
155
155
  @plugin[:rackspace][:private_ip].should == "5.6.7.8"
@@ -161,16 +161,16 @@ OUT
161
161
 
162
162
  describe "without cloud file" do
163
163
  it_should_behave_like "!rackspace"
164
-
164
+
165
165
  before(:each) do
166
166
  File.stub(:exist?).with('/etc/chef/ohai/hints/rackspace.json').and_return(false)
167
167
  File.stub(:exist?).with('C:\chef\ohai\hints/rackspace.json').and_return(false)
168
168
  end
169
169
  end
170
-
170
+
171
171
  describe "with ec2 cloud file" do
172
172
  it_should_behave_like "!rackspace"
173
-
173
+
174
174
  before(:each) do
175
175
  File.stub(:exist?).with('/etc/chef/ohai/hints/ec2.json').and_return(true)
176
176
  File.stub(:read).with('/etc/chef/ohai/hints/ec2.json').and_return('')
@@ -199,4 +199,68 @@ OUT
199
199
  @plugin.stub(:shell_out).with("xenstore-read vm-data/provider_data/provider").and_return(mock_shell_out(0, stdout, "" ))
200
200
  end
201
201
  end
202
+
203
+ describe "does not have private networks" do
204
+ before do
205
+ stdout = 'BC764E20422B = "{"label": "public"}"\n'
206
+ @plugin.stub(:shell_out).with("xenstore-ls vm-data/networking").and_return(mock_shell_out(0, stdout, "" ))
207
+ stdout = '{"label": "public", "broadcast": "9.10.11.255", "ips": [{"ip": "9.10.11.12", "netmask": "255.255.255.0", "enabled": "1", "gateway": null}], "mac": "BC:76:4E:20:42:2B", "dns": ["69.20.0.164", "69.20.0.196"], "gateway": null}'
208
+ @plugin.stub(:shell_out).with("xenstore-read vm-data/networking/BC764E20422B").and_return(mock_shell_out(0, stdout, "" ))
209
+
210
+ File.stub(:exist?).with('/etc/chef/ohai/hints/rackspace.json').and_return(true)
211
+ File.stub(:read).with('/etc/chef/ohai/hints/rackspace.json').and_return('')
212
+ File.stub(:exist?).with('C:\chef\ohai\hints/rackspace.json').and_return(true)
213
+ File.stub(:read).with('C:\chef\ohai\hints/rackspace.json').and_return('')
214
+ end
215
+
216
+ it "should not have private_networks object" do
217
+ @plugin.run
218
+ @plugin[:rackspace][:private_networks].should == []
219
+ end
220
+ end
221
+
222
+ describe "has private networks" do
223
+ before do
224
+ @plugin[:network][:interfaces][:eth2] = {:addresses => {
225
+ "fe80::be76:4eff:fe20:422b" => {
226
+ "scope"=> "Link",
227
+ "prefixlen"=> "64",
228
+ "family"=> "inet6"
229
+ },
230
+ "9.10.11.12"=> {
231
+ "broadcast"=> "9.10.11.255",
232
+ "netmask"=> "255.255.255.0",
233
+ "family"=> "inet"
234
+ },
235
+ "BC:76:4E:20:42:2B" => {
236
+ "family"=> "lladdr"
237
+ }
238
+ }}
239
+ stdout = 'BC764E20422B = "{"label": "private-network"}"\n'
240
+ @plugin.stub(:shell_out).with("xenstore-ls vm-data/networking").and_return(mock_shell_out(0, stdout, "" ))
241
+ stdout = '{"label": "private-network", "broadcast": "9.10.11.255", "ips": [{"ip": "9.10.11.12", "netmask": "255.255.255.0", "enabled": "1", "gateway": null}], "mac": "BC:76:4E:20:42:2B", "dns": ["69.20.0.164", "69.20.0.196"], "gateway": null}'
242
+ @plugin.stub(:shell_out).with("xenstore-read vm-data/networking/BC764E20422B").and_return(mock_shell_out(0, stdout, "" ))
243
+
244
+ File.stub(:exist?).with('/etc/chef/ohai/hints/rackspace.json').and_return(true)
245
+ File.stub(:read).with('/etc/chef/ohai/hints/rackspace.json').and_return('')
246
+ File.stub(:exist?).with('C:\chef\ohai\hints/rackspace.json').and_return(true)
247
+ File.stub(:read).with('C:\chef\ohai\hints/rackspace.json').and_return('')
248
+ end
249
+
250
+ it "should private_networks object" do
251
+ @plugin.run
252
+ @plugin[:rackspace][:private_networks].should_not be_nil
253
+ end
254
+
255
+ it "should have correct values for all attributes" do
256
+ @plugin.run
257
+ @plugin[:rackspace][:private_networks][0][:label].should == "private-network"
258
+ @plugin[:rackspace][:private_networks][0][:broadcast].should == "9.10.11.255"
259
+ @plugin[:rackspace][:private_networks][0][:mac].should == "BC:76:4E:20:42:2B"
260
+ end
261
+
262
+ end
263
+
264
+
265
+
202
266
  end
metadata CHANGED
@@ -1,238 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohai
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.rc.0
5
- prerelease: 6
4
+ version: 7.0.0.rc.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adam Jacob
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-03-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: mime-types
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.16'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.16'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: systemu
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 2.5.2
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 2.5.2
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: yajl-ruby
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: mixlib-cli
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: mixlib-config
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: '2.0'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: '2.0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: mixlib-log
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: mixlib-shellout
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ~>
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
103
  version: '1.2'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ~>
108
+ - - "~>"
124
109
  - !ruby/object:Gem::Version
125
110
  version: '1.2'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: ipaddress
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: rake
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - "~>"
148
130
  - !ruby/object:Gem::Version
149
- version: '0'
131
+ version: 10.1.0
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - "~>"
156
137
  - !ruby/object:Gem::Version
157
- version: '0'
138
+ version: 10.1.0
158
139
  - !ruby/object:Gem::Dependency
159
140
  name: rspec-core
160
141
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
142
  requirements:
163
- - - ! '>='
143
+ - - ">="
164
144
  - !ruby/object:Gem::Version
165
145
  version: '0'
166
146
  type: :development
167
147
  prerelease: false
168
148
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
149
  requirements:
171
- - - ! '>='
150
+ - - ">="
172
151
  - !ruby/object:Gem::Version
173
152
  version: '0'
174
153
  - !ruby/object:Gem::Dependency
175
154
  name: rspec-expectations
176
155
  requirement: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ! '>='
157
+ - - ">="
180
158
  - !ruby/object:Gem::Version
181
159
  version: '0'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
163
  requirements:
187
- - - ! '>='
164
+ - - ">="
188
165
  - !ruby/object:Gem::Version
189
166
  version: '0'
190
167
  - !ruby/object:Gem::Dependency
191
168
  name: rspec-mocks
192
169
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
170
  requirements:
195
- - - ! '>='
171
+ - - ">="
196
172
  - !ruby/object:Gem::Version
197
173
  version: '0'
198
174
  type: :development
199
175
  prerelease: false
200
176
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
177
  requirements:
203
- - - ! '>='
178
+ - - ">="
204
179
  - !ruby/object:Gem::Version
205
180
  version: '0'
206
181
  - !ruby/object:Gem::Dependency
207
182
  name: rspec_junit_formatter
208
183
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
184
  requirements:
211
- - - ! '>='
185
+ - - ">="
212
186
  - !ruby/object:Gem::Version
213
187
  version: '0'
214
188
  type: :development
215
189
  prerelease: false
216
190
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
191
  requirements:
219
- - - ! '>='
192
+ - - ">="
220
193
  - !ruby/object:Gem::Version
221
194
  version: '0'
222
195
  - !ruby/object:Gem::Dependency
223
196
  name: chef
224
197
  requirement: !ruby/object:Gem::Requirement
225
- none: false
226
198
  requirements:
227
- - - ! '>='
199
+ - - ">="
228
200
  - !ruby/object:Gem::Version
229
201
  version: '0'
230
202
  type: :development
231
203
  prerelease: false
232
204
  version_requirements: !ruby/object:Gem::Requirement
233
- none: false
234
205
  requirements:
235
- - - ! '>='
206
+ - - ">="
236
207
  - !ruby/object:Gem::Version
237
208
  version: '0'
238
209
  description: Ohai profiles your system and emits JSON
@@ -245,14 +216,16 @@ files:
245
216
  - LICENSE
246
217
  - README.rdoc
247
218
  - Rakefile
219
+ - bin/ohai
248
220
  - docs/man/man1/ohai.1
221
+ - lib/ohai.rb
249
222
  - lib/ohai/application.rb
250
223
  - lib/ohai/common/dmi.rb
251
224
  - lib/ohai/config.rb
225
+ - lib/ohai/dsl.rb
226
+ - lib/ohai/dsl/plugin.rb
252
227
  - lib/ohai/dsl/plugin/versionvi.rb
253
228
  - lib/ohai/dsl/plugin/versionvii.rb
254
- - lib/ohai/dsl/plugin.rb
255
- - lib/ohai/dsl.rb
256
229
  - lib/ohai/exception.rb
257
230
  - lib/ohai/hints.rb
258
231
  - lib/ohai/loader.rb
@@ -296,6 +269,7 @@ files:
296
269
  - lib/ohai/plugins/gce.rb
297
270
  - lib/ohai/plugins/groovy.rb
298
271
  - lib/ohai/plugins/hostname.rb
272
+ - lib/ohai/plugins/init_package.rb
299
273
  - lib/ohai/plugins/ip_scopes.rb
300
274
  - lib/ohai/plugins/java.rb
301
275
  - lib/ohai/plugins/kernel.rb
@@ -365,7 +339,6 @@ files:
365
339
  - lib/ohai/runner.rb
366
340
  - lib/ohai/system.rb
367
341
  - lib/ohai/version.rb
368
- - lib/ohai.rb
369
342
  - spec/data/plugins/___lib64___libc.so.6.output
370
343
  - spec/data/plugins/___lib___libc.so.6.output
371
344
  - spec/data/plugins/cc.output
@@ -428,6 +401,7 @@ files:
428
401
  - spec/unit/plugins/gce_spec.rb
429
402
  - spec/unit/plugins/groovy_spec.rb
430
403
  - spec/unit/plugins/hostname_spec.rb
404
+ - spec/unit/plugins/init_package_spec.rb
431
405
  - spec/unit/plugins/ip_scopes_spec.rb
432
406
  - spec/unit/plugins/java_spec.rb
433
407
  - spec/unit/plugins/kernel_spec.rb
@@ -475,32 +449,27 @@ files:
475
449
  - spec/unit/provides_map_spec.rb
476
450
  - spec/unit/runner_spec.rb
477
451
  - spec/unit/system_spec.rb
478
- - bin/ohai
479
452
  homepage: http://wiki.opscode.com/display/chef/Ohai
480
453
  licenses: []
454
+ metadata: {}
481
455
  post_install_message:
482
456
  rdoc_options: []
483
457
  require_paths:
484
458
  - lib
485
459
  required_ruby_version: !ruby/object:Gem::Requirement
486
- none: false
487
460
  requirements:
488
- - - ! '>='
461
+ - - ">="
489
462
  - !ruby/object:Gem::Version
490
463
  version: '0'
491
- segments:
492
- - 0
493
- hash: -1337144685830584340
494
464
  required_rubygems_version: !ruby/object:Gem::Requirement
495
- none: false
496
465
  requirements:
497
- - - ! '>'
466
+ - - ">"
498
467
  - !ruby/object:Gem::Version
499
468
  version: 1.3.1
500
469
  requirements: []
501
470
  rubyforge_project:
502
- rubygems_version: 1.8.23
471
+ rubygems_version: 2.2.2
503
472
  signing_key:
504
- specification_version: 3
473
+ specification_version: 4
505
474
  summary: Ohai profiles your system and emits JSON
506
475
  test_files: []