# File lib/fog/libvirt/models/compute/pools.rb, line 12 def all(filter=nil) data=[] if filter.nil? connection.raw.list_storage_pools.each do |poolname| pool=connection.raw.lookup_storage_pool_by_name(poolname) data << { :raw => pool } end connection.raw.list_defined_storage_pools.each do |poolname| data << { :raw => connection.raw.lookup_storage_pool_by_name(poolname) } end else pool=nil begin pool=get_by_uuid(filter[:uuid]) if filter.has_key?(:uuid) pool=get_by_name(filter[:name]) if filter.has_key?(:name) rescue ::Libvirt::RetrieveError return nil end data << { :raw => pool} end load(data) end
# File lib/fog/libvirt/models/compute/pools.rb, line 38 def get(uuid) self.all(:uuid => uuid).first end
Generated with the Darkfish Rdoc Generator 2.