Method: XenApi::Client#initialize

Defined in:
lib/xenapi/client.rb

#initialize(uri, timeout = 10) ⇒ Client

Returns a new instance of Client.

Parameters:

  • uri (String)

    URL to the Xen API endpoint

  • timeout (Integer) (defaults to: 10)

    Maximum number of seconds to wait for an API response



98
99
100
101
102
# File 'lib/xenapi/client.rb', line 98

def initialize(uri, timeout = 10)
  @timeout = timeout
  @uri = URI.parse(uri)
  @uri.path = '/' if @uri.path == ''
end