Sha256: 5a81c3d4205b42b464ce208e6ec8141078facbd03354651617147fbe8ae0df98

Contents?: true

Size: 1.51 KB

Versions: 19

Compression:

Stored size: 1.51 KB

Contents

module Fog
  module Vcloud
    module Terremark
      module Vcloud

        module Versions
          SUPPORTED = ["v0.8"]
        end

        def self.extended(klass)
          #Do anything we need to do here that's specific to ecloud
          unless @required
            require 'fog/vcloud/terremark/all'
            require 'fog/vcloud/terremark/vcloud/parsers/get_vdc'
            require 'fog/vcloud/terremark/vcloud/requests/get_vdc'
            Struct.new("TmrkVcloudVdc", :links, :resource_entities, :networks, :href, :type, :name, :xmlns)
            @required = true
          end
          if Fog.mocking?
            klass.extend Fog::Vcloud::Terremark::Vcloud::Mock
          else
            klass.extend Fog::Vcloud::Terremark::Vcloud::Real
          end
        end

        private

        # If we don't support any versions the service does, then raise an error.
        # If the @version that super selected isn't in our supported list, then select one that is.
        def check_versions
          super
          unless (supported_version_ids & Versions::SUPPORTED).length > 0
            raise UnsupportedVersion.new("\nService @ #{@versions_uri} supports: #{supported_version_ids.join(', ')}\n" +
                                         "Fog::Vcloud::Terremark::Vcloud supports: #{Versions::SUPPORTED.join(', ')}")
          end
          unless supported_version_ids.include?(@version)
            @version = (supported_version_ids & Versions::SUPPORTED).sort.first
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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