Sha256: 9f639f0409bc35c363d0a32d775bf72ca8d9ff6ee8625a0be88615bcc93d6cbf

Contents?: true

Size: 634 Bytes

Versions: 7

Compression:

Stored size: 634 Bytes

Contents

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

module Fog
  module Compute
    class Ninefold

      class Images < Fog::Collection

        model Fog::Compute::Ninefold::Image

        def all(offering = 'executable')
          data = connection.list_templates(:templatefilter => offering)
          load(data)
        end

        def get(identifier, offering = 'executable')
          data = connection.list_templates(:templatefilter => offering, :id => identifier)
          if data.empty?
            nil
          else
            new(data[0])
          end
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/images.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/ninefold/images.rb
fog-0.11.0 lib/fog/compute/models/ninefold/images.rb
fog-0.10.0 lib/fog/compute/models/ninefold/images.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/ninefold/images.rb
fog4encbs-0.9.0 lib/fog/compute/models/ninefold/images.rb
fog-0.9.0 lib/fog/compute/models/ninefold/images.rb