summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-08-19 10:15:24 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-08-19 10:15:24 -0700
commit2cf0918e2b04c234463521590a159abccd610d6d (patch)
tree4b1a71b1a640b5280b44c1e642b926f945be2b70
parente41fefcd3e8518974936d85c99e78ab20e888c72 (diff)
downloadohai-2cf0918e2b04c234463521590a159abccd610d6d.tar.gz
fixing Lint/UnderscorePrefixedVariableName
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/ohai/plugins/rackspace.rb6
-rw-r--r--lib/ohai/plugins/windows/network.rb12
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/ohai/plugins/rackspace.rb b/lib/ohai/plugins/rackspace.rb
index c5444e97..282f8e14 100644
--- a/lib/ohai/plugins/rackspace.rb
+++ b/lib/ohai/plugins/rackspace.rb
@@ -115,9 +115,9 @@ Ohai.plugin(:Rackspace) do
if so.exitstatus == 0
networks = []
so.stdout.split("\n").map { |l| l.split("=").first.strip }.map do |item|
- _so = shell_out("xenstore-read vm-data/networking/#{item}")
- if _so.exitstatus == 0
- networks.push(FFI_Yajl::Parser.new.parse(_so.stdout))
+ so = shell_out("xenstore-read vm-data/networking/#{item}")
+ if so.exitstatus == 0
+ networks.push(FFI_Yajl::Parser.new.parse(so.stdout))
else
Ohai::Log.debug("rackspace plugin: Unable to capture custom private networking information for Rackspace cloud")
return false
diff --git a/lib/ohai/plugins/windows/network.rb b/lib/ohai/plugins/windows/network.rb
index 79495378..8ae050e6 100644
--- a/lib/ohai/plugins/windows/network.rb
+++ b/lib/ohai/plugins/windows/network.rb
@@ -74,21 +74,21 @@ Ohai.plugin(:Network) do
iface[cint][:addresses] = Mash.new
iface[cint][:configuration][:ip_address].each_index do |i|
ip = iface[cint][:configuration][:ip_address][i]
- _ip = IPAddress("#{ip}/#{iface[cint][:configuration][:ip_subnet][i]}")
+ ip2 = IPAddress("#{ip}/#{iface[cint][:configuration][:ip_subnet][i]}")
iface[cint][:addresses][ip] = Mash.new(
- :prefixlen => _ip.prefix
+ :prefixlen => ip2.prefix
)
- if _ip.ipv6?
+ if ip2.ipv6?
# inet6 address
iface[cint][:addresses][ip][:family] = "inet6"
iface[cint][:addresses][ip][:scope] = "Link" if ip =~ /^fe80/i
else
# should be an inet4 address
- iface[cint][:addresses][ip][:netmask] = _ip.netmask.to_s
+ iface[cint][:addresses][ip][:netmask] = ip2.netmask.to_s
if iface[cint][:configuration][:ip_use_zero_broadcast]
- iface[cint][:addresses][ip][:broadcast] = _ip.network.to_s
+ iface[cint][:addresses][ip][:broadcast] = ip2.network.to_s
else
- iface[cint][:addresses][ip][:broadcast] = _ip.broadcast.to_s
+ iface[cint][:addresses][ip][:broadcast] = ip2.broadcast.to_s
end
iface[cint][:addresses][ip][:family] = "inet"
end