def WaitForCompletion(self):
    """Wait for the completion of all registered jobs.

    """
    while self._HasPendingJobs():
      time.sleep(2)

    with self._lock:
      if self._jobs:
        raise qa_error.Error(
          "Jobs %s didn't finish in success state!" % self._GetJobIds())
dataset/ETHPy150Open ganeti/ganeti/qa/qa_performance.py/_JobQueueDriver.WaitForCompletion/original