'Wait until the remote host is up or the timeout expires.
In fact, it will wait until an ssh connection to the remote
host can be established, and getty is running.
:param timeout time limit in seconds before returning even
if the host is not up.
:return: True if the host was found to be up, False otherwise'

def wait_up(self, timeout=None):

    if timeout:
        end_time = (time.time() + timeout)
    while ((not timeout) or (time.time() < end_time)):
        if self.is_up():
            try:
                if self.are_wait_up_processes_up():
                    logging.debug('Host    %s    is    now    up', self.hostname)
                    return True
            except error.AutoservError:
                pass
        time.sleep(1)
    logging.debug('Host    %s    is    still    down    after    waiting    %d    seconds', self.hostname, int(((timeout + time.time()) - end_time)))
    return False
