Class: Fog::Compute::Libvirt::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.
Attributes inherited from Model
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes) ⇒ Nic
constructor
A new instance of Nic.
- #new? ⇒ Boolean
- #save ⇒ Object
Methods inherited from Model
#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
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server.
15 16 17 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 15 def server @server end |
Instance Method Details
#destroy ⇒ Object
34 35 36 37 38 39 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 34 def destroy raise Fog::Errors::Error.new('Destroying an interface is not yet implemented. Contributions welcome!') #requires :server ##detach the nic #connection.detach_nic(domain, mac) end |
#new? ⇒ Boolean
19 20 21 |
# File 'lib/fog/libvirt/models/compute/nic.rb', line 19 def new? mac.nil? end |