Class: Fog::Libvirt::Compute::Nic
- Inherits:
-
Model
- Object
- Model
- Fog::Libvirt::Compute::Nic
- Defined in:
- lib/fog/libvirt/models/compute/nic.rb
Constant Summary collapse
- TYPES =
["network", "bridge", "user"]
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes) ⇒ Nic
constructor
A new instance of Nic.
- #new? ⇒ Boolean
- #save ⇒ Object
Constructor Details
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server.
14 15 16 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 14 def server @server end |
Instance Method Details
#destroy ⇒ Object
33 34 35 36 37 38 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 33 def destroy raise Fog::Errors::Error.new('Destroying an interface is not yet implemented. Contributions welcome!') #requires :server ##detach the nic #service.detach_nic(domain, mac) end |
#new? ⇒ Boolean
18 19 20 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 18 def new? mac.nil? end |
#save ⇒ Object
27 28 29 30 31 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 27 def save raise Fog::Errors::Error.new('Creating a new nic is not yet implemented. Contributions welcome!') #requires :server #service.attach_nic(domain , self) end |