Issue #6495 has been updated by James Turnbull.
Status changed from Needs Decision to Code Insufficient
Assignee changed from Paul Nasrat to Emiliano Gabrielli
Priority changed from Urgent to Normal
Just tested this and it breaks some tests:
<pre>
Failures:
1) Facter::Util::IP should return a list with a single interface on Linux
with a single interface
Failure/Error: Facter::Util::IP.get_interfaces().should == ["eth0"]
expected: ["eth0"]
got: ["eth0", "lo"] (using ==)
Diff:
@@ -1,2 +1,2 @@
-["eth0"]
+["eth0", "lo"]
# ./spec/unit/util/ip_spec.rb:27
2) Facter::Util::IP should return a list three interfaces on HP-UX with three
interfaces multiply reporting
Failure/Error: Facter::Util::IP.get_interfaces().should == ["lan1",
"lan0", "lo0"]
expected: ["lan1", "lan0", "lo0"]
got: ["Name", "lan1", "lan0", "lo0"] (using ==)
Diff:
@@ -1,2 +1,2 @@
-["lan1", "lan0", "lo0"]
+["Name", "lan1", "lan0", "lo0"]
# ./spec/unit/util/ip_spec.rb:48
Finished in 2.98 seconds
342 examples, 2 failures
</pre>
----------------------------------------
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.