class RbVmomi::VIM::VirtualMachine

Public Instance Methods

macs() click to toggle source

Retrieve the MAC addresses for all virtual NICs. @return [Hash] Keyed by device label.

# File lib/rbvmomi/vim/VirtualMachine.rb, line 4
def macs
  Hash[self.config.hardware.device.grep(RbVmomi::VIM::VirtualEthernetCard).map { |x| [x.deviceInfo.label, x.macAddress] }]
end