Class: Puppet::Network::Handler
- Extended by:
- Util, Util::Docs, Util::SubclassLoader
- Defined in:
- lib/vendor/puppet/network/handler.rb,
lib/vendor/puppet/network/handler/ca.rb,
lib/vendor/puppet/network/handler/master.rb,
lib/vendor/puppet/network/handler/report.rb,
lib/vendor/puppet/network/handler/runner.rb,
lib/vendor/puppet/network/handler/status.rb,
lib/vendor/puppet/network/handler/filebucket.rb,
lib/vendor/puppet/network/handler/fileserver.rb
Overview
:nodoc:
Defined Under Namespace
Classes: CA, FileBucket, FileServer, FileServerError, Master, MasterError, MissingMasterError, Report, Runner, Status
Constant Summary collapse
- Handler =
This is so that the handlers can subclass just ‘Handler’, rather then having to specify the full class path.
self
- AuthStoreError =
Puppet::AuthStoreError
Constants included from Util::Docs
Constants included from Util
Util::AbsolutePathPosix, Util::AbsolutePathWindows
Instance Attribute Summary collapse
-
#local ⇒ Object
Returns the value of attribute local.
-
#server ⇒ Object
Returns the value of attribute server.
Attributes included from Util::Docs
Attributes included from Util::SubclassLoader
Class Method Summary collapse
-
.interface ⇒ Object
Return the xmlrpc interface.
-
.side(side = nil) ⇒ Object
Set/Determine whether we’re a client- or server-side handler.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Handler
constructor
Create an empty init method with the same signature.
- #local? ⇒ Boolean
Methods included from Util::Docs
desc, dochook, doctable, markdown_definitionlist, markdown_header, nodoc?, pad, scrub
Methods included from Util::SubclassLoader
each, handle_subclasses, inherited, method_missing, name, subclasses
Methods included from Util
absolute_path?, activerecord_version, benchmark, binread, chuser, classproxy, execfail, execpipe, execute, execute_posix, execute_windows, logmethods, memory, path_to_uri, proxy, replace_file, safe_posix_fork, symbolize, symbolizehash, symbolizehash!, synchronize_on, thinmark, threadlock, uri_to_path, wait_for_output, which, withumask
Methods included from Util::POSIX
#get_posix_field, #gid, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid
Constructor Details
#initialize(hash = {}) ⇒ Handler
Create an empty init method with the same signature.
42 43 |
# File 'lib/vendor/puppet/network/handler.rb', line 42 def initialize(hash = {}) end |
Instance Attribute Details
#local ⇒ Object
Returns the value of attribute local.
13 14 15 |
# File 'lib/vendor/puppet/network/handler.rb', line 13 def local @local end |
#server ⇒ Object
Returns the value of attribute server.
13 14 15 |
# File 'lib/vendor/puppet/network/handler.rb', line 13 def server @server end |
Class Method Details
.interface ⇒ Object
Return the xmlrpc interface.
21 22 23 24 25 26 27 |
# File 'lib/vendor/puppet/network/handler.rb', line 21 def self.interface if defined?(@interface) return @interface else raise Puppet::DevError, "Handler #{self} has no defined interface" end end |
.side(side = nil) ⇒ Object
Set/Determine whether we’re a client- or server-side handler.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/vendor/puppet/network/handler.rb', line 30 def self.side(side = nil) if side side = side.intern if side.is_a?(String) raise ArgumentError, "Invalid side registration '#{side}' for #{self.name}" unless [:client, :server].include?(side) @side = side else @side ||= :server return @side end end |
Instance Method Details
#local? ⇒ Boolean
45 46 47 |
# File 'lib/vendor/puppet/network/handler.rb', line 45 def local? self.local end |