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