)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     hujie \u003cmike.hu@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-12 15:18:18 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement ovsdb monitor function for dragonflow"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Id0762656871e9fbe57bd6119b7cac3d4d4f90bd4"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3afc51ec_1c559c4f","line":7,"updated":"2016-03-13 14:48:53.000000000","message":"IMO, better to have a bug/spec details also mentioned as part of the commit msg for better reference..","commit_id":"74380858f06c912444abb6484b8633ac377df58f"}],"dragonflow/common/exceptions.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    message \u003d _(\u0027DB Key not found, key\u003d%(key)s\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class SocketReadException(DragonflowException):"},{"line_number":55,"context_line":"    message \u003d _(\u0027Exception happened when read data from socket!\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_9cc7ec11","line":54,"updated":"2016-03-13 14:48:53.000000000","message":"Let\u0027s add a doc string..","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class SocketReadException(DragonflowException):"},{"line_number":55,"context_line":"    message \u003d _(\u0027Exception happened when read data from socket!\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class UnsupportedTransportException(DragonflowException):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_dcd174cf","line":55,"updated":"2016-03-13 14:48:53.000000000","message":"Do you really want to add an ! mark at the end of the msg.. Let\u0027s keep the msg style uniform.. I can find other exceptions doesn\u0027t add an ! mark at the end..","commit_id":"74380858f06c912444abb6484b8633ac377df58f"}],"dragonflow/controller/ryu_base_app.py":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c28bdebd935364486b9637376409765ef6db7a0f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        table \u003d \"linterface\""},{"line_number":135,"context_line":"        key \u003d local_interface.uuid"},{"line_number":136,"context_line":"        action \u003d \"create\""},{"line_number":137,"context_line":"        self.nb_api.db_change_callback(table, key, action, local_interface)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def notify_remove_local_interface(self, local_interface):"},{"line_number":140,"context_line":"        table \u003d \"linterface\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_5d173051","line":137,"range":{"start_line":137,"start_character":20,"end_line":137,"end_character":38},"updated":"2016-03-12 05:07:42.000000000","message":"https://github.com/openstack/dragonflow/blob/master/dragonflow/db/api_nb.py#L132\n\nThe db_change_callback needs topic argument which is the tenant_id of the object. If it is not available, set it to None.","commit_id":"51c903102d0a75bea21c76c6034f10727f466ebd"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c28bdebd935364486b9637376409765ef6db7a0f","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        table \u003d \"linterface\""},{"line_number":141,"context_line":"        key \u003d local_interface.uuid"},{"line_number":142,"context_line":"        action \u003d \"delete\""},{"line_number":143,"context_line":"        self.nb_api.db_change_callback(table, key, action, local_interface)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def notify_monitor_reply_finish(self):"},{"line_number":146,"context_line":"        table \u003d \"linterface\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_bd0c7443","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":75},"updated":"2016-03-12 05:07:42.000000000","message":"ditto","commit_id":"51c903102d0a75bea21c76c6034f10727f466ebd"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c28bdebd935364486b9637376409765ef6db7a0f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def notify_monitor_reply_finish(self):"},{"line_number":146,"context_line":"        table \u003d \"linterface\""},{"line_number":147,"context_line":"        action \u003d \"sync_finished\""},{"line_number":148,"context_line":"        self.nb_api.db_change_callback(table, None, action, None)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    @set_ev_cls(ofp_event.EventOFPPortStatus, MAIN_DISPATCHER)"},{"line_number":151,"context_line":"    def _port_status_handler(self, ev):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afc51ec_9d09b834","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":65},"updated":"2016-03-12 05:07:42.000000000","message":"ditto","commit_id":"51c903102d0a75bea21c76c6034f10727f466ebd"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                cfg.CONF.df.apps_list)"},{"line_number":43,"context_line":"        self.db_store \u003d db_store"},{"line_number":44,"context_line":"        self._datapath \u003d None"},{"line_number":45,"context_line":"        self.nb_api \u003d None"},{"line_number":46,"context_line":"        self.table_handlers \u003d {}"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_7cf30074","line":45,"updated":"2016-03-13 14:48:53.000000000","message":"let\u0027s call \u0027set_nb_api\u0027 instead setting the value implicitly...","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def datapath(self):"},{"line_number":50,"context_line":"        return self._datapath"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def set_nb_api(self, nb_api):"},{"line_number":53,"context_line":"        self.nb_api \u003d nb_api"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def start(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_3ce338a5","line":52,"updated":"2016-03-13 14:48:53.000000000","message":"How about making \u0027nb_api\u003dNone\u0027 as a part of the function signature..","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"a4d90b22e4bb251b7c490219efaa9bf292007d96","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        datapath.send_msg(req)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def notify_add_local_interface(self, local_interface):"},{"line_number":134,"context_line":"        table \u003d \"linterface\""},{"line_number":135,"context_line":"        key \u003d local_interface.uuid"},{"line_number":136,"context_line":"        action \u003d \"create\""},{"line_number":137,"context_line":"        self.nb_api.db_change_callback(table, key, action,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_3cefb8e9","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":28},"updated":"2016-03-13 14:14:54.000000000","message":"Please define a const for this table name I think that a better name is local_interface or interface \n\nI am missing the update to to update this table \napi_nb.py apply_db_change(\n\nFound it in @duankebo patch usually you have to depend on his patch  if the patches are dependent","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.nb_api.db_change_callback(table, key, action,"},{"line_number":138,"context_line":"                                       local_interface, None)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def notify_remove_local_interface(self, local_interface):"},{"line_number":141,"context_line":"        table \u003d \"linterface\""},{"line_number":142,"context_line":"        key \u003d local_interface.uuid"},{"line_number":143,"context_line":"        action \u003d \"delete\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_bced888d","line":140,"updated":"2016-03-13 14:48:53.000000000","message":"I would suggest to pass \u0027action\u0027 as part of the function.. Doing so we won\u0027t be needing separate functions for adding and removing..","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":11364,"name":"Fei Rao","email":"milo.frao@gmail.com","username":"milo.frao"},"change_message_id":"a5a4a7e5e4669038e1a28e957c82ea7e0c1f9cc1","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        self.nb_api.db_change_callback(table, key, action,"},{"line_number":138,"context_line":"                                       local_interface, None)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def notify_remove_local_interface(self, local_interface):"},{"line_number":141,"context_line":"        table \u003d \"linterface\""},{"line_number":142,"context_line":"        key \u003d local_interface.uuid"},{"line_number":143,"context_line":"        action \u003d \"delete\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_a0e6b212","line":140,"in_reply_to":"3afc51ec_bced888d","updated":"2016-03-15 08:02:35.000000000","message":"+1, Agree with vikram","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"a4d90b22e4bb251b7c490219efaa9bf292007d96","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                                       local_interface, None)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def notify_remove_local_interface(self, local_interface):"},{"line_number":141,"context_line":"        table \u003d \"linterface\""},{"line_number":142,"context_line":"        key \u003d local_interface.uuid"},{"line_number":143,"context_line":"        action \u003d \"delete\""},{"line_number":144,"context_line":"        self.nb_api.db_change_callback(table, key, action,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_7cbf80d0","line":141,"range":{"start_line":141,"start_character":8,"end_line":141,"end_character":13},"updated":"2016-03-13 14:14:54.000000000","message":"ditto","commit_id":"74380858f06c912444abb6484b8633ac377df58f"}],"dragonflow/db/drivers/ovsdb_vswitch_impl.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"575c07fd32483f737ae6624ef3884f6efda09168","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            elif retval \u003d\u003d 0:"},{"line_number":310,"context_line":"                continue"},{"line_number":311,"context_line":"            else:"},{"line_number":312,"context_line":"                break"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def send_monitor_request(self):"},{"line_number":315,"context_line":"        monitor_request \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_616d1e98","line":312,"updated":"2016-03-13 20:03:00.000000000","message":"Isn\u0027t this an error case? If so, consider adding a log.","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"575c07fd32483f737ae6624ef3884f6efda09168","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                _interface \u003d api_vswitch.LocalInterface()"},{"line_number":344,"context_line":"                _interface.uuid \u003d row_uuid"},{"line_number":345,"context_line":"                self.parse_interface(_interface, old)"},{"line_number":346,"context_line":"                self.open_flow_app.notify_remove_local_interface(_interface)"},{"line_number":347,"context_line":"            else:"},{"line_number":348,"context_line":"                # add a new interface or update a exist interface"},{"line_number":349,"context_line":"                _interface \u003d api_vswitch.LocalInterface()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_cde700e3","line":346,"updated":"2016-03-13 20:03:00.000000000","message":"Consider passing events that should reach the nb_api directly to it. open_flow_app is generally used to pass events to DF apps, not to the NB API.\n\nThis way, you don\u0027t have to pass the open_flow_app here and the nb_api to open_flow_app in a roundabout way, but can pass nb_api here (almost) directly. It will remove a level of indirection, and will result in cleaner code.","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"a4d90b22e4bb251b7c490219efaa9bf292007d96","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                self.parse_interface(_interface, new)"},{"line_number":352,"context_line":"                self.open_flow_app.notify_add_local_interface(_interface)"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"    def judge_interface_type(self, input_dict):"},{"line_number":355,"context_line":"        interface_type \u003d input_dict.get(OvsdbMonitor.INTERFACE_FIELD_TYPE)"},{"line_number":356,"context_line":"        interface_name \u003d input_dict.get(OvsdbMonitor.INTERFACE_FIELD_NAME)"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_bcb588ce","line":354,"range":{"start_line":354,"start_character":8,"end_line":354,"end_character":28},"updated":"2016-03-13 14:14:54.000000000","message":"consider calling the method  just  get_interface_type(","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                self.handle_update(msg.result)"},{"line_number":479,"context_line":"                self.open_flow_app.notify_monitor_reply_finish()"},{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                pass"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self):"},{"line_number":484,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_5c828495","line":481,"updated":"2016-03-13 14:48:53.000000000","message":"How about using \u0027continue\u0027 instead of \u0027pass\u0027","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c9eca291ccce8c4d1966a472b488d8f3cb5484bc","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                pass"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self):"},{"line_number":484,"context_line":"        while True:"},{"line_number":485,"context_line":"            self.output \u003d \"\""},{"line_number":486,"context_line":"            self.input \u003d \"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_51dd5713","line":483,"range":{"start_line":483,"start_character":8,"end_line":483,"end_character":11},"updated":"2016-03-12 12:00:35.000000000","message":"The socket is created and destroyed in an infinite loop. I don\u0027t think it is a good idea. Why not reuse this socket?","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"70ff472ac6bbd061d0480223e74661fc4865db39","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                pass"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self):"},{"line_number":484,"context_line":"        while True:"},{"line_number":485,"context_line":"            self.output \u003d \"\""},{"line_number":486,"context_line":"            self.input \u003d \"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_8c5868fc","line":483,"range":{"start_line":483,"start_character":8,"end_line":483,"end_character":11},"in_reply_to":"3afc51ec_51dd5713","updated":"2016-03-12 13:33:09.000000000","message":"The destroy and create action will be excuted when local OVSDB break down, it will reuse the socket util local OVSDB is ready, reconnect and break down again, so it\u0027s not frequently, if we don\u0027t do this, we must find a good way to delete the send and receive buffer for the exception socket:)","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"8cfb14c1f77b5013e56ebb1e0fe90d2869697dd0","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                pass"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self):"},{"line_number":484,"context_line":"        while True:"},{"line_number":485,"context_line":"            self.output \u003d \"\""},{"line_number":486,"context_line":"            self.input \u003d \"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_d2468622","line":483,"range":{"start_line":483,"start_character":8,"end_line":483,"end_character":11},"in_reply_to":"3afc51ec_8c5868fc","updated":"2016-03-12 15:55:24.000000000","message":"OK, I see. Thanks for explanation.","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"bbf8788fec199ad2068198eea66a29594fb8668e","unresolved":false,"context_lines":[{"line_number":480,"context_line":"            else:"},{"line_number":481,"context_line":"                pass"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    def run(self):"},{"line_number":484,"context_line":"        while True:"},{"line_number":485,"context_line":"            self.output \u003d \"\""},{"line_number":486,"context_line":"            self.input \u003d \"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_666d3498","line":483,"range":{"start_line":483,"start_character":8,"end_line":483,"end_character":11},"in_reply_to":"3afc51ec_d2468622","updated":"2016-03-13 04:29:33.000000000","message":"Done","commit_id":"74380858f06c912444abb6484b8633ac377df58f"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"64837c3e887366075134ac8c655dbd555d5785a6","unresolved":false,"context_lines":[{"line_number":492,"context_line":"            try:"},{"line_number":493,"context_line":"                self.send_monitor_request()"},{"line_number":494,"context_line":"            except socket.error as e:"},{"line_number":495,"context_line":"                LOG.exception(_LE(\"exception happened \""},{"line_number":496,"context_line":"                                  \"when send monitor request, %s\"), e)"},{"line_number":497,"context_line":"                continue"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3afc51ec_dcb69489","line":495,"updated":"2016-03-13 14:48:53.000000000","message":"Let\u0027s define the exception in exception.py...","commit_id":"74380858f06c912444abb6484b8633ac377df58f"}]}
