Feature #1846

ipmess.rb: Change interfaces to match the names used for the variables

Added by snemetz - over 1 year ago. Updated over 1 year ago.

Status:Closed Start:12/30/2008
Priority:Normal Due date:
Assignee:Luke Kanies % Done:

100%

Category:library
Target version:1.5.3
Keywords: Branch:
Votes: 0

Description

: and . are being replaced with _ in the variable names. The names in the interfaces variables should be changed to match

This can be done by changing line: Facter::IPAddress.get_interfaces.join(“,”) to Facter::IPAddress.get_interfaces.join(“,”).gsub([:.], ‘_’)

Associated revisions

Revision aa56886b1143d49173f4878a41107f55fece529c
Added by Luke Kanies over 1 year ago

Refactoring the IP support, and fixing #1846.

I’ve made the IPMess stuff a lot less messy, and refactored a lot of the util/ip module, including naming it more sensibly.

The biggest changes are that I moved the big case statement into a constant and then used a bit of dispatch-style logic to use it, and I eliminated a bunch of duplicate code in the ipmess.rb file.

Added some test data for FreeBSD and fixed a bug in my map logic pointed out by Paul Nasrat.

I’ve also fixed #1846, in that the interface list now s/:/_/g.

Signed-off-by: Luke Kanies luke@madstop.com

History

Updated by snemetz - over 1 year ago

Made a typo gsub([:.], ‘’) should have been gsub(/[:.]/, ‘’)

Updated by Luke Kanies over 1 year ago

  • Status changed from Unreviewed to Ready for Testing
  • Assignee changed from James Turnbull to Luke Kanies

Fixed in the tickets/1846 branch in my repo, along with some refactoring and whitespace changes.

Updated by Luke Kanies over 1 year ago

  • Status changed from Ready for Testing to Closed
  • % Done changed from 0 to 100

Applied in changeset commit:“aa56886b1143d49173f4878a41107f55fece529c”.

Also available in: Atom PDF