Sha256: ea11df6ab447e646601acce53b9b2adb84c5d6118634938a2ee63510bc9128ff
Contents?: true
Size: 836 Bytes
Versions: 5
Compression:
Stored size: 836 Bytes
Contents
module Fog module Ovirt class Compute class V4 class Real def storage_domains(filter = {}) filter = filter.dup role_filter = filter.delete(:role) client.system_service.storage_domains_service.list(filter).collect do |sd| # Filter by role is not supported by the search language. The work around is to list all, then filter. role_filter.nil? || sd.type == role_filter ? sd : nil end.compact end end class Mock def storage_domains(_filters = {}) xml = read_xml "storage_domains.xml" Nokogiri::XML(xml).xpath("/storage_domains/storage_domain").map do |sd| OvirtSDK4::Reader.read(sd.to_s) end end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems