# File lib/cloudservers/connection.rb, line 38
    def initialize(options = {:retry_auth => true}) 
      @authuser = options[:username] || (raise Exception::Authentication, "Must supply a :username")
      @authkey = options[:api_key] || (raise Exception::Authentication, "Must supply an :api_key")
      @auth_url = options[:auth_url] || @auth_url = CloudServers::AUTH_USA

      auth_uri=nil
      begin
        auth_uri=URI.parse(@auth_url)
      rescue Exception => e
        raise Exception::InvalidArgument, "Invalid :auth_url parameter: #{e.message}"
      end
      raise Exception::InvalidArgument, "Invalid :auth_url parameter." if auth_uri.nil? or auth_uri.host.nil?
      @auth_host = auth_uri.host
      @auth_port = auth_uri.port
      @auth_scheme = auth_uri.scheme

      @retry_auth = options[:retry_auth]
      @proxy_host = options[:proxy_host]
      @proxy_port = options[:proxy_port]
      @authok = false
      @http = {}
      CloudServers::Authentication.new(self)
    end