Sha256: de35f002a9e0578ccb3d2462d7eefab280a9165eac730f3a1967af7feb8a254f

Contents?: true

Size: 1.09 KB

Versions: 16

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module Parsers
    module Vcloud

      class GetVersions < Fog::Parsers::Base
        #
        # Based off of:
        # http://support.theenterprisecloud.com/kb/default.asp?id=535&Lang=1&SID=
        # https://community.vcloudexpress.terremark.com/en-us/product_docs/w/wiki/02-get-versions.aspx
        # vCloud API Guide v0.9 - Page 89
        #

        def reset
          @response = []
          @supported = false
        end

        def start_element(name, attributes = {})
          @value = ''
          case name
          when "Version"
            @version = Struct::VcloudVersion.new
          when "SupportedVersions"
            @supported = true
          end
        end

        def end_element(name)
          case name
          when "Version"
            @version.version = @value
            @version.supported = @supported
          when "LoginUrl"
            @version.login_url = @value
          when "VersionInfo"
            @response << @version
          when "SupportedVersions"
            @supported = false
          end
        end

      end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fog-0.1.8 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.7 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.6 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.5 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.4 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.3 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.2 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.1 lib/fog/vcloud/parsers/get_versions.rb
fog-0.1.0 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.100 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.99 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.98 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.97 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.96 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.95 lib/fog/vcloud/parsers/get_versions.rb
fog-0.0.94 lib/fog/vcloud/parsers/get_versions.rb