From 4380dc8860f6f432c2ba83f33f79de7a7c0b0215 Mon Sep 17 00:00:00 2001 From: Eugene Kirpichov Date: Mon, 24 Sep 2012 12:45:13 -0700 Subject: [PATCH] Fix warning in ip.rb which precluded cobbler test from passing --- .../network/lib/puppet/provider/network_interface/ip.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deployment/puppet/network/lib/puppet/provider/network_interface/ip.rb b/deployment/puppet/network/lib/puppet/provider/network_interface/ip.rb index 5498ec98b9..7cb9790bc3 100644 --- a/deployment/puppet/network/lib/puppet/provider/network_interface/ip.rb +++ b/deployment/puppet/network/lib/puppet/provider/network_interface/ip.rb @@ -179,7 +179,11 @@ Puppet::Type.type(:network_interface).provide(:ip) do end #FIXME Need to support multiple inet & inet6 hashes - IP_ARGS = [ "qlen", "mtu", "address" ] + + # I've no idea why this is executed more than once and whether it's expected, + # but without the "unless defined?" part, a warning is emitted which our + # tests don't like. + IP_ARGS = [ "qlen", "mtu", "address" ] unless defined?(IP_ARGS) IP_ARGS.each do |ip_arg| define_method(ip_arg.to_s.downcase) do