Sha256: 023357558d4ff89f6d4add6942b8b3f607fae1e4e227aff5f5b3ab42ffe2edf4

Contents?: true

Size: 556 Bytes

Versions: 2

Compression:

Stored size: 556 Bytes

Contents

module Fog
  module Compute
    module Terremark
      class Images < Fog::Collection
        model Fog::Compute::Terremark::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

2 entries across 2 versions & 1 rubygems

Version Path
fog-terremark-0.0.2 lib/fog/compute/terremark/models/images.rb
fog-terremark-0.0.1 lib/fog/compute/terremark/models/images.rb