Class: Xen::SR
Class Method Summary collapse
-
.get_local(host) ⇒ Object
Searches the host for the first storage resource with the type set to ‘local’.
Methods inherited from Base
#initialize, #record, #to_s, #uuid
Constructor Details
This class inherits a constructor from Xen::Base
Class Method Details
.get_local(host) ⇒ Object
Searches the host for the first storage resource with the type set to ‘local’
5 6 7 8 9 10 |
# File 'lib/xen/sr.rb', line 5 def self.get_local(host) host.get_value("SR.get_all").each do |sruid| return self.new(sruid, host) if host.get_value("SR.get_type", sruid) == 'local' end nil end |