1
# unlike the other client classes (again, this design sucks) this class
2
# is basically just a proxy class -- it calls its methods on the driver
4
class Puppet::Network::Client::ProxyClient < Puppet::Network::Client
6
interface = self.handler.interface
7
namespace = interface.prefix
10
interface.methods.each { |ary|
12
Puppet.debug "#{self}: defining #{namespace}.#{method}"
13
define_method(method) { |*args|
15
@driver.send(method, *args)
16
rescue XMLRPC::FaultException => detail
17
#Puppet.err "Could not call %s.%s: %s" %
18
# [namespace, method, detail.faultString]
19
#raise NetworkClientError,
20
# "XMLRPC Error: #{detail.faultString}"
21
raise NetworkClientError, detail.faultString