diff options
| author | Luke Kanies <luke@madstop.com> | 2008-04-08 18:21:18 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-04-08 18:21:18 -0500 |
| commit | bf728d23caca4f58ae4ede1a2d477c9fc15e0bdc (patch) | |
| tree | d79ae6e23667f0a1b201537914a025c9f677aa74 /lib/puppet/indirector/file_metadata | |
| parent | 644d6baae132a097170631f90521e878e31a5a0a (diff) | |
| download | puppet-bf728d23caca4f58ae4ede1a2d477c9fc15e0bdc.tar.gz puppet-bf728d23caca4f58ae4ede1a2d477c9fc15e0bdc.tar.xz puppet-bf728d23caca4f58ae4ede1a2d477c9fc15e0bdc.zip | |
Intermediate commit.
This commit adds a Request instance into the indirection,
pushing it all the way to the terminus instances. It's
a big commit because it requires modifying every terminus class.
There are still some thorny design issues. In particular, who
should be responsible for making the request object? I've tried
having both the indirection class and the Indirector module creating
it, and both have their issues.
Also, the Catalog class previously allowed passing Node instances
directly to the find method, which is now no longer possible because
the Request class would treat the node as the instance being found.
We need the request class to have two modes, one when it's passed an
instance and one when it's passed a key.
Diffstat (limited to 'lib/puppet/indirector/file_metadata')
| -rw-r--r-- | lib/puppet/indirector/file_metadata/file.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/indirector/file_metadata/file.rb b/lib/puppet/indirector/file_metadata/file.rb index b36846bbe..c46015c38 100644 --- a/lib/puppet/indirector/file_metadata/file.rb +++ b/lib/puppet/indirector/file_metadata/file.rb @@ -9,14 +9,14 @@ require 'puppet/indirector/direct_file_server' class Puppet::Indirector::FileMetadata::File < Puppet::Indirector::DirectFileServer desc "Retrieve file metadata directly from the local filesystem." - def find(key, options = {}) + def find(request) return unless data = super data.collect_attributes return data end - def search(key, options = {}) + def search(request) return unless result = super result.each { |instance| instance.collect_attributes } |
