Issue #16665 has been updated by Sebastian Lehn.

I tried also my suggestion on 2003 and ran into the same issues. Unfortunately, 
it seems 2003 only supports interface names. Maybe, another way to get that 
informations is better than parsing command line output. What about using WMI 
management interface of windows. 

See: 
http://msdn.microsoft.com/en-us/library/windows/desktop/aa394217%28v=vs.85%29.aspx

Within WMI Class `Win32_NetworkAdapterConfiguration` you will find any 
information you are looking for without locale hassle. Furthermore, WMI is 
supported down to windows 2000.

See also (some of my google results) as examples:

* 
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/4328bbaf-5e98-4277-914b-af127b9bf931/
* 
http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/bb74c2eb-eca2-455d-a270-8dd0f3d195e6/



----------------------------------------
Bug #16665: [windows] wrong ipaddress with locale != en
https://projects.puppetlabs.com/issues/16665#change-72208

Author: Sebastian Lehn
Status: Accepted
Priority: Normal
Assignee: 
Category: windows
Target version: 
Keywords: windows, ipaddress, netmask, ipaddress6
Branch: 
Affected Facter version: 1.6.11


Within module Facter::Util::IP

<pre>
   # A map of all the different regexes that work for
   # a given platform or set of platforms.
   REGEX_MAP = {
    :windows => {
      :ipaddress  => /\s+IP Address:\s+([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/,
      :ipaddress6 => /Address 
((?![fe80|::1])(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/,
      :netmask  => /\s+Subnet Prefix:\s+\S+\s+\(mask 
([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)\)/
    }
   }
</pre>

Regex contains english strings. That's why facter returns no ip address for 
interfaces and no netmask.



-- 
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