Sha256: 5dc94fba294decdc99071bfefcffb8e27e14363f3a7be21971a089f2b211705a

Contents?: true

Size: 1.09 KB

Versions: 14

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module Compute
    class RackspaceV2
      class Real
        
        # Retrieves a list of images
        # @return [Excon::Response] response:
        #   * body [Hash]:
        #     * images [Array]:
        #       * [Hash]:
        #         * id [String] - flavor id
        #         * links [Array] - image links
        #         * name [String] - image name
        # @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
        # @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
        # @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
        # @raise [Fog::Compute::RackspaceV2::ServiceError]
        # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Flavors-d1e4188.html        
        def list_images
          request(
            :expects => [200, 203],
            :method => 'GET',
            :path => 'images'
          )
        end
      end

      class Mock
        def list_images
          images = self.data[:images].values
          response(:body => {"images" => images})
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
gapinc-fog-1.12.1.2.1 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.15.0 lib/fog/rackspace/requests/compute_v2/list_images.rb
gapinc-fog-1.14.0 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.14.0 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.13.0 lib/fog/rackspace/requests/compute_v2/list_images.rb
gapinc-fog-1.12.1.2 lib/fog/rackspace/requests/compute_v2/list_images.rb
gapinc-fog-1.12.1.1 lib/fog/rackspace/requests/compute_v2/list_images.rb
gapinc-fog-1.12.1a lib/fog/rackspace/requests/compute_v2/list_images.rb
gapinc-fog-1.12.1 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.12.1 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.12.0 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.11.1 lib/fog/rackspace/requests/compute_v2/list_images.rb
fog-1.11.0 lib/fog/rackspace/requests/compute_v2/list_images.rb