Module: Puppet::Indirector
- Included in:
- FileBucket::File, FileServing::Content, FileServing::Metadata, Node, Node::Facts, Resource, Resource::Catalog, Resource::Type, Run, SSL::Certificate, SSL::CertificateRequest, SSL::CertificateRevocationList, SSL::Key, Status, Transaction::Report
- Defined in:
- lib/puppet/indirector.rb
Overview
Manage indirections to termini. They are organized in terms of indirections -
-
e.g., configuration, node, file, certificate – and each indirection has one
or more terminus types defined. The indirection is configured via the indirects method, which will be called by the class extending itself with this module.
Defined Under Namespace
Modules: ClassMethods, Envelope, InstanceMethods Classes: ActiveRecord, Code, Couch, DirectFileServer, Exec, File, FileContent, FileMetadata, FileServer, Indirection, Ldap, Memory, Plain, Queue, REST, Request, ResourceType, SslFile, Status, Terminus, Yaml
Instance Method Summary collapse
-
#indirects(indirection, options = {}) ⇒ Object
Declare that the including class indirects its methods to this terminus.
Instance Method Details
#indirects(indirection, options = {}) ⇒ Object
Declare that the including class indirects its methods to this terminus. The terminus name must be the name of a Puppet default, not the value – if it’s the value, then it gets evaluated at parse time, which is before the user has had a chance to override it.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/puppet/indirector.rb', line 20 def indirects(indirection, = {}) raise(ArgumentError, "Already handling indirection for #{@indirection.name}; cannot also handle #{indirection}") if @indirection # populate this class with the various new methods extend ClassMethods include InstanceMethods include Puppet::Indirector::Envelope extend Puppet::Network::FormatHandler # 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, ) end |