class Puppet::Network::ClientRequest

A struct-like class for passing around a client request. It's mostly just used for validation and authorization.

Attributes

authenticated[RW]
handler[RW]
ip[RW]
method[RW]
name[RW]

Public Class Methods

new(name, ip, authenticated) click to toggle source
   # File lib/puppet/network/client_request.rb
20 def initialize(name, ip, authenticated)
21   @name, @ip, @authenticated = name, ip, authenticated
22 end

Public Instance Methods

authenticated?() click to toggle source
  # File lib/puppet/network/client_request.rb
7 def authenticated?
8   self.authenticated
9 end
call() click to toggle source

A common way of talking about the full call. Individual servers are responsible for setting the values correctly, but this common format makes it possible to check rights.

   # File lib/puppet/network/client_request.rb
14 def call
15   raise ArgumentError, _("Request is not set up; cannot build call") unless handler and method
16 
17   [handler, method].join(".")
18 end
to_s() click to toggle source
   # File lib/puppet/network/client_request.rb
24 def to_s
25   "#{self.name}(#{self.ip})"
26 end