summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/resource.rb')
-rw-r--r--lib/puppet/resource.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 39803b077..7dea270e8 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -154,6 +154,14 @@ class Puppet::Resource
end
end
+ # This stub class is only needed for serialization compatibility with 0.25.x
+ class Reference
+ attr_accessor :type,:title
+ def initialize(type,title)
+ @type,@title = type,title
+ end
+ end
+
# Create our resource.
def initialize(type, title = nil, attributes = {})
@parameters = {}
@@ -180,6 +188,8 @@ class Puppet::Resource
tag(self.type)
tag(self.title) if valid_tag?(self.title)
+ @reference = Reference.new(@type,@title) # for serialization compatibility with 0.25.x
+
raise ArgumentError, "Invalid resource type #{type}" if strict? and ! resource_type
end