Class: RbVmomi::VIM::VirtualMachine
- Inherits:
-
Object
- Object
- RbVmomi::VIM::VirtualMachine
- Defined in:
- lib/rbvmomi/vim/VirtualMachine.rb
Instance Method Summary collapse
-
#macs ⇒ Hash
Retrieve the MAC addresses for all virtual NICs.
Instance Method Details
#macs ⇒ Hash
Retrieve the MAC addresses for all virtual NICs.
4 5 6 |
# 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 |