def ip(self):
"""
Poll vcenter to get the virtual machine IP
:return: Return the ip
"""
if self._vm_object:
if not self._vm_object.summary.guest.ipAddress:
timeout_loop(
self.timeout, 'Get IP', 1, False,
lambda: self._vm_object.summary.guest.ipAddress
)
ip = self._vm_object.summary.guest.ipAddress
validate_ip(ip)
return ip
评论列表
文章目录