Please review pull request #715: Properly call indirector when storing file content opened by (ccaum)
Description:
Prior to this commit, the static compiler did not specify to use
indirection when finding file content nor when saving a file to the
filebucket. This commit properly calls the indirection method to
resolve the issue
- Opened: Wed Apr 25 22:53:46 UTC 2012
- Based on: puppetlabs:master (df8db7c6b298fc02637f936b8b0609ee8ca2bb0a)
- Requested merge: ccaum:static_compiler_fix (db54b301e9ad9573eaa9fe1d9ce349f67d2c4102)
Diff follows:
diff --git a/lib/puppet/indirector/catalog/static_compiler.rb b/lib/puppet/indirector/catalog/static_compiler.rb
index 1d92121..e3e2e2f 100644
--- a/lib/puppet/indirector/catalog/static_compiler.rb
+++ b/lib/puppet/indirector/catalog/static_compiler.rb
@@ -115,7 +115,7 @@ def remove_existing_resources(children, catalog)
existing_names = catalog.resources.collect { |r| r.to_s }
both = (existing_names & children.keys).inject({}) { |hash, name| hash[name] = true; hash }
-
+
both.each { |name| children.delete(name) }
end
@@ -130,8 +130,8 @@ def store_content(resource)
Puppet.info "Content for '#{resource[:source]}' already exists"
else
Puppet.info "Storing content for source '#{resource[:source]}'"
- content = Puppet::FileServing::Content.find(resource[:source])
- Puppet::FileBucket::File.new(content.content).save
+ content = Puppet::FileServing::Content.indirection.find(resource[:source])
+ Puppet::FileBucket::File.indirection.save(Puppet::FileBucket::File.new(content.content))
end
end
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
