| Module | Puppet::Network::XMLRPCProcessor |
| In: |
lib/puppet/network/xmlrpc/processor.rb
|
Most of our subclassing is just so that we can get access to information from the request object, like the client name and IP address.
| ERR_UNAUTHORIZED | = | 30 |
# File lib/puppet/network/xmlrpc/processor.rb, line 20
20: def add_handler(interface, handler)
21: @loadedhandlers << interface.prefix
22: super(interface, handler)
23: end
# File lib/puppet/network/xmlrpc/processor.rb, line 25
25: def handler_loaded?(handler)
26: @loadedhandlers.include?(handler.to_s)
27: end
Convert our data and client request into xmlrpc calls, and verify they‘re authorized and such-like. This method differs from the default in that it expects a ClientRequest object in addition to the data.
# File lib/puppet/network/xmlrpc/processor.rb, line 33
33: def process(data, request)
34: call, params = parser().parseMethodCall(data)
35: params << request.name << request.ip
36: handler, method = call.split(".")
37: request.handler = handler
38: request.method = method
39: begin
40: verify(request)
41: rescue InvalidClientRequest => detail
42: raise ::XMLRPC::FaultException.new(ERR_UNAUTHORIZED, detail.to_s)
43: end
44: handle(request.call, *params)
45: end