summaryrefslogtreecommitdiffstats
path: root/lib/facter/util
Commit message (Collapse)AuthorAgeFilesLines
...
* | Facter::Manufacturer - sunos test + simplified regexMarc Fournier2010-08-041-1/+1
|/ | | | | | | | | The 2nd regex (with the 0x\d+) got removed because it appears to never be used, even on SunOS, for which it has been introduced (99833a1b / #1793). The 3dn regex is changed to clearly confine the value between mandatory newlines/whitespaces.
* Adding HP-UX support to Facter's IP factsJames Turnbull2010-06-151-3/+15
| | | | Includes Rspec tests
* Fixed #3393 - Updates to Facter for MS WindowsDavid Schmitt2010-06-151-11/+34
| | | | | | | | | | This patch is originally by Daniel Berger <djberg96@gmail.com>, I changed using Facter.value instead of repeatedly testing Config['host_os'], removed Resolution::which, and fixed the specs. Thanks to Paul Nasrat for helping with cross-platform debugging. Signed-off-by: David Schmitt <david@dasz.at>
* Fixed #3403 - Added fact to query vlans; added spec testJonas Genannt2010-06-131-0/+24
|
* Fixed failing test introduced by previous commitMarc Fournier2010-05-071-1/+1
|
* Fixes #3740 - split dmi output on regexMarc Fournier2010-05-071-1/+1
| | | | | | | | Splitting dmi output on the string "/^Handle/" didn't work, and caused the function to match the wrong key if it was found more than once. The intended behaviour of the function is restored by splitting the dmi output on the regex /^Handle/.
* Fixed #2938 - interfaces that don't match ^\w+[.:]?\d+ are ignoredJames Turnbull2010-04-241-2/+2
| | | | Thanks to Tim Sharpe for the fix
* Fixed #3445 - Facter does not handle solaris branded zones properlyJames Turnbull2010-04-241-0/+1
| | | | Thanks to Pavol Dilung for the fix.
* Add kvm support to virtual factJohn Ferlito2010-03-081-0/+17
| | | | Based on initial patch by James Turnbull
* Revert "use popen3 in Resolution.exec"Paul Nasrat2010-02-281-17/+6
| | | | | | | | | | | This reverts commit 33fb7709404e706801683e6c47ab7a0a5a1884b1. This has broken master for some facts (eg OS X facts), it also breaks facter platform support on win32 as popen3 does not work there. I'd like to get master working, backlog of patches applied and revisit exec. Paul
* Fix #2341 - stricter handling of dmidecode splitPaul Nasrat2010-01-301-1/+1
| | | | This adds a test to ensure we are not prematurely splitting on Handle
* Fix missing error casePaul Nasrat2010-01-171-0/+1
|
* Remove whitespace in DMI facts (#3008, #3011)Paul Nasrat2010-01-101-6/+11
| | | | | | | | | In addition to the stripping of the output of these facts this patchset: Refactor - Extracted function to enable easier testing. Tests - data driven tests for the dmidecode/smbios fact. Paul
* use popen3 in Resolution.exec to catch stderrPeter Meier2009-11-081-6/+17
| | | | | | | | | | | | | | | | | | | So far messages to stderr haven't been catched by Facter::Util::Resolution.exec and were insted printed out to stderr. This will cause facter and even puppet to print to stderr themself, which is not very nice when running puppetd by cron, as you might get every run a mail if a command outputs to stderr. We are now wrapping the command execution with Open3.popen3 to catch stderr and passing them to the new introduced Facter.warn method. We are also catching multiline outputs chomping newlines and returning an array if there have been more than one line. Otherwise we return an array containing the different lines. This prevents in general cases as described in #2766 and should handle command execution in a bit saner way.
* Fix errors when alias IP's are definedKurt Keller2009-09-091-0/+7
|
* Fix 2455 - improve error handling on fact loadPaul Nasrat2009-09-092-1/+6
| | | | | | Fix facts added with empty blocks by handling calls to value when setcode not called Ensure we handle load failures more gracefully
* Fix broken solaris zone tests on EC2Paul Nasrat2009-09-091-0/+16
| | | | | | | | | This cleans up xen and vserver detection to enable us to stub out so when we happen to be running tests on xen we don't report as that. More cleanup is needed in this area but this should give us a green build. This renames the tests to be consistent with current naming convention
* Add Darwin netmask support on top of Jim's patchPaul Nasrat2009-08-231-1/+7
|
* Fix #2470 - duplicate entries in interfaces factPaul Nasrat2009-08-121-1/+1
| | | | | Solaris orders inet and inet6 seperately. This tests for and fixes this by uniqueing the list. Will probably need work when we get to ipv6 support.
* Update OS X minor version fact to cope with '10.x' values and provide test ↵Nigel Kersten2009-08-071-3/+7
| | | | | | coverage switch %x{} call to Facter::Util::Resolution.exec for better testing
* Merge commit 'pnasrat/tickets/master/2292' into mergePaul Nasrat2009-07-181-0/+27
|\
| * Issue #2292 Add tests for virtual factsPaul Nasrat2009-07-161-0/+27
| | | | | | | | Add tests and utility for virtual fact detection
* | Issue #2314 OpenBSD sysctlJoe McDonagh2009-07-161-2/+13
|/ | | | Use OpenBSD sysctl for manufacturer facts.
* Facter fix #2231 typoPaul Nasrat2009-05-121-1/+1
| | | | Added a test to pickup typo and fix
* Partial fix for #2191 - Facter compatibility for Ruby 1.9James Turnbull2009-04-271-1/+1
|
* Fixing ifconfig warnings generated on OS XLuke Kanies2009-04-201-10/+6
| | | | | | | | The interface collection regex was leaving trailing ':' characters on the interface names, which meant individual interfaces weren't quite right. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #2132 - support for named interface aliases under linuxJames Turnbull2009-04-211-1/+1
|
* correctly compare values - fixes #2021Peter Meier2009-04-072-12/+26
| | | | | | | | | | | | | | this ensures we can compare all kind of objects and not only instances of strings. It compares strings in a case-insensitive manner and converts symbols to strings. introducing this behavior required that we introduce a convert util method, to ensure that we convert the value correctly. Introduced this method in other places as well. This behavior change requires that we drop one test, which have become anyway deprecated.
* Fix to stdout in resolution.rbJames Turnbull2009-03-171-2/+2
|
* Fixed #2081 - Fixed interfaces fact for vlan subinterfacesJames Turnbull2009-03-171-1/+1
|
* Fixed #2055 - SunoS Interface errorJames Turnbull2009-03-071-1/+1
|
* Fixed #2040 - Facter should provide a macosx_productversion_major factJames Turnbull2009-03-011-0/+5
|
* more consistent indentation and alignment. also removal of trailing whitespaceIan Taylor2009-02-285-401/+398
|
* Further fix #2032 - close IOJames Turnbull2009-02-281-0/+1
|
* Fixed #2032 - file.open hanging on /proc/uptime on some platformJames Turnbull2009-02-281-1/+2
|
* Fixing #1927 - failing facts don't kill FacterLuke Kanies2009-02-041-0/+3
| | | | | | Facts that raise exceptions just return nil now. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1850 - Facter updates for Ruby 1.9James Turnbull2009-02-042-4/+4
|
* Fixed #1924 - Fixed lo / lo:0 local interface matchingJames Turnbull2009-02-041-1/+1
|
* Fixed generic uptime factJames Turnbull2009-02-031-0/+2
|
* Cleaner fix for #1926James Turnbull2009-02-031-1/+1
|
* Renaming Facter::Macosx to Facter::Util::MacosxLuke Kanies2009-01-271-1/+1
| | | | | | This name change just reflects the file location. Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixing #1838 - profiler failures don't throw exceptionsLuke Kanies2009-01-271-10/+24
| | | | | | | Also added tests to the macosx code; it's much cleaner and actually tested now. Signed-off-by: Luke Kanies <luke@madstop.com>
* Added network factJames Turnbull2009-01-271-0/+13
|
* Fixed #1870 - Format all subnet masks as human-readableJames Turnbull2009-01-271-2/+7
|
* Added uptime factsJames Turnbull2009-01-261-0/+32
|
* Fix bug #1870 and add interface fact support for darwin systemsPaul Nasrat2009-01-151-3/+3
|
* Refactoring the IP support, and fixing #1846.Luke Kanies2009-01-151-29/+49
| | | | | | | | | | | | | | | | 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>
* Fixing indentation everywhereLuke Kanies2009-01-156-127/+124
| | | | Signed-off-by: Luke Kanies <luke@madstop.com>
* Fixed #1793 - Added more Solaris 10 factsJames Turnbull2008-12-221-5/+13
|
* Fixes #1582 - Fix MAC address reporting for Linux bonding slave interfacesJames Turnbull2008-09-201-14/+43
|