'Wait until instance\'s operating system  is completely booted.
:param server_id: uuid4 id of given instance
:param timeout: timeout in seconds
:param poll_interval: poll interval in seconds'

def wait_for_server_os_boot(self, server_id, timeout=300, poll_interval=1):

    start_time = time.time()
    console = None
    while ((time.time() - start_time) < timeout):
        console = self.nova(('console-log    %s    ' % server_id))
        if (BOOT_IS_COMPLETE in console):
            break
        time.sleep(poll_interval)
    else:
        self.fail(('Server    %s    did    not    boot    after    %d    s.\nConsole:\n%s' % (server_id, timeout, console)))
