Change in vdsm[master]: bridge: obtain method

nsoffer at redhat.com nsoffer at redhat.com
Sat Feb 27 21:40:21 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: bridge: obtain method
......................................................................


Patch Set 6:

(3 comments)

https://gerrit.ovirt.org/#/c/53472/6/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 509
Line 510
Line 511
Line 512
Line 513
dispatch will raise now yajsonrpc.JsonRpcMethodNotFoundError


Line 502:         self._attempt_log_stats()
Line 503:         logLevel = logging.DEBUG
Line 504:         if req.method in ('Host.getVMList', 'Host.getAllVmStats',
Line 505:                           'Host.getStats', 'StorageDomain.getStats',
Line 506:                           'VM.getStats', 'Host.fenceNode'):
In another patch, we should use here a frozenset instead of a tuple - should be faster and cleaner (frozenset created once outside of this method).
Line 507:             logLevel = logging.TRACE
Line 508:         self.log.log(logLevel, "Calling '%s' in bridge with %s",
Line 509:                      req.method, req.params)
Line 510:         try:


Line 513:             if req.isNotification():
Line 514:                 return
Line 515: 
Line 516:             ctx.requestDone(JsonRpcResponse(
Line 517:                 None, JsonRpcMethodNotFoundError(req.method),
We can pass the exception instance we caught above.
Line 518:                 req.id))
Line 519:             return
Line 520: 
Line 521:         try:


-- 
To view, visit https://gerrit.ovirt.org/53472
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b6cb53d8e42335510e34dfe372c1c21b80ac219
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list