Class: Puppet::Network::Handler

Inherits:
Object
  • Object
show all
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

Util::Docs::HEADER_LEVELS

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows

Instance Attribute Summary collapse

Attributes included from Util::Docs

#doc, #nodoc

Attributes included from Util::SubclassLoader

#classloader, #loader

Class Method Summary collapse

Instance Method Summary collapse

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

#localObject

Returns the value of attribute local.



13
14
15
# File 'lib/vendor/puppet/network/handler.rb', line 13

def local
  @local
end

#serverObject

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

.interfaceObject

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

Returns:

  • (Boolean)


45
46
47
# File 'lib/vendor/puppet/network/handler.rb', line 45

def local?
  self.local
end