Skip to content

Commit

Permalink
ENTERPRISE-281 fixes issue with has_interfaces and case mismatch caus…
Browse files Browse the repository at this point in the history
…ing us not to return some interfaces
  • Loading branch information
Travis Fields committed Oct 8, 2014
1 parent a44cf3e commit 8ad7f68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppet/parser/functions/has_interface_with.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ module Puppet::Parser::Functions
end

kind, value = args

kind.downcase!

if lookupvar(kind) == value
return true
end

result = false
interfaces.each do |iface|
iface.downcase!
if value == lookupvar("#{kind}_#{iface}")
result = true
break
Expand Down

0 comments on commit 8ad7f68

Please sign in to comment.