Francesco Romani has uploaded a new change for review. Change subject: migration: add 'ongoing' property to Progress ......................................................................
migration: add 'ongoing' property to Progress Add the 'ongoing' property to report in a clearer way if the migration.Progress is actually ongoing or not. Previously, the client code had to check for the underlying libvirt job type, which works but it is less expressive. Change-Id: I275aef473f87fc69c38c0a80e15c328e128993c7 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/migration.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/56314/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index fc42a20..7a3eb31 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -614,7 +614,7 @@ if self._stop.isSet(): break - if prog.job_type != libvirt.VIR_DOMAIN_JOB_NONE: + if prog.ongoing: self.progress = prog.percentage self._vm.log.info('%s', prog) @@ -684,6 +684,10 @@ stats.get('memory_iteration', -1), ) + @property + def ongoing(self): + return self.job_type != libvirt.VIR_DOMAIN_JOB_NONE + def __str__(self): return ( 'Migration Progress: %s seconds elapsed,' -- To view, visit https://gerrit.ovirt.org/56314 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I275aef473f87fc69c38c0a80e15c328e128993c7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches