Sha256: 1db543a6279d245b07ebc7fe7e5b583d0d34f79e48acd0444d2c0a50dd036f0a

Contents?: true

Size: 476 Bytes

Versions: 29

Compression:

Stored size: 476 Bytes

Contents

require 'fog/core/collection'
require 'fog/slicehost/models/compute/image'

module Fog
  module Slicehost
    class Compute

      class Images < Fog::Collection

        model Fog::Slicehost::Compute::Image

        def all
          data = connection.get_images.body['images']
          load(data)
        end

        def get(image_id)
          connection.get_image(image_id)
        rescue Excon::Errors::Forbidden
          nil
        end

      end

    end
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
fog-0.4.0 lib/fog/slicehost/models/compute/images.rb
fog-0.3.34 lib/fog/slicehost/models/compute/images.rb
fog-0.3.33 lib/fog/slicehost/models/compute/images.rb
fog-0.3.32 lib/fog/slicehost/models/compute/images.rb
fog-0.3.31 lib/fog/slicehost/models/compute/images.rb
fog-0.3.30 lib/fog/slicehost/models/compute/images.rb
fog-0.3.29 lib/fog/slicehost/models/compute/images.rb
fog-0.3.28 lib/fog/slicehost/models/compute/images.rb
fog-0.3.27 lib/fog/slicehost/models/compute/images.rb
fog-0.3.26 lib/fog/slicehost/models/compute/images.rb
fog-0.3.25 lib/fog/slicehost/models/compute/images.rb
fog-0.3.24 lib/fog/slicehost/models/compute/images.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/slicehost/models/compute/images.rb
fog-0.3.23 lib/fog/slicehost/models/compute/images.rb
fog-0.3.22 lib/fog/slicehost/models/compute/images.rb
fog-0.3.21 lib/fog/slicehost/models/compute/images.rb
fog-0.3.20 lib/fog/slicehost/models/compute/images.rb
fog-0.3.19 lib/fog/slicehost/models/compute/images.rb
fog-0.3.18 lib/fog/slicehost/models/compute/images.rb
fog-0.3.17 lib/fog/slicehost/models/compute/images.rb