Sha256: 6cfd4282f80f3933600b9edb225a549a0b9398f919e947dbc0631dd236c84d37

Contents?: true

Size: 849 Bytes

Versions: 7

Compression:

Stored size: 849 Bytes

Contents

module Fog
  module TerremarkEcloud
    class Compute
      class Real

        require 'fog/compute/parsers/terremark_ecloud/get_versions'

        def get_versions
          connection = Fog::Connection.new(@versions_endpoint)
          response = connection.request({
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::Parsers::TerremarkEcloud::Compute::GetVersions.new
          });
          version_info = response.body['SupportedVersions'].detect {|version_info| version_info['Version'] == @version}
          unless login_url = version_info && version_info['LoginUrl']
            raise "TerremarkEcloud does not support version #{@version}"
          end
        end

      end

      class Mock

        def get_versions
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
fog-0.5.0 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
phpfog-fog-0.4.1.3 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
phpfog-fog-0.4.1.2 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
phpfog-fog-0.4.1.1 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
phpfog-fog-0.4.1 lib/fog/compute/requests/terremark_ecloud/get_versions.rb
fog-0.4.1 lib/fog/compute/requests/terremark_ecloud/get_versions.rb