)]}'
{"zaqarclient/transport/websocket_client.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"514751a31016e1eb5bead6db855f03dc4ca42711","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1aa78d24_76f02267","updated":"2016-07-15 12:44:50.000000000","message":"What do you think about renaming the file to `ws.py` ? Is that too obscure? At least it\u0027d match the scheme","commit_id":"7facd6cd1e13324bef658523b8eb95802dc91c9d"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"41b25701aeb9cb5acca395ac197bafeffebb87f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1aa78d24_a1b526d1","in_reply_to":"1aa78d24_76f02267","updated":"2016-07-16 20:24:59.000000000","message":"I will do it in the next patchset.","commit_id":"7facd6cd1e13324bef658523b8eb95802dc91c9d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"514751a31016e1eb5bead6db855f03dc4ca42711","unresolved":false,"context_lines":[{"line_number":23,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class WebsocketTransport(object):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, project_id, token, endpoint, queue_name\u003dNone,"},{"line_number":29,"context_line":"                 queue_ttl\u003d10000, queue_cleanup\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_d611165f","line":26,"updated":"2016-07-15 12:44:50.000000000","message":"this should inherit from `zaqarclient.transport.base:Transport`","commit_id":"7facd6cd1e13324bef658523b8eb95802dc91c9d"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"514751a31016e1eb5bead6db855f03dc4ca42711","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class WebsocketTransport(object):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, project_id, token, endpoint, queue_name\u003dNone,"},{"line_number":29,"context_line":"                 queue_ttl\u003d10000, queue_cleanup\u003dFalse):"},{"line_number":30,"context_line":"        \"\"\"Initialize a websocket transport client."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aa78d24_a12526af","line":28,"updated":"2016-07-15 12:44:50.000000000","message":"The base class receives a single argument, which is a dictionary with all the options you need. \n\nAre there options missing in that dictionary that you\u0027d need here?","commit_id":"7facd6cd1e13324bef658523b8eb95802dc91c9d"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"41b25701aeb9cb5acca395ac197bafeffebb87f3","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class WebsocketTransport(object):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, project_id, token, endpoint, queue_name\u003dNone,"},{"line_number":29,"context_line":"                 queue_ttl\u003d10000, queue_cleanup\u003dFalse):"},{"line_number":30,"context_line":"        \"\"\"Initialize a websocket transport client."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fad55976_837d7f70","line":28,"in_reply_to":"1aa78d24_a12526af","updated":"2016-07-16 20:24:59.000000000","message":"I checked on this. It looks like the Transport options you currently get include the token and project_id but only the Keystone endpoint is included, not the Zaqar (websocket) endpoint. Only the request object has the actual Zaqar endpoint set and I need the Zaqar endpoint in order to set up the authenticated websocket correctly. Perhaps I can do something like lazy load the websocket create so that it only instantiates itself within send() and do it that way.","commit_id":"7facd6cd1e13324bef658523b8eb95802dc91c9d"}],"zaqarclient/transport/ws.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1833eee006fa078d16eedd5c062f290caf02170b","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class WebsocketTransport(http.HttpTransport):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    \"\"\"Zaqar websocket transport."},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dada55a8_8642e03c","line":30,"updated":"2016-07-19 07:14:08.000000000","message":"Any reason why this inherits from HttpTransport and not base.Transport? Headers format? Perhaps something worth moving to the base class?","commit_id":"1aed9a00f2ad5250453d6007ffb50dc7ffa35d62"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"50d6a8b55072d47426b4dee4a1fca0b56f57b695","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class WebsocketTransport(http.HttpTransport):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    \"\"\"Zaqar websocket transport."},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dada55a8_cea2214b","line":30,"in_reply_to":"dada55a8_8642e03c","updated":"2016-07-19 11:46:38.000000000","message":"The HTTP status codes are used from base to help throw exceptions. See line 110. Also, the _prepare function is used although I could arguably easily eliminate it. So yeah, I could inherit from base if I moved the http status codes into base.","commit_id":"1aed9a00f2ad5250453d6007ffb50dc7ffa35d62"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"1833eee006fa078d16eedd5c062f290caf02170b","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        return resp"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def recv(self):"},{"line_number":123,"context_line":"        return json.loads(self._ws.recv())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def cleanup(self):"},{"line_number":126,"context_line":"        if self._ws:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dada55a8_26f7b4f6","line":123,"updated":"2016-07-19 07:14:08.000000000","message":"Should we watch for malformed json here?","commit_id":"1aed9a00f2ad5250453d6007ffb50dc7ffa35d62"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"50d6a8b55072d47426b4dee4a1fca0b56f57b695","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        return resp"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def recv(self):"},{"line_number":123,"context_line":"        return json.loads(self._ws.recv())"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def cleanup(self):"},{"line_number":126,"context_line":"        if self._ws:"}],"source_content_type":"text/x-python","patch_set":6,"id":"dada55a8_0e7399e8","line":123,"in_reply_to":"dada55a8_26f7b4f6","updated":"2016-07-19 11:46:38.000000000","message":"I personally would prefer to do that in the calling function. At least this is the approach we have taken within TripleO already. If there is already precedent for throwing malformed JSON exceptions in Zaqar it would be fine to do it here I think.","commit_id":"1aed9a00f2ad5250453d6007ffb50dc7ffa35d62"}]}
