puppetlabs/facter — pull request #359 by alexharv074 (2012-11-26 06:55:27+00:00)
Title: (#17487) Add support for HPUX NIC bonding in IP facts

Without this patch applied facter prints messages like

$ facter
Could not retrieve netmask_lan3_: undefined method `+' for nil:NilClass
Could not retrieve macaddress_lan3_: undefined method `+' for nil:NilClass
Could not retrieve network_lan3_: undefined method `+' for nil:NilClass
Could not retrieve ipaddress6_lan3_: undefined method `+' for nil:NilClass
Could not retrieve ipaddress_lan3_: undefined method `+' for nil:NilClass
Could not retrieve mtu_lan3_: undefined method `+' for nil:NilClass
...
interfaces => lan4_1,lan3_,lan1,lo0,lan4

The patch is a rewrite of Hongbo Hu's patch submitted in #11612 with sed
code implemented in Ruby. The patch replaces the existing HP-UX unit tests
with an exhaustive selection of netstat -in, ifconfig, and lanscan examples
on various HP platforms with and without NIC bonding.

The patch also includes tests for MTU facts commented out as MTU facts have
not been implemented yet. These can be uncommented after (#17808) is fixed.