Sha256: 2e8ece7d695836d45661e5091571464b13acfe0f4a2732b9206c549669db11ee
Contents?: true
Size: 953 Bytes
Versions: 11
Compression:
Stored size: 953 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(:connection => self)) end end module Real def images(options = {}) Fog::Terremark::Shared::Images.new(options.merge(:connection => self)) end end class Images < Fog::Collection model Fog::Terremark::Shared::Image def all data = connection.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 ||= connection.default_vdc_id end private def vdc_id=(new_vdc_id) @vdc_id = new_vdc_id end end end end end
Version data entries
11 entries across 11 versions & 7 rubygems