class VCloudSdk::Session

Constants

DELAY
RETRIES
TIME_LIMIT_SEC

Attributes

connection[R]
delay[RW]
retries[RW]
time_limit[RW]

Public Class Methods

new(url, username, password, options) click to toggle source
# File lib/ruby_vcloud_sdk/session.rb, line 30
def initialize(url, username, password, options)
  @time_limit = options[:time_limit_sec] || TIME_LIMIT_SEC
  @retries = options[:retries] || RETRIES
  @delay = options[:delay] || DELAY
  @connection = Connection::Connection.new(
    url,
    @time_limit[:http_request])
  @session_xml_obj = @connection.connect(username, password)
  @org_link = @session_xml_obj.organization
end

Public Instance Methods

org() click to toggle source
# File lib/ruby_vcloud_sdk/session.rb, line 41
def org
  @connection.get(@org_link)
end