Issue #2953 has been updated by James Turnbull.

Target version deleted (queued)


----------------------------------------
Feature #2953: Puppet should support a data loading system
https://projects.puppetlabs.com/issues/2953

Author: Luke Kanies
Status: Accepted
Priority: Normal
Assignee: 
Category: plumbing
Target version: 
Affected Puppet version: 0.25.1
Keywords: data, loading, external, search
Branch: 


Similar to R.I.Pienaar's extlookup functionality, along with the data loading 
function I've written, Puppet should support a builtin system for loading class 
data from external sources.

When used as a function, this is relatively simple, because the class developer 
has to trigger the data loading.  When used as a subsystem, Puppet should be 
able to trigger the loading on its own, which means it's a bit more complicated.

I see a few questions that should be resolved:

1) Should we load data per class or per-variable?

Luke's data loading function is per-class, basically setting variables in the 
class's scope, but Volcane's extlookup is per-variable.  A nice middle-ground 
might be static declaration of the variables that should be loaded; something 
like:
<pre>
class foo loads($var1, $var2) { ... }
</pre>

2) Should we just automatically load data, or should we introduce something 
like a new syntax that triggers loading?

See above, but I have also considered use of a slightly modified variable 
reference syntax; e.g., an unlikely possibility:
<pre>
class foo {
  file { $$var: # loaded variable
    ...
  }
}
</pre>

3) What kind of flexibility should the back-end support for search paths and 
overriding data?

The whole goal of this is to support search paths through different data 
sources and to allow overriding of data.  E.g., my dnsresolver class needs to 
allow users to customize the data so that each site can define how to pick its 
resolvers.  The class/module developer can't know in advance how data should be 
resolved - each site should be able to define different search paths.

I think this is actually the hardest part, and all I can think of is that the 
data backend itself needs to be able to define the search path, so whomever 
fills in the data also gets to pick the search path.

Assigning to rowlf, but it's unlikely to make it in.

Luke's data loading thread:
http://groups.google.com/group/puppet-users/browse_thread/thread/b439cd34803ed5a1

Volcane's extlookup:
http://nephilim.ml.org/~rip/puppet/extlookup.rb


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