Sha256: 9515eee44dfe9cef3c875ca872e71d5c344f137b124f07dc1bb301b4396d0a94
Contents?: true
Size: 1.5 KB
Versions: 2
Compression:
Stored size: 1.5 KB
Contents
require 'vagrant/driver/virtualbox_base' require 'vagrant/driver/virtualbox' module Vagrant module Driver class VirtualBox_4_2 < VirtualBoxBase def read_mac_addresses macs = {} info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true) info.split("\n").each do |line| if matcher = /^macaddress(\d+)="(.+?)"$/.match(line) adapter = matcher[1].to_i mac = matcher[2].to_s macs[adapter] = mac end end macs end end class VirtualBox_4_1 < VirtualBoxBase def read_mac_addresses macs = {} info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true) info.split("\n").each do |line| if matcher = /^macaddress(\d+)="(.+?)"$/.match(line) adapter = matcher[1].to_i mac = matcher[2].to_s macs[adapter] = mac end end macs end end class VirtualBox_4_0 < VirtualBoxBase def read_mac_addresses macs = {} info = execute("showvminfo", @uuid, "--machinereadable", :retryable => true) info.split("\n").each do |line| if matcher = /^macaddress(\d+)="(.+?)"$/.match(line) adapter = matcher[1].to_i mac = matcher[2].to_s macs[adapter] = mac end end macs end end class VirtualBox < VirtualBoxBase def_delegator :@driver, :read_mac_addresses end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
realityforge-vagrant-windows-0.1.4 | lib/vagrant-windows/monkey_patches/driver.rb |
vagrant-windows-0.1.2 | lib/vagrant-windows/monkey_patches/driver.rb |