summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Caiafa <acaiafa1@bloomberg.net>2016-08-05 10:39:32 -0400
committerAnthony Caiafa <acaiafa1@bloomberg.net>2016-08-05 10:39:32 -0400
commit3a4aa92ec0fdf491e1a391cf5effd46d73b27084 (patch)
treee8274c4f6987eb6f0a2e991dffe513caf802f5ba
parente604a626549128cbba793b52828f326a51f91474 (diff)
downloadohai-3a4aa92ec0fdf491e1a391cf5effd46d73b27084.tar.gz
updating regex #jeremyrossi
-rw-r--r--lib/ohai/plugins/solaris2/network.rb2
-rw-r--r--spec/unit/plugins/solaris2/network_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ohai/plugins/solaris2/network.rb b/lib/ohai/plugins/solaris2/network.rb
index a146a1db..858d5183 100644
--- a/lib/ohai/plugins/solaris2/network.rb
+++ b/lib/ohai/plugins/solaris2/network.rb
@@ -101,7 +101,7 @@ Ohai.plugin(:Network) do
cint = nil
so.stdout.lines do |line|
- if line =~ /^([0-9a-zA-Z\.\:\-]+):/
+ if line =~ /^([0-9a-zA-Z\.\:\-]+)\S/
cint = $1
iface[cint] = Mash.new unless iface[cint]
iface[cint][:mtu] = $2
diff --git a/spec/unit/plugins/solaris2/network_spec.rb b/spec/unit/plugins/solaris2/network_spec.rb
index 0f1484ef..0c05d5bc 100644
--- a/spec/unit/plugins/solaris2/network_spec.rb
+++ b/spec/unit/plugins/solaris2/network_spec.rb
@@ -147,7 +147,7 @@ ROUTE_GET
end
it "detects the interfaces" do
- 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"])
+ expect(@plugin["network"]["interfaces"].keys.sort).to eq(["e1000g0:3", "e1000g2:1", "eri0", "ip.tun0", "ip.tun0:1", "ip6.tun0", "lo0", "lo0:3", "net0", "net1:1", "qfe1", "vni0"])
end
it "detects the ip addresses of the interfaces" do