On Sep 15, 2009, at 11:36 PM, Paul Nasrat wrote: > > 2009/9/15 James Turnbull <[email protected]>: >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Thomas Bellman wrote: >>> Christian Hofstaedtler wrote: >>> >>>> You probably can't avoid `df` if you want something which works for >>>> anything else than Linux too. >>> >>> Of course, the output from df differs between different Unixes... > >> And I sense the maze of twisty little passages that are all alike >> that we ventured down for the interface facts but you could take a >> look at that code to see how different output was parsed (or not >> depending on how people feel about that code... :) ). > > I'd rather not use that as an example on how to do this, tests were > retrofitted, it is brittle and too monolithic. > > We already support a mechanism to confine particular facts resolvers > based on operatingsystem. > > I'd say small tested facts for each operatingsystem with clear > responsibility are preferred rather than what we have in the formerly > named ipmess.rb .
While I agree that the interface world is heinously messy, I kind of like the idea of a bit of an abstract interface built into a library, and then simple facts that essentially just call out to that interface. I think it's more maintainable in the long term, especially as we don't currently have the ability to test individual fact resolutions. -- Sometimes I think we're alone. Sometimes I think we're not. In either case, the thought is staggering. --R. Buckminster Fuller --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en -~----------~----~----~----~------~----~------~--~---
