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 <[email protected]> Reviewed-on: https://gerrit.ovirt.org/54664 Continuous-Integration: Jenkins CI Reviewed-by: Nir Soffer <[email protected]> --- 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 <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Piotr Kliczewski <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
