summaryrefslogtreecommitdiffstats
path: root/lib/puppet/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-05-22 00:45:08 -0500
committerLuke Kanies <luke@madstop.com>2008-05-22 00:45:08 -0500
commitc370104f7efa6231af05df17ccbb03cbaa2e48ab (patch)
tree66487b58b31bb2fe9a6bd4bf2bbf5e90c9391401 /lib/puppet/node
parentbd51a53b0870ee2355c046af255232ec868d8f1d (diff)
downloadpuppet-c370104f7efa6231af05df17ccbb03cbaa2e48ab.tar.gz
puppet-c370104f7efa6231af05df17ccbb03cbaa2e48ab.tar.xz
puppet-c370104f7efa6231af05df17ccbb03cbaa2e48ab.zip
Fixing the node/catalog so that it can convert from parser catalogs to RAL catalogs.
It largely worked previously, except when aliases were set, which require catalogs. This now converts all parser resources to trans_objects then to RAL resources, and sets the catalog in the meantime. This allows aliases to work just fine when converting directly from parser catalogs to RAL catalogs.
Diffstat (limited to 'lib/puppet/node')
-rw-r--r--lib/puppet/node/catalog.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/node/catalog.rb b/lib/puppet/node/catalog.rb
index ecda472be..c4d697244 100644
--- a/lib/puppet/node/catalog.rb
+++ b/lib/puppet/node/catalog.rb
@@ -483,6 +483,10 @@ class Puppet::Node::Catalog < Puppet::PGraph
if resource.is_a?(Puppet::TransObject)
resource = resource.dup
resource.catalog = result
+ elsif resource.is_a?(Puppet::Parser::Resource)
+ resource = resource.to_transobject
+ p resource
+ resource.catalog = result
end
newres = resource.send(convert)