Class: Fog::Compute::XenServer::Network
- Defined in:
- lib/fog/xenserver/models/compute/network.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#pifs ⇒ Object
Return the list of network related PIFs.
- #refresh ⇒ Object
-
#vifs ⇒ Object
Return the list of network related VIFs.
Methods inherited from Model
#initialize, #inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#pifs ⇒ Object
Return the list of network related PIFs
35 36 37 38 39 40 41 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 35 def pifs p = [] __pifs.each do |pif| p << connection.pifs.get(pif) end p end |
#refresh ⇒ Object
26 27 28 29 30 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 26 def refresh data = connection.get_record( reference, 'network' ) merge_attributes( data ) true end |
#vifs ⇒ Object
Return the list of network related VIFs
46 47 48 49 50 51 52 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 46 def vifs v = [] __vifs.each do |vif| v << connection.vifs.get(vif) end v end |