Module: Fog::Vcloud::Shared
Instance Attribute Summary collapse
-
#versions_uri ⇒ Object
readonly
Returns the value of attribute versions_uri.
Instance Method Summary collapse
- #default_organization_uri ⇒ Object
-
#do_login ⇒ Object
login handles the auth, but we just need the Set-Cookie header from that call.
-
#ensure_unparsed(uri) ⇒ Object
private.
- #supported_versions ⇒ Object
- #xmlns ⇒ Object
Instance Attribute Details
#versions_uri ⇒ Object (readonly)
Returns the value of attribute versions_uri.
41 42 43 |
# File 'lib/fog/vcloud.rb', line 41 def versions_uri @versions_uri end |
Instance Method Details
#default_organization_uri ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fog/vcloud.rb', line 43 def default_organization_uri @default_organization_uri ||= begin unless @login_results do_login end case @login_results.body[:Org] when Array @login_results.body[:Org].first[:href] when Hash @login_results.body[:Org][:href] else nil end end end |
#do_login ⇒ Object
login handles the auth, but we just need the Set-Cookie header from that call.
61 62 63 64 |
# File 'lib/fog/vcloud.rb', line 61 def do_login @login_results = login @cookie = @login_results.headers['Set-Cookie'] end |
#ensure_unparsed(uri) ⇒ Object
private
78 79 80 81 82 83 84 |
# File 'lib/fog/vcloud.rb', line 78 def ensure_unparsed(uri) if uri.is_a?(String) uri else uri.to_s end end |
#supported_versions ⇒ Object
66 67 68 |
# File 'lib/fog/vcloud.rb', line 66 def supported_versions @supported_versions ||= get_versions(@versions_uri).body[:VersionInfo] end |
#xmlns ⇒ Object
70 71 72 73 74 |
# File 'lib/fog/vcloud.rb', line 70 def xmlns { "xmlns" => "http://www.vmware.com/vcloud/v0.8", "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance", "xmlns:xsd" => "http://www.w3.org/2001/XMLSchema" } end |