summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-06-06 15:39:56 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-06-06 15:39:56 -0700
commitd0d1e2ef64c4a6eecf3465dff82b62cf2cc79afb (patch)
treebe60ae14adfbbbd03b80164c3e11be05e8fb30f8 /lib/puppet
parentc8df02703ac29b00140648640f85ec044a9cfd6e (diff)
parentd4e6c268aecabdbf36ece126f960ce2384576fcc (diff)
downloadpuppet-d0d1e2ef64c4a6eecf3465dff82b62cf2cc79afb.tar.gz
puppet-d0d1e2ef64c4a6eecf3465dff82b62cf2cc79afb.tar.xz
puppet-d0d1e2ef64c4a6eecf3465dff82b62cf2cc79afb.zip
Merge branch 'bug/2.7rc/7624-resource-purging-causes-audit-messages' into 2.7rc
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/type.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 586bb46f6..558491a7f 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -876,6 +876,12 @@ class Type
# Put the default provider first, then the rest of the suitable providers.
provider_instances = {}
providers_by_source.collect do |provider|
+ all_properties = self.properties.find_all do |property|
+ provider.supports_parameter?(property)
+ end.collect do |property|
+ property.name
+ end
+
provider.instances.collect do |instance|
# We always want to use the "first" provider instance we find, unless the resource
# is already managed and has a different provider set
@@ -886,7 +892,9 @@ class Type
end
provider_instances[instance.name] = instance
- new(:name => instance.name, :provider => instance)
+ result = new(:name => instance.name, :provider => instance)
+ properties.each { |name| result.newattr(name) }
+ result
end
end.flatten.compact
end