ohai 8.13.0 → 8.14.0
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/common/dmi.rb +1 -1
- data/lib/ohai/config.rb +2 -2
- data/lib/ohai/dsl/plugin.rb +1 -1
- data/lib/ohai/loader.rb +1 -1
- data/lib/ohai/mixin/command.rb +18 -5
- data/lib/ohai/mixin/ec2_metadata.rb +1 -1
- data/lib/ohai/plugins/aix/os.rb +1 -1
- data/lib/ohai/plugins/c.rb +49 -67
- data/lib/ohai/plugins/darwin/memory.rb +1 -1
- data/lib/ohai/plugins/darwin/network.rb +3 -3
- data/lib/ohai/plugins/darwin/platform.rb +1 -1
- data/lib/ohai/plugins/darwin/system_profiler.rb +1 -1
- data/lib/ohai/plugins/digital_ocean.rb +1 -1
- data/lib/ohai/plugins/ec2.rb +42 -41
- data/lib/ohai/plugins/erlang.rb +1 -1
- data/lib/ohai/plugins/ip_scopes.rb +1 -1
- data/lib/ohai/plugins/kernel.rb +1 -1
- data/lib/ohai/plugins/linux/network.rb +2 -2
- data/lib/ohai/plugins/linux/platform.rb +6 -1
- data/lib/ohai/plugins/mono.rb +1 -1
- data/lib/ohai/plugins/network.rb +2 -2
- data/lib/ohai/plugins/packages.rb +59 -46
- data/lib/ohai/plugins/python.rb +2 -2
- data/lib/ohai/plugins/rackspace.rb +4 -4
- data/lib/ohai/plugins/sigar/network.rb +1 -1
- data/lib/ohai/plugins/sigar/network_route.rb +1 -1
- data/lib/ohai/plugins/solaris2/dmi.rb +1 -1
- data/lib/ohai/plugins/solaris2/network.rb +25 -8
- data/lib/ohai/plugins/ssh_host_key.rb +1 -1
- data/lib/ohai/plugins/windows/network.rb +5 -5
- data/lib/ohai/provides_map.rb +2 -2
- data/lib/ohai/system.rb +1 -1
- data/lib/ohai/version.rb +1 -1
- data/spec/functional/loader_spec.rb +1 -1
- data/spec/unit/mixin/command_spec.rb +118 -0
- data/spec/unit/plugins/aix/os_spec.rb +6 -5
- data/spec/unit/plugins/c_spec.rb +169 -118
- data/spec/unit/plugins/digital_ocean_spec.rb +7 -7
- data/spec/unit/plugins/dmi_spec.rb +4 -4
- data/spec/unit/plugins/ec2_spec.rb +64 -69
- data/spec/unit/plugins/linode_spec.rb +6 -6
- data/spec/unit/plugins/linux/platform_spec.rb +7 -0
- data/spec/unit/plugins/linux/sessions_spec.rb +2 -2
- data/spec/unit/plugins/network_spec.rb +16 -16
- data/spec/unit/plugins/openstack_spec.rb +1 -1
- data/spec/unit/plugins/packages_spec.rb +165 -191
- data/spec/unit/plugins/rackspace_spec.rb +203 -130
- data/spec/unit/plugins/solaris2/filesystem.rb +2 -2
- data/spec/unit/plugins/solaris2/network_spec.rb +36 -5
- metadata +3 -3
@@ -54,6 +54,9 @@ e1000g2:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 ind
|
|
54
54
|
net0: flags=40201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS,L3PROTECT> mtu 1500 index 2
|
55
55
|
inet 37.153.96.148 netmask fffffe00 broadcast 37.153.97.255
|
56
56
|
ether 90:b8:d0:16:9b:97
|
57
|
+
net1:1: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2
|
58
|
+
inet 10.16.125.36 netmask fffffe00 broadcast 10.16.125.255
|
59
|
+
ether 90:b8:d0:16:9b:97
|
57
60
|
ip.tun0: flags=2200851<UP,POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 1480 index 3
|
58
61
|
inet tunnel src 109.146.85.57 tunnel dst 109.146.85.212
|
59
62
|
tunnel security settings --> use 'ipsecconf -ln -i ip.tun1'
|
@@ -103,7 +106,18 @@ NETSTAT_RN
|
|
103
106
|
destination: default
|
104
107
|
mask: default
|
105
108
|
gateway: 10.13.37.1
|
106
|
-
interface: e1000g0
|
109
|
+
interface: e1000g0 index 3
|
110
|
+
flags: <UP,GATEWAY,DONE,STATIC>
|
111
|
+
recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
|
112
|
+
0 0 0 0 0 0 1500 0
|
113
|
+
ROUTE_GET
|
114
|
+
|
115
|
+
@solaris11_route_get = <<-ROUTE_GET
|
116
|
+
route to: default
|
117
|
+
destination: default
|
118
|
+
mask: default
|
119
|
+
gateway: 10.13.37.1
|
120
|
+
interface: net1 index 2
|
107
121
|
flags: <UP,GATEWAY,DONE,STATIC>
|
108
122
|
recvpipe sendpipe ssthresh rtt,ms rttvar,ms hopcount mtu expire
|
109
123
|
0 0 0 0 0 0 1500 0
|
@@ -117,13 +131,13 @@ ROUTE_GET
|
|
117
131
|
|
118
132
|
allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
119
133
|
allow(@plugin).to receive(:shell_out).with("arp -an").and_return(mock_shell_out(0, @solaris_arp_rn, ""))
|
120
|
-
allow(@plugin).to receive(:shell_out).with("route -n get default").and_return(mock_shell_out(0, @
|
134
|
+
allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
121
135
|
end
|
122
136
|
|
123
137
|
describe "gathering IP layer address info" do
|
124
138
|
before do
|
125
139
|
@stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris_route_get)
|
126
|
-
allow(@plugin).to receive(:shell_out).with("route -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
140
|
+
allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
127
141
|
allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @solaris_ifconfig, ""))
|
128
142
|
@plugin.run
|
129
143
|
end
|
@@ -133,7 +147,7 @@ ROUTE_GET
|
|
133
147
|
end
|
134
148
|
|
135
149
|
it "detects the interfaces" do
|
136
|
-
expect(@plugin["network"]["interfaces"].keys.sort).to eq(["e1000g0:3", "e1000g2:1", "eri0", "ip.tun0", "ip.tun0:1", "lo0", "lo0:3", "net0", "qfe1"])
|
150
|
+
expect(@plugin["network"]["interfaces"].keys.sort).to eq(["e1000g0:3", "e1000g2:1", "eri0", "ip.tun0", "ip.tun0:1", "lo0", "lo0:3", "net0", "net1:1", "qfe1"])
|
137
151
|
end
|
138
152
|
|
139
153
|
it "detects the ip addresses of the interfaces" do
|
@@ -149,12 +163,29 @@ ROUTE_GET
|
|
149
163
|
end
|
150
164
|
end
|
151
165
|
|
166
|
+
describe "gathering solaris 11 zone IP layer address info" do
|
167
|
+
before do
|
168
|
+
@stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris11_route_get)
|
169
|
+
allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris11_route_get, ""))
|
170
|
+
allow(@plugin).to receive(:shell_out).with("ifconfig -a").and_return(mock_shell_out(0, @solaris_ifconfig, ""))
|
171
|
+
@plugin.run
|
172
|
+
end
|
173
|
+
|
174
|
+
it "finds the flags for a PHYSRUNNING interface" do
|
175
|
+
expect(@plugin[:network][:interfaces]["net1:1"][:flags]).to eq(%w{ UP BROADCAST RUNNING MULTICAST IPv4 PHYSRUNNING })
|
176
|
+
end
|
177
|
+
|
178
|
+
it "finds the default interface for a solaris 11 zone" do
|
179
|
+
expect(@plugin[:network][:default_interface]).to eq("net1:1")
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
152
183
|
# TODO: specs for the arp -an stuff, check that it correctly adds the MAC addr to the right iface, etc.
|
153
184
|
|
154
185
|
describe "setting the node's default IP address attribute" do
|
155
186
|
before do
|
156
187
|
@stdout = double("Pipe, stdout, cmd=`route get default`", :read => @solaris_route_get)
|
157
|
-
allow(@plugin).to receive(:shell_out).with("route -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
188
|
+
allow(@plugin).to receive(:shell_out).with("route -v -n get default").and_return(mock_shell_out(0, @solaris_route_get, ""))
|
158
189
|
@plugin.run
|
159
190
|
end
|
160
191
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ohai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 8.
|
4
|
+
version: 8.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: systemu
|
@@ -620,7 +620,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
620
620
|
version: '0'
|
621
621
|
requirements: []
|
622
622
|
rubyforge_project:
|
623
|
-
rubygems_version: 2.6.
|
623
|
+
rubygems_version: 2.6.3
|
624
624
|
signing_key:
|
625
625
|
specification_version: 4
|
626
626
|
summary: Ohai profiles your system and emits JSON
|