Hi
so I found one issue while using the code a bit more in production:
> + def unexport(node)
> + # fetch all exported resource
> + query = {:include => {:param_values => :param_name}}
> + query[:conditions] = ["exported=? AND host_id=?", true, node.id]
> +
> + Puppet::Rails::Resource.find(:all, query).each do |resource|
While this:
> + if
> Puppet::Type.type(resource.restype.downcase.to_sym).validattr?(:ensure)
works fine for exported types, it won't work for exported defines. As a
define won't be found by Puppet::Type.type. Looking at the code it looks
to me as exported defines are usually found via the current scope in the
catalog. Hence, as during catalog compilation there is already some sort
of autoloading around which will also load the define if it exists.
I'm unsure how to do that in the clean app. Any hints how I could get
the same autoload behavior as one has within the catalog to get it
outside of any scope etc. working?
Thanks!
~pete
--
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.