lib/puppet/util/network_device/config.rb in puppet-3.1.1 vs lib/puppet/util/network_device/config.rb in puppet-3.2.0.rc1

- old
+ new

@@ -57,14 +57,15 @@ name.chomp! raise Puppet::Error, "Duplicate device found at line #{count}, already found at #{device.line}" if devices.include?(name) device = OpenStruct.new device.name = name device.line = count + device.options = { :debug => false } Puppet.debug "found device: #{device.name} at #{device.line}" devices[name] = device - when /^\s*(type|url)\s+(.+)$/ - parse_directive(device, $1, $2, count) + when /^\s*(type|url|debug)(\s+(.+))*$/ + parse_directive(device, $1, $3, count) else raise Puppet::Error, "Invalid line #{count}: #{line}" end count += 1 } @@ -83,9 +84,11 @@ case var when "type" device.provider = value when "url" device.url = value + when "debug" + device.options[:debug] = true else raise Puppet::Error, "Invalid argument '#{var}' at line #{count}" end end