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.
491 492 493 |
# File 'lib/esx.rb', line 491 def _wrapped_object @_wrapped_object end |
Class Method Details
.wrap(obj) ⇒ Object
Accepts VirtualEthernetCard and GuestNicInfo objects
494 495 496 497 498 |
# File 'lib/esx.rb', line 494 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
503 504 505 506 507 508 509 |
# File 'lib/esx.rb', line 503 def ip_address if _wrapped_object.is_a? RbVmomi::VIM::VirtualEthernetCard nil else _wrapped_object.ipAddress.first end end |
#mac ⇒ Object
511 512 513 |
# File 'lib/esx.rb', line 511 def mac _wrapped_object.macAddress end |