# File lib/fog/libvirt/models/compute/nic.rb, line 23 def initialize attributes super defaults.merge(attributes) raise Fog::Errors::Error.new("#{type} is not a supported nic type") if new? && !TYPES.include?(type) end
# 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
# File lib/fog/libvirt/models/compute/nic.rb, line 19 def new? mac.nil? end
# File lib/fog/libvirt/models/compute/nic.rb, line 28 def save raise Fog::Errors::Error.new('Creating a new nic is not yet implemented. Contributions welcome!') #requires :server #connection.attach_nic(domain , self) end