Class: Xen::VIF
Class Method Summary collapse
-
.create(vm, network, mac, host) ⇒ Object
Creates a new VIF in a vm.
Methods inherited from Base
#initialize, #record, #to_s, #uuid
Constructor Details
This class inherits a constructor from Xen::Base
Class Method Details
.create(vm, network, mac, host) ⇒ Object
Creates a new VIF in a vm. The mac address is spelled out, with colons in between
10 11 12 13 14 15 16 17 |
# File 'lib/xen/vif.rb', line 10 def self.create(vm, network, mac, host) o = @initial_config.merge({:VM => vm.uuid, :network => network.uuid, :MAC => mac }) uuid = host.get_value("VIF.create", o) self.new(uuid, host) end |