summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/metatype/closure.rb4
-rw-r--r--lib/puppet/node/catalog.rb2
-rw-r--r--lib/puppet/parser/resource.rb9
3 files changed, 14 insertions, 1 deletions
diff --git a/lib/puppet/metatype/closure.rb b/lib/puppet/metatype/closure.rb
index 259854411..673a2359d 100644
--- a/lib/puppet/metatype/closure.rb
+++ b/lib/puppet/metatype/closure.rb
@@ -20,6 +20,10 @@ class Puppet::Type
end
end
+ def isomorphic?
+ self.class.isomorphic?
+ end
+
# is the instance a managed instance? A 'yes' here means that
# the instance was created from the language, vs. being created
# in order resolve other questions, such as finding a package
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb
index d680de9a0..f885a41ee 100644
--- a/lib/puppet/node/catalog.rb
+++ b/lib/puppet/node/catalog.rb
@@ -73,7 +73,7 @@ class Puppet::Node::Catalog < Puppet::PGraph
# If the name and title differ, set up an alias
#self.alias(resource, resource.name) if resource.respond_to?(:name) and resource.respond_to?(:title) and resource.name != resource.title
if resource.respond_to?(:name) and resource.respond_to?(:title) and resource.name != resource.title
- self.alias(resource, resource.name) if resource.class.isomorphic?
+ self.alias(resource, resource.name) if resource.isomorphic?
end
resource.catalog = self if resource.respond_to?(:catalog=) and ! is_relationship_graph
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)