On Mar 22, 2010, at 5:41 PM, Nigel Kersten wrote:
On Sun, Mar 21, 2010 at 2:59 PM, Luke Kanies
<[email protected]> wrote:
On Mar 20, 2010, at 8:46 AM, Brice Figureau wrote:
# Define a new type.
def newtype(name, options = {}, &block)
...
# Now set up autoload any providers that might exist for this type.
klass.providerloader = Puppet::Util::Autoload.new(klass,
"puppet/provider/#{klass.name.to_s}"
)
# We have to load everything so that we can figure out the
default type.
klass.providerloader.loadall()
...
end
I don't think it's necessary to load the provider on the server, but
this last comment looks strange to me.
I think it is safe to comment those lines in puppet/metatype/
manager.rb
for your experiment.
My educated guess is that that call to loadall() is no longer
necessary. We
might have to modify the 'defaultprovider' method to call loadall()
if
necessary, but it should be done on demand rather than by default.
I mentioned this on IRC, but for completeness it should go here too.
Looks like the problem is setting global resource type defaults.
So that's the reason for the type getting loaded, but it's no excuse
for all of the providers getting loaded.
Thanks for tracking that down, btw.
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
-- (attributed to) Brian W. Kernighan (unconfirmed)
---------------------------------------------------------------------
Luke Kanies -|- http://reductivelabs.com -|- +1(615)594-8199
--
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.