

def wait_for_job(self, abort_on_error=False, wait_for_job_clean=False):
    'Wait for libvirt block job to complete.\n\n        Libvirt may return either cur==end or an empty dict when\n        the job is complete, depending on whether the job has been\n        cleaned up by libvirt yet, or not.\n\n        :param abort_on_error: Whether to stop process and raise NovaException\n                               on error (default: False)\n        :param wait_for_job_clean: Whether to force wait to ensure job is\n                                   finished (see bug: LP#1119173)\n\n        :returns: True if still in progress\n                  False if completed\n        '
    status = self.get_job_info()
    if ((not status) and abort_on_error):
        msg = _('libvirt error while requesting blockjob info.')
        raise exception.NovaException(msg)
    if wait_for_job_clean:
        job_ended = (status.job == 0)
    else:
        job_ended = (status.cur == status.end)
    return (not self)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/guest.py BlockDevice.wait_for_job/VarMisuse@92/343 `job_ended`->`self`