@staticmethod
def _wait_for_block_job(domain, disk_path, 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        :returns: True if still in progress\n                  False if completed\n        '
    status = domain.blockJobInfo(disk_path, 0)
    if ((status == (- 1)) and abort_on_error):
        msg = _('libvirt error while requesting blockjob info.')
        raise exception.NovaException(msg)
    try:
        cur = status.get('cur', 0)
        end = status.get('end', 0)
    except Exception:
        return False
    if wait_for_job_clean:
        job_ended = (not status)
    else:
        job_ended = (cur == end)
    return (not job_ended)
Wait for libvirt block job to complete.

Libvirt may return either cur==end or an empty dict when
the job is complete, depending on whether the job has been
cleaned up by libvirt yet, or not.

:returns: True if still in progress
          False if completed
@staticmethod
def _wait_for_block_job(domain, disk_path, 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        :returns: True if still in progress\n                  False if completed\n        '
    status = domain.blockJobInfo(disk_path, 0)
    if ((status == (- 1)) and abort_on_error):
        msg = _('libvirt error while requesting blockjob info.')
        raise exception.NovaException(msg)
    try:
        cur = status.get('cur', 0)
        end = status.get('end', 0)
    except Exception:
        return False
    if wait_for_job_clean:
        job_ended = (not status)
    else:
        job_ended = (cur == end)
    return (not job_ended)