summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-11-29 11:56:40 -0800
committerPaul Berry <paul@puppetlabs.com>2010-11-29 12:08:26 -0800
commit71ecad9904c8c48c023e90e5fbea5b26b180c9cf (patch)
tree7109f1605e4dceca9e48ef58b41bda559ba4901d /lib/puppet/network/handler
parent14f8160674628340ccfd79baeb84f66cf1e0398a (diff)
downloadpuppet-71ecad9904c8c48c023e90e5fbea5b26b180c9cf.tar.gz
puppet-71ecad9904c8c48c023e90e5fbea5b26b180c9cf.tar.xz
puppet-71ecad9904c8c48c023e90e5fbea5b26b180c9cf.zip
Maint: Refactor code to use <class>.indirection.<method>
Replaced uses of the find, search, destroy, and expire methods on model classes with direct calls to the indirection objects. Also removed the old methods that delegated to the indirection object.
Diffstat (limited to 'lib/puppet/network/handler')
-rwxr-xr-xlib/puppet/network/handler/filebucket.rb2
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb2
-rw-r--r--lib/puppet/network/handler/master.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/network/handler/filebucket.rb b/lib/puppet/network/handler/filebucket.rb
index 6aaa2df1c..ee10dbddb 100755
--- a/lib/puppet/network/handler/filebucket.rb
+++ b/lib/puppet/network/handler/filebucket.rb
@@ -33,7 +33,7 @@ class Puppet::Network::Handler # :nodoc:
# Return the contents associated with a given md5 sum.
def getfile(md5, client = nil, clientip = nil)
- bucket = Puppet::FileBucket::File.find("md5:#{md5}")
+ bucket = Puppet::FileBucket::File.indirection.find("md5:#{md5}")
contents = bucket.contents
if client
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index 9abc7ee1a..5b4b17a32 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -236,7 +236,7 @@ class Puppet::Network::Handler
unless hostname = (client || Facter.value("hostname"))
raise ArgumentError, "Could not find hostname"
end
- env = (node = Puppet::Node.find(hostname)) ? node.environment : nil
+ env = (node = Puppet::Node.indirection.find(hostname)) ? node.environment : nil
# And use the environment to look up the module.
(mod = Puppet::Node::Environment.new(env).module(module_name) and mod.files?) ? @mounts[MODULES].copy(mod.name, mod.file_directory) : nil
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb
index c21aafafc..5b9dd332a 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -49,7 +49,7 @@ class Puppet::Network::Handler
# Pass the facts to the fact handler
Puppet::Node::Facts.new(client, facts).save unless local?
- catalog = Puppet::Resource::Catalog.find(client)
+ catalog = Puppet::Resource::Catalog.indirection.find(client)
case format
when "yaml"