Sha256: 3582a2382f5b92db060ef8aee4f8d95d14143e4afe2ee5e0a00d1e0882eab77f

Contents?: true

Size: 900 Bytes

Versions: 1

Compression:

Stored size: 900 Bytes

Contents

module Fog
  module Terremark
    class Real

      # Get list of organizations
      #
      # ==== Returns
      # * response<~Excon::Response>:
      #   * body<~Array>:
      #     * 'description'<~String> - Description of organization
      #     * 'links'<~Array> - An array of links to entities in the organization
      #     * 'name'<~String> - Name of organization
      def get_organizations
        request({
          :expects  => 200,
          :headers  => {
            'Authorization' => "Basic #{Base64.encode64("#{@terremark_username}:#{@terremark_password}").chomp!}"
          },
          :method   => 'POST',
          :parser   => Fog::Parsers::Terremark::GetOrganizations.new,
          :path     => 'login'
        })
      end

    end

    class Mock

      def get_organizations
        raise MockNotImplemented.new("Contributions welcome!")
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-0.0.73 lib/fog/terremark/requests/get_organizations.rb