Class: VCloudSdk::Session
- Inherits:
-
Object
- Object
- VCloudSdk::Session
- Defined in:
- lib/ruby_vcloud_sdk/session.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
readonly
Returns the value of attribute connection.
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#time_limit ⇒ Object
Returns the value of attribute time_limit.
Instance Method Summary collapse
-
#initialize(url, username, password, options) ⇒ Session
constructor
A new instance of Session.
- #org ⇒ Object
Constructor Details
#initialize(url, username, password, options) ⇒ Session
Returns a new instance of Session.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 30 def initialize(url, username, password, ) @time_limit = [:time_limit_sec] || TIME_LIMIT_SEC @retries = [:retries] || RETRIES @delay = [: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 |
Instance Attribute Details
#connection ⇒ Object (readonly)
Returns the value of attribute connection.
3 4 5 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 3 def connection @connection end |
#delay ⇒ Object
Returns the value of attribute delay.
4 5 6 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 4 def delay @delay end |
#retries ⇒ Object
Returns the value of attribute retries.
4 5 6 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 4 def retries @retries end |
#time_limit ⇒ Object
Returns the value of attribute time_limit.
4 5 6 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 4 def time_limit @time_limit end |
Instance Method Details
#org ⇒ Object
41 42 43 |
# File 'lib/ruby_vcloud_sdk/session.rb', line 41 def org @connection.get(@org_link) end |