summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-30 12:06:52 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-30 14:39:39 -0800
commit0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af (patch)
tree2d7273c61a3aa21d4e475f63952450a0376a6b86 /lib/puppet/network/handler
parentf77764de3ace7cc880a77466618a5affe1b61a8e (diff)
downloadpuppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.gz
puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.tar.xz
puppet-0747b58bfef9c6bb5f1f9ac1eb6a7b3955dac2af.zip
Maint: Modified uses of indirector.save to call the indirection directly.
This change replaces calls to <model object>.save with calls to <model class>.indirection.save(<model object>). This makes the use of the indirector explicit rather than implicit so that it will be easier to search for all indirector call sites using grep. This is an intermediate refactor on the way towards allowing indirector calls to be explicitly routed to multiple termini. This patch affects production code.
Diffstat (limited to 'lib/puppet/network/handler')
-rwxr-xr-xlib/puppet/network/handler/filebucket.rb2
-rw-r--r--lib/puppet/network/handler/master.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/network/handler/filebucket.rb b/lib/puppet/network/handler/filebucket.rb
index ee10dbddb..55028ee64 100755
--- a/lib/puppet/network/handler/filebucket.rb
+++ b/lib/puppet/network/handler/filebucket.rb
@@ -28,7 +28,7 @@ class Puppet::Network::Handler # :nodoc:
def addfile(contents, path, client = nil, clientip = nil)
contents = Base64.decode64(contents) if client
bucket = Puppet::FileBucket::File.new(contents)
- bucket.save
+ Puppet::FileBucket::File.indirection.save(bucket)
end
# Return the contents associated with a given md5 sum.
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb
index 5b9dd332a..62aab539e 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -47,7 +47,7 @@ class Puppet::Network::Handler
client ||= facts["hostname"]
# Pass the facts to the fact handler
- Puppet::Node::Facts.new(client, facts).save unless local?
+ Puppet::Node::Facts.indirection.save(Puppet::Node::Facts.new(client, facts)) unless local?
catalog = Puppet::Resource::Catalog.indirection.find(client)