Francesco Romani has uploaded a new change for review. Change subject: migration: return a copy of the internal status ......................................................................
migration: return a copy of the internal status migration.SourceThread.getStat() used to return a reference of its internal state. This has no obvious benefits, and raises concerns about the safety of this operation. This patch makes the method always return a copy of the state, for the sake of safety. Change-Id: I690b16c8880e044020af50620a630ecf6bf3f44d Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/migration.py 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/40525/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index 6702608..7520abb 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -109,7 +109,17 @@ Get the status of the migration. """ self.update() - return self._status + + status = { + 'code': self._status['code'], + 'message': self._status['message'] + } + + return { + 'status': status, + 'progress': self._status['progress'], + 'downtime': self._status['downtime'] + } def _setupVdsConnection(self): if self.hibernating: -- To view, visit https://gerrit.ovirt.org/40525 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I690b16c8880e044020af50620a630ecf6bf3f44d 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