Change in vdsm[master]: RPC: Refactor JSON RPC exceptions
From Dan Kenigsberg: Dan Kenigsberg has submitted this change and it was merged. ( https://gerrit.ovirt.org/78660 ) Change subject: RPC: Refactor JSON RPC exceptions .. RPC: Refactor JSON RPC exceptions JsonRpcError class is now derived from ContextException and other derived exceptions use the context to provide more information. For example, new error message for JsonRpcMethodNotFoundError is: The method does not exist or is not available: {'method': 'some_missing_method'} Also added a new class JsonRpcServerError, that can have any code and message. Change-Id: Ifdaf434aec6c65e7a896e5594fba711193cd2958 Signed-off-by: Andrej Krejcir --- M lib/vdsm/common/exception.py M lib/vdsm/jsonrpcvdscli.py M lib/vdsm/rpc/Bridge.py M lib/yajsonrpc/__init__.py M tests/bridge_test.py M tests/integration/jsonRpcTests.py M tests/stomp_test.py M tests/vdsmapi_test.py 8 files changed, 97 insertions(+), 91 deletions(-) Approvals: Piotr Kliczewski: Looks good to me, approved Nir Soffer: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests Andrej Krejcir: Verified -- To view, visit https://gerrit.ovirt.org/78660 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifdaf434aec6c65e7a896e5594fba711193cd2958 Gerrit-PatchSet: 37 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Andrej Krejcir Gerrit-Reviewer: Andrej Krejcir Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Denis Chaplygin Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenny Tokar Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Phillip Bailey Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Roman Mohr Gerrit-Reviewer: Yanir Quinn Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: RPC: Refactor JSON RPC exceptions
From Yaniv Bronhaim: Yaniv Bronhaim has posted comments on this change. Change subject: RPC: Refactor JSON RPC exceptions .. Patch Set 29: (1 comment) https://gerrit.ovirt.org/#/c/78660/29//COMMIT_MSG Commit Message: Line 13: For example, new error message for JsonRpcMethodNotFoundError is: Line 14: The method does not exist or is not available: {'method': 'some_missing_method'} Line 15: Line 16: Also added a new class JsonRpcGeneralError, that can have Line 17: any code and message. > I see... I think, it would be better to put the changes of exceptions to an Nir, Seems like you have amazing design and appropriate behavior that you would like to have in all vdsm code as maintainer - it sounds amazing. but all those comments can't show me what you want to create - its too long and I can't allow follow the context. please create design document for your desire of how handling error\exception should be in vdsm - what way of using this hierarchy is valid and what is not- like may I create interfaces? can I call super? can I use same message but two different codes? whatever you love, just write it in a way that we will be able to follow your way ... if you did so already, please share it and sorry for the interruption :) Line 18: Line 19: Change-Id: Ifdaf434aec6c65e7a896e5594fba711193cd2958 -- To view, visit https://gerrit.ovirt.org/78660 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifdaf434aec6c65e7a896e5594fba711193cd2958 Gerrit-PatchSet: 29 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Andrej Krejcir Gerrit-Reviewer: Andrej Krejcir Gerrit-Reviewer: Denis Chaplygin Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenny Tokar Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Phillip Bailey Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Roman Mohr Gerrit-Reviewer: Yanir Quinn Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: RPC: Refactor JSON RPC exceptions
From Yaniv Bronhaim: Yaniv Bronhaim has posted comments on this change. Change subject: RPC: Refactor JSON RPC exceptions .. Patch Set 17: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/78660 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifdaf434aec6c65e7a896e5594fba711193cd2958 Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Andrej Krejcir Gerrit-Reviewer: Andrej Krejcir Gerrit-Reviewer: Denis Chaplygin Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenny Tokar Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Phillip Bailey Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Roman Mohr Gerrit-Reviewer: Yanir Quinn Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org