Vinzenz Feenstra has uploaded a new change for review.

Change subject: Migration cancellation replies wrong message format
......................................................................

Migration cancellation replies wrong message format

The message currently returns:

{'status': {'message': 'Migration canceled',
            'code': { 'status': { 'message': 'Migration not in progress',
                      'code': 47}}},
            'progress': 1}

The content of code is wrong. This commit fixes it so the message will
look like this:

{'status': {'message': 'Migration canceled', 'code': 47}, 'progress': 1}

Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb
Bug-Url: https://bugzilla.redhat.com/1015887
Signed-off-by: Vinzenz Feenstra <vfeen...@redhat.com>
---
M vdsm/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/21250/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index fe45d1b..50681c8 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -290,7 +290,7 @@
                 self._finishSuccessfully()
             except libvirt.libvirtError as e:
                 if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
-                    self.status['status']['code'] = errCode['migCancelErr']
+                    self.status = errCode['migCancelErr']
                     self.status['status']['message'] = 'Migration canceled'
                 raise
             finally:


-- 
To view, visit http://gerrit.ovirt.org/21250
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to