Sha256: a62b91b5e9b7086951d58e382941f0be1a1f30a4c7b94142be849f3166897a9c

Contents?: true

Size: 498 Bytes

Versions: 11

Compression:

Stored size: 498 Bytes

Contents

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

module Fog
  module Compute
    class Google

      class Images < Fog::Collection

        model Fog::Compute::Google::Image

        def all
          data = connection.list_images.body["items"]
          load(data)
        end

        def get(identity)
          data = connection.get_image(identity).body
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
gapinc-fog-1.12.1.2.1 lib/fog/google/models/compute/images.rb
fog-1.14.0 lib/fog/google/models/compute/images.rb
fog-1.13.0 lib/fog/google/models/compute/images.rb
gapinc-fog-1.12.1.2 lib/fog/google/models/compute/images.rb
gapinc-fog-1.12.1.1 lib/fog/google/models/compute/images.rb
gapinc-fog-1.12.1a lib/fog/google/models/compute/images.rb
gapinc-fog-1.12.1 lib/fog/google/models/compute/images.rb
fog-1.12.1 lib/fog/google/models/compute/images.rb
fog-1.12.0 lib/fog/google/models/compute/images.rb
fog-1.11.1 lib/fog/google/models/compute/images.rb
fog-1.11.0 lib/fog/google/models/compute/images.rb