Sha256: b04d96d5f11b58910864e823ea4b86904601a72bfbdb7106d9df60b68bc95137

Contents?: true

Size: 1011 Bytes

Versions: 16

Compression:

Stored size: 1011 Bytes

Contents

# unlike the other client classes (again, this design sucks) this class
# is basically just a proxy class -- it calls its methods on the driver
# and that's about it
class Puppet::Network::Client::ProxyClient < Puppet::Network::Client
    def self.mkmethods
        interface = self.handler.interface
        namespace = interface.prefix


        interface.methods.each { |ary|
            method = ary[0]
            Puppet.debug "%s: defining %s.%s" % [self, namespace, method]
            define_method(method) { |*args|
                begin
                    @driver.send(method, *args)
                rescue XMLRPC::FaultException => detail
                    #Puppet.err "Could not call %s.%s: %s" %
                    #    [namespace, method, detail.faultString]
                    #raise NetworkClientError,
                    #    "XMLRPC Error: %s" % detail.faultString
                    raise NetworkClientError, detail.faultString
                end
            }
        }
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
puppet-0.25.5 lib/puppet/network/client/proxy.rb
puppet-0.25.4 lib/puppet/network/client/proxy.rb
puppet-0.25.3 lib/puppet/network/client/proxy.rb
puppet-0.24.9 lib/puppet/network/client/proxy.rb
puppet-0.25.2 lib/puppet/network/client/proxy.rb
puppet-0.25.1 lib/puppet/network/client/proxy.rb
puppet-0.25.0 lib/puppet/network/client/proxy.rb
puppet-0.24.0 lib/puppet/network/client/proxy.rb
puppet-0.24.1 lib/puppet/network/client/proxy.rb
puppet-0.24.2 lib/puppet/network/client/proxy.rb
puppet-0.24.3 lib/puppet/network/client/proxy.rb
puppet-0.24.4 lib/puppet/network/client/proxy.rb
puppet-0.24.6 lib/puppet/network/client/proxy.rb
puppet-0.24.7 lib/puppet/network/client/proxy.rb
puppet-0.24.5 lib/puppet/network/client/proxy.rb
puppet-0.24.8 lib/puppet/network/client/proxy.rb