summaryrefslogtreecommitdiffstats
path: root/lib/puppet/resource
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-12-11 08:24:43 -0600
committerLuke Kanies <luke@madstop.com>2008-12-18 11:10:22 -0600
commit60062e4b9ae479ddbf97f4fc3495d04bc00196d5 (patch)
tree4eee797b0c2f883c1daeb383a07ca87749cd7d11 /lib/puppet/resource
parent6b14000ae54a11da3fa16c1b4685f630abca869b (diff)
downloadpuppet-60062e4b9ae479ddbf97f4fc3495d04bc00196d5.tar.gz
puppet-60062e4b9ae479ddbf97f4fc3495d04bc00196d5.tar.xz
puppet-60062e4b9ae479ddbf97f4fc3495d04bc00196d5.zip
Renaming the "Catalog#to_type" method to "Catalog#to_ral"
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/resource')
-rw-r--r--lib/puppet/resource/catalog.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index 5b1022799..56534b6be 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -385,7 +385,7 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
# Convert our catalog into a RAL catalog.
def to_ral
- to_catalog :to_type
+ to_catalog :to_ral
end
# Turn our parser catalog into a transportable catalog.
@@ -463,11 +463,14 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
#Aliases aren't working in the ral catalog because the current instance of the resource
#has a reference to the catalog being converted. . . So, give it a reference to the new one
#problem solved. . .
- if resource.is_a?(Puppet::TransObject)
+ if resource.is_a?(Puppet::Resource)
+ resource = resource.dup
+ resource.catalog = result
+ elsif resource.is_a?(Puppet::TransObject)
resource = resource.dup
resource.catalog = result
elsif resource.is_a?(Puppet::Parser::Resource)
- resource = resource.to_transobject
+ resource = resource.to_resource
resource.catalog = result
end