Sha256: 418c589ef906d63444b771570bd589f9ca9e9b13a3694ff11b7e681f282195cf

Contents?: true

Size: 488 Bytes

Versions: 17

Compression:

Stored size: 488 Bytes

Contents

module VagrantPlugins
  module ProviderLibvirt
    module Cap
      class NicMacAddresses
        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
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
vagrant-libvirt-0.5.3 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.5.2 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.5.1 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.5.0 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.4.1 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.4.0 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.3.0 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.2.1 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.1.2 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.1.0 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.45 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.43 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.42 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.40 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.39 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.38 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.37 lib/vagrant-libvirt/cap/nic_mac_addresses.rb