Dan Kenigsberg has submitted this change and it was merged. Change subject: virt: common handling of exceptions ......................................................................
virt: common handling of exceptions Vm methods should not return responses directly. Rather, they should raise proper exception, and a common layer should translate them in responses. In case of succesfull completion, this code automatically produces a generic success response. Should the method require extra fields, it can return a dictionary with the keys to be added to the success response. Using this way the method could also override the default keys (e.g. the message). This is not clean but it could be needed for backward compatibility. Change-Id: Ic186dc8fa062d8b3789c6057bba68fbbc23f311b Bug-Url: https://bugzilla.redhat.com/1316128 Signed-off-by: Francesco Romani <from...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/54664 Continuous-Integration: Jenkins CI Reviewed-by: Nir Soffer <nsof...@redhat.com> --- M debian/vdsm-python.install M lib/vdsm/virt/Makefile.am A lib/vdsm/virt/api.py M tests/Makefile.am A tests/virt_api_test.py M vdsm.spec.in 6 files changed, 173 insertions(+), 0 deletions(-) Approvals: Nir Soffer: Looks good to me, approved Jenkins CI: Passed CI tests Francesco Romani: Verified -- To view, visit https://gerrit.ovirt.org/54664 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic186dc8fa062d8b3789c6057bba68fbbc23f311b Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Vinzenz Feenstra <vfeen...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches