On 28/05/10 12:00, Luke Kanies wrote:
> [snipped external data]

I do agree with all you explained.

> I also don't like the idea of just relying on a function - I'd like a
> class to be able to declare that it relies on external data, so that
> users know what they can configure in their class.

Yes, I think that's really necessary. I've always seen classes (or
modules) as a black box thing you can add to your node (and I'm sure
everybody do the same). The thing I'd like to emphasis is that those
data we can configure form a kind of API of the said class/module.
As such, we should make sure we build the tool to check/validate them
from the class/module, so that we can generate useful error message to
the user (in case they don't validate or exist). Also, there might be
some case we'd have to require some data (and other to be optional),
which the module can't have any default for.
I think what I mean is that it would be cool for a module/class to have
a way to describe it's configuration data (maybe in the metadata?).

> Fortunately, extlookup is a very short function, so it should be
> straightforward to extend it if we decide to do that.

I'd prefer a more "native" system to load those data into a class, so
that the values could be promoted to "class variables", which live only
in the class (or module?) scope.

> I'm thinking that we should ship something simple for rowlf, but I think
> it should avoid CSV (probably using yaml instead) and it should, at the
> least, support a global data directly and per-module data directories. 
> It should also allow multiple files for searching (e.g., search
> $os-$osver.yaml, $os.yaml, and default.yaml) rather than having all of
> the values in a single file.

I'd tend to agree, provided we build something more native than using a
function in a subsequent version (ie make the data loading system more
embedded into the framework).
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/

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

Reply via email to