Class: Xen::Network
Class Method Summary collapse
-
.find_by_name(name, host) ⇒ Object
Searches the networks for a certain name.
Methods inherited from Base
#initialize, #record, #to_s, #uuid
Constructor Details
This class inherits a constructor from Xen::Base
Class Method Details
.find_by_name(name, host) ⇒ Object
Searches the networks for a certain name
5 6 7 8 9 10 |
# File 'lib/xen/network.rb', line 5 def self.find_by_name(name, host) host.get_value("network.get_all").collect do |networkuid| return self.new(networkuid, host) if host.get_value("network.get_name_label", networkuid) == name end nil end |