Class: VagrantPlugins::ProviderLibvirt::Cap::NicMacAddresses
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderLibvirt::Cap::NicMacAddresses
- Defined in:
- lib/vagrant-libvirt/cap/nic_mac_addresses.rb
Class Method Summary collapse
Class Method Details
.nic_mac_addresses(machine) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/vagrant-libvirt/cap/nic_mac_addresses.rb', line 7 def self.nic_mac_addresses(machine) # Vagrant expects a Hash with an index starting at 1 as key # and the mac as uppercase string without colons as value nic_macs = {} machine.provider.mac_addresses.each do |index, mac| nic_macs[index + 1] = mac.upcase.delete(':') end nic_macs end |