Sha256: d188375cf099891ac39eba8dd4755136856b3a0c4453c9f0d68f47a3bd0ba9a1

Contents?: true

Size: 875 Bytes

Versions: 16

Compression:

Stored size: 875 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 "#{self}: defining #{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: #{detail.faultString}"
          raise NetworkClientError, detail.faultString
        end
      }
    }
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
puppet-2.7.5 lib/puppet/network/client/proxy.rb
puppet-2.6.11 lib/puppet/network/client/proxy.rb
puppet-2.7.4 lib/puppet/network/client/proxy.rb
puppet-2.6.10 lib/puppet/network/client/proxy.rb
puppet-2.7.3 lib/puppet/network/client/proxy.rb
puppet-2.7.1 lib/puppet/network/client/proxy.rb
puppet-2.6.9 lib/puppet/network/client/proxy.rb
puppet-2.6.8 lib/puppet/network/client/proxy.rb
puppet-2.6.7 lib/puppet/network/client/proxy.rb
puppet-2.6.6 lib/puppet/network/client/proxy.rb
puppet-2.6.5 lib/puppet/network/client/proxy.rb
puppet-2.6.4 lib/puppet/network/client/proxy.rb
puppet-2.6.3 lib/puppet/network/client/proxy.rb
puppet-2.6.2 lib/puppet/network/client/proxy.rb
puppet-2.6.1 lib/puppet/network/client/proxy.rb
puppet-2.6.0 lib/puppet/network/client/proxy.rb