Class: ESX::NetworkInterface
- Inherits:
-
Object
- Object
- ESX::NetworkInterface
- Defined in:
- lib/esx.rb
Instance Attribute Summary collapse
-
#_wrapped_object ⇒ Object
Returns the value of attribute _wrapped_object.
Class Method Summary collapse
-
.wrap(obj) ⇒ Object
Accepts VirtualEthernetCard and GuestNicInfo objects.
Instance Method Summary collapse
-
#ip_address ⇒ Object
returns nil if the NetworkInterface is of type VirtualEthernetCard returns the IP address if VMWare tools installed in guest and _wrapped_object is of type GuestNicInfo.
- #mac ⇒ Object
Instance Attribute Details
#_wrapped_object ⇒ Object
Returns the value of attribute _wrapped_object.
562 563 564 |
# File 'lib/esx.rb', line 562 def _wrapped_object @_wrapped_object end |
Class Method Details
.wrap(obj) ⇒ Object
Accepts VirtualEthernetCard and GuestNicInfo objects
565 566 567 568 569 |
# File 'lib/esx.rb', line 565 def self.wrap(obj) ni = NetworkInterface.new ni._wrapped_object = obj ni end |
Instance Method Details
#ip_address ⇒ Object
returns nil if the NetworkInterface is of type VirtualEthernetCard returns the IP address if VMWare tools installed in guest and _wrapped_object is of type GuestNicInfo
574 575 576 577 578 579 580 |
# File 'lib/esx.rb', line 574 def ip_address if _wrapped_object.is_a? RbVmomi::VIM::VirtualEthernetCard nil else _wrapped_object.ipAddress.first end end |
#mac ⇒ Object
582 583 584 |
# File 'lib/esx.rb', line 582 def mac _wrapped_object.macAddress end |