Sha256: 58d5aec03813ca247699f019bcb72b528efa44f50299934d647d352b171cedc8

Contents?: true

Size: 527 Bytes

Versions: 43

Compression:

Stored size: 527 Bytes

Contents

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

module Fog
  module Compute
    class Clodo
      class Images < Fog::Collection
        model Fog::Compute::Clodo::Image

        def all
          data = service.list_images_detail.body['images']
          load(data)
        end

        def get(image_id)
          image = service.get_image_details(image_id).body['image']
          new(image) if image
        rescue Fog::Compute::Clodo::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
ns-fog-1.22.3 lib/fog/clodo/models/compute/images.rb
ns-fog-1.22.2 lib/fog/clodo/models/compute/images.rb
fog-1.22.1 lib/fog/clodo/models/compute/images.rb