Class: Fog::Compute::XenServer::Network
- Inherits:
-
Model
- Object
- Model
- Fog::Compute::XenServer::Network
- Defined in:
- lib/fog/xenserver/models/compute/network.rb
Instance Method Summary collapse
-
#destroy ⇒ Boolean
Destroys a network.
-
#pifs ⇒ Object
Return the list of network related PIFs.
- #refresh ⇒ Object
-
#save ⇒ Boolean
Creates a new network.
-
#vifs ⇒ Object
Return the list of network related VIFs.
Instance Method Details
#destroy ⇒ Boolean
85 86 87 88 89 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 85 def destroy requires :reference service.destroy_network reference true end |
#pifs ⇒ Object
Return the list of network related PIFs
38 39 40 41 42 43 44 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 38 def pifs p = [] __pifs.each do |pif| p << service.pifs.get(pif) end p end |
#refresh ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 26 def refresh Fog::Logger.deprecation( 'This method is deprecated. Use #reload instead.' ) data = service.get_record( reference, 'network' ) merge_attributes( data ) true end |
#save ⇒ Boolean
67 68 69 70 71 72 73 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 67 def save requires :name ref = service.create_network name, attributes data = service.get_record ref, 'network' merge_attributes data true end |
#vifs ⇒ Object
Return the list of network related VIFs
49 50 51 52 53 54 55 |
# File 'lib/fog/xenserver/models/compute/network.rb', line 49 def vifs v = [] __vifs.each do |vif| v << service.vifs.get(vif) end v end |