summaryrefslogtreecommitdiffstats
path: root/lib/puppet/indirector.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-18 14:36:38 -0500
committerLuke Kanies <luke@madstop.com>2007-10-18 14:36:38 -0500
commit33d7dc0141328dc9ae042c992404943ebaf78d0d (patch)
tree87be540c80bbaa90fd5a14789278e46188ef0243 /lib/puppet/indirector.rb
parent815618568d88daf373fb057333c962e31a4b748b (diff)
downloadpuppet-33d7dc0141328dc9ae042c992404943ebaf78d0d.tar.gz
puppet-33d7dc0141328dc9ae042c992404943ebaf78d0d.tar.xz
puppet-33d7dc0141328dc9ae042c992404943ebaf78d0d.zip
I'm working on making file serving work in the indirector now, so I
added two abilities to the indirections: Models can specify a module to extend the indirection instance with, and indirections will use a :select_terminus method, if it's available, to select the terminus to use for finding. (It's currently only used for finding, not destroying or saving.) The upshot is that a model can have a module that handles terminus selection for it, and then extend its indirection with that module. This will allow me to use the local terminus when the protocol is 'file' and the REST terminus when the protocol is 'puppet'. It should also open the door for other protocols if they become available.
Diffstat (limited to 'lib/puppet/indirector.rb')
-rw-r--r--lib/puppet/indirector.rb12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/puppet/indirector.rb b/lib/puppet/indirector.rb
index 6009a7ba7..c30c097b2 100644
--- a/lib/puppet/indirector.rb
+++ b/lib/puppet/indirector.rb
@@ -23,17 +23,7 @@ module Puppet::Indirector
# instantiate the actual Terminus for that type and this name (:ldap, w/ args :node)
# & hook the instantiated Terminus into this class (Node: @indirection = terminus)
- @indirection = Puppet::Indirector::Indirection.new(self, indirection)
-
- unless options.empty?
- options.each do |param, value|
- case param
- when :terminus_class: @indirection.terminus_class = value
- else
- raise ArgumenError, "Invalid option '%s' to 'indirects'" % param
- end
- end
- end
+ @indirection = Puppet::Indirector::Indirection.new(self, indirection, options)
@indirection
end