Sha256: 10b5a545cb4bd8d3751791c985fdb3669d8cf6914f68c2782ad63d851f078eb2

Contents?: true

Size: 940 Bytes

Versions: 65

Compression:

Stored size: 940 Bytes

Contents

require 'fog/core/collection'
require 'fog/terremark/models/shared/image'

module Fog
  module Terremark
    module Shared


      module Mock
        def images(options = {})
          Fog::Terremark::Shared::Images.new(options.merge(:service => self))
        end
      end

      module Real
        def images(options = {})
          Fog::Terremark::Shared::Images.new(options.merge(:service => self))
        end
      end

      class Images < Fog::Collection


        model Fog::Terremark::Shared::Image

        def all
          data = service.get_catalog(vdc_id).body['CatalogItems'].select do |entity|
            entity['type'] == "application/vnd.vmware.vcloud.catalogItem+xml"
          end
          load(data)
        end


        def vdc_id
          @vdc_id ||= service.default_vdc_id
        end

        private

        def vdc_id=(new_vdc_id)
          @vdc_id = new_vdc_id
        end

      end

    end
  end
end

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-maestrodev-1.15.0.20130927082724 lib/fog/terremark/models/shared/images.rb
fog-maestrodev-1.15.0.20130829165835 lib/fog/terremark/models/shared/images.rb
fog-1.15.0 lib/fog/terremark/models/shared/images.rb
gapinc-fog-1.14.0 lib/fog/terremark/models/shared/images.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/terremark/models/shared/images.rb
fog-1.14.0 lib/fog/terremark/models/shared/images.rb
fog-1.13.0 lib/fog/terremark/models/shared/images.rb
gapinc-fog-1.12.1.2 lib/fog/terremark/models/shared/images.rb
gapinc-fog-1.12.1.1 lib/fog/terremark/models/shared/images.rb
gapinc-fog-1.12.1a lib/fog/terremark/models/shared/images.rb
gapinc-fog-1.12.1 lib/fog/terremark/models/shared/images.rb
fog-1.12.1 lib/fog/terremark/models/shared/images.rb
fog-1.12.0 lib/fog/terremark/models/shared/images.rb
hpfog-0.0.20 lib/fog/terremark/models/shared/images.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/terremark/models/shared/images.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/terremark/models/shared/images.rb
fog-1.11.1 lib/fog/terremark/models/shared/images.rb
fog-1.11.0 lib/fog/terremark/models/shared/images.rb
fog-1.10.1 lib/fog/terremark/models/shared/images.rb
fog-test-me-1.10.0 lib/fog/terremark/models/shared/images.rb