summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/resource.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-25 19:40:44 -0500
committerLuke Kanies <luke@madstop.com>2008-02-25 19:40:44 -0500
commit125851278d745e443c0598fbb0577b010f824365 (patch)
tree6b7abbf4e6ce7a2542ceb2a88f8c9ce9b1e860e4 /lib/puppet/parser/resource.rb
parent9a3348764b30ad355f14c27b497ae18ed20f9ea8 (diff)
downloadpuppet-125851278d745e443c0598fbb0577b010f824365.tar.gz
puppet-125851278d745e443c0598fbb0577b010f824365.tar.xz
puppet-125851278d745e443c0598fbb0577b010f824365.zip
Fixing #1084 -- the node catalog asks the individual
resources whether they're isomorphic, and they in turn ask the resource types (or default to true for defined resource types).
Diffstat (limited to 'lib/puppet/parser/resource.rb')
-rw-r--r--lib/puppet/parser/resource.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/parser/resource.rb b/lib/puppet/parser/resource.rb
index fb0799011..46be89ca2 100644
--- a/lib/puppet/parser/resource.rb
+++ b/lib/puppet/parser/resource.rb
@@ -133,6 +133,15 @@ class Puppet::Parser::Resource
tag(@ref.title) if valid_tag?(@ref.title.to_s)
end
+ # Is this resource modeling an isomorphic resource type?
+ def isomorphic?
+ if builtin?
+ return @ref.builtintype.isomorphic?
+ else
+ return true
+ end
+ end
+
# Merge an override resource in. This will throw exceptions if
# any overrides aren't allowed.
def merge(resource)