Sha256: dfdc129e95ba06d46ea4573b4529565c9482212ab113e5d969bbc5de57983835

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 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.gsub(':','')
          end
          nic_macs
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.36 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.35 lib/vagrant-libvirt/cap/nic_mac_addresses.rb
vagrant-libvirt-0.0.33 lib/vagrant-libvirt/cap/nic_mac_addresses.rb