Nir Soffer has posted comments on this change.

Change subject: jsonrpc: Accept all stomp commands
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/29652/3/lib/yajsonrpc/stompReactor.py
File lib/yajsonrpc/stompReactor.py:

Line 295: 
Line 296: class StompDetector():
Line 297:     log = logging.getLogger("protocoldetector.StompDetector")
Line 298:     NAME = "stomp"
Line 299:     COMMANDS = (Command.CONNECT, Command.CONNECTED, Command.ERROR,
> I am not 100% sure, but I find
Nicer, but this logic should be in Command class - we should not assume so much 
here about which commands are available in this class.

Then we can do:

    REQUIRED_SIZE = max(len(s) for s in Command.public_commands)

Or:

   REQUIRED_SIZE = max(len(s) for s in stomp.COMMANDS)
Line 300:                 Command.MESSAGE, Command.RECEIPT, Command.SEND,
Line 301:                 Command.SUBSCRIBE, Command.UNSUBSCRIBE)
Line 302:     REQUIRED_SIZE = max(len(s) for s in COMMANDS)
Line 303: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I63029e43bfd5f06bb8f25958b78f75850d45b6df
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [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