Issue #6495 has been updated by Emiliano Gabrielli.

James Turnbull wrote:
> Just tested this and it breaks some tests:
> 
> Failures:

>  1) Facter::Util::IP should return a list with a single interface on Linux 
> with a single interface
>       -["eth0"]
>       +["eth0", "lo"]

This should be the expected behavior IMHO, so I'd update the test accordingly

>  2) Facter::Util::IP should return a list three interfaces on HP-UX with 
> three interfaces multiply reporting
>      -["lan1", "lan0", "lo0"]
>       +["Name", "lan1", "lan0", "lo0"]

Could you provide the line to parse on HP-UX? I can not test on this system


----------------------------------------
Bug #6495: Network interfaces not detectd
https://projects.puppetlabs.com/issues/6495

Author: Emiliano Gabrielli
Status: Code Insufficient
Priority: Normal
Assignee: Emiliano Gabrielli
Category: library
Target version: 
Keywords: network interface 
Branch: 


A network interface named "pubeth" (not having a digit into the name) is not 
detected by facter, as the regular exception
in Facter::Util::IP.get_interfaces requires a digit to be present:

   def self.get_interfaces
        return [] unless output = Facter::Util::IP.get_all_interface_output()

        # Our regex appears to be stupid, in that it leaves colons sitting
        # at the end of interfaces.  So, we have to trim those trailing
        # characters.  I tried making the regex better but supporting all
        # platforms with a single regex is probably a bit too much.
        output.scan(/^[-\w]+[.:]?\d+[.:]?\d*[.:]?\w*/).collect { |i| 
i.sub(/:$/, '') }.uniq
    end


`/^[-\w]+[.:]?\d?[.:]?\d*[.:]?\w*/`  should be ok




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to