Yaniv Bronhaim has posted comments on this change.

Change subject: jsonrpc: Add SSL support to asyncore transport
......................................................................


Patch Set 6:

(5 comments)

....................................................
File lib/yajsonrpc/asyncoreReactor.py
Line 234:         self._isRunning = False
Line 235:         self._wakeupEvent = _AsyncoreEvent(self._map)
Line 236: 
Line 237:     def createListener(self, address, acceptHandler):
Line 238:         l = AsyncoreListener(self, address, acceptHandler, 
self.sslctx)
'listener' couldn't be nicer than 'l'
Line 239:         self.wakeup()
Line 240:         return l
Line 241: 
Line 242:     def createClient(self, address):


Line 247:         while self._isRunning:
Line 248:             try:
Line 249:                 asyncore.loop(use_poll=True, map=self._map, count=1)
Line 250:             except:
Line 251:                 raise
why?
Line 252: 
Line 253:         for key, dispatcher in self._map.items():
Line 254:             del self._map[key]
Line 255:             dispatcher.close()


....................................................
File lib/yajsonrpc/betterAsyncore.py
Line 78: 
Line 79:         return result
Line 80: 
Line 81:     def _loadCAs(self):
Line 82:         context = self.context
why do you need additional context param? why not having a comment that 
explains it?
Line 83: 
Line 84:         if self.ca_cert:
Line 85:             context.load_verify_locations(self.ca_cert)
Line 86:             context.set_verify(


....................................................
File lib/yajsonrpc/protonReactor.py
Line 63:         self._connected = False
Line 64: 
Line 65:     def setTimeout(self, timeout):
Line 66:         # TODO
Line 67:         pass
add log here
Line 68: 
Line 69:     def closed(self):
Line 70:         return (self.connector is None or
Line 71:                 proton.pn_connector_closed(self.connector))


....................................................
File tests/jsonRpcUtils.py
Line 123: 
Line 124: @contextmanager
Line 125: def constructServer(tp, bridge, ssl=False):
Line 126:     queue = Queue()
Line 127:     server = JsonRpcServer(bridge, queue)
you don't need the additional local queue
Line 128:     with attachedReactor(tp, server, ssl) as clientFactory:
Line 129: 
Line 130:         try:
Line 131:             yield server, clientFactory


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iad305e26d7d62fd967c71e5ac4dbd8157639a36d
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to