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.
34 35 36 |
# File 'lib/fog/vcloud.rb', line 34 def versions_uri @versions_uri end |
Instance Method Details
#default_organization_uri ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fog/vcloud.rb', line 36 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.
54 55 56 57 |
# File 'lib/fog/vcloud.rb', line 54 def do_login @login_results = login @cookie = @login_results.headers['Set-Cookie'] end |
#ensure_unparsed(uri) ⇒ Object
private
71 72 73 74 75 76 77 |
# File 'lib/fog/vcloud.rb', line 71 def ensure_unparsed(uri) if uri.is_a?(String) uri else uri.to_s end end |
#supported_versions ⇒ Object
59 60 61 |
# File 'lib/fog/vcloud.rb', line 59 def supported_versions @supported_versions ||= get_versions(@versions_uri).body[:VersionInfo] end |
#xmlns ⇒ Object
63 64 65 66 67 |
# File 'lib/fog/vcloud.rb', line 63 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 |