)]}'
{"dragonflow/controller/df_db_objects_refresh.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"27ebb0cab1bfe9e918280d37bf821a03f83653d0","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    if topics is not None:"},{"line_number":123,"context_line":"        for topic in topics:"},{"line_number":124,"context_line":"            _refresh_items(topic)"},{"line_number":125,"context_line":"    else:"},{"line_number":126,"context_line":"        _refresh_items()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_083f33d7","line":125,"updated":"2016-12-18 12:39:50.000000000","message":"Consider changing this code to make it more explicit that \u0027topics is None\u0027 means all topics, and \u0027topics \u003d\u003d []\u0027 means no topics. Maybe something like?:\n\nif topics is None:\n    _refresh_items()\nelse:\n    for topic in topics:\n        _refresh_items(topic)","commit_id":"96ae7d4bcd92da00f1761227c78cde9379f7b5e9"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76bd7ab573be9f4f6ce00dc47d4b1687f8670219","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    if topics is not None:"},{"line_number":123,"context_line":"        for topic in topics:"},{"line_number":124,"context_line":"            _refresh_items(topic)"},{"line_number":125,"context_line":"    else:"},{"line_number":126,"context_line":"        _refresh_items()"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_d51b0f7f","line":125,"in_reply_to":"1a6eadb0_083f33d7","updated":"2016-12-18 23:26:36.000000000","message":"Done","commit_id":"96ae7d4bcd92da00f1761227c78cde9379f7b5e9"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"3803309fa6e8d91b20aed4d7d484fcf43db7981c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                self.integration_bridge, \u0027secure\u0027)"},{"line_number":118,"context_line":"        self.open_flow_app.start()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.register_chassis()"},{"line_number":121,"context_line":"        self.create_tunnels()"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        df_db_objects_refresh.initialize_object_refreshers(self)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_bbad968a","line":120,"range":{"start_line":120,"start_character":13,"end_line":120,"end_character":29},"updated":"2016-10-27 09:25:36.000000000","message":"As far as I understand this is now called just once on start up. so what happens when we add compute nodes?\nHow are the tunnels updated?","commit_id":"da75244b0a9633c73bc020dc5bf94488f908ff02"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f832ec2b553a4f025ddfabd45a297456c279f689","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                self.integration_bridge, \u0027secure\u0027)"},{"line_number":118,"context_line":"        self.open_flow_app.start()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.register_chassis()"},{"line_number":121,"context_line":"        self.create_tunnels()"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        df_db_objects_refresh.initialize_object_refreshers(self)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_0921d5fb","line":120,"range":{"start_line":120,"start_character":13,"end_line":120,"end_character":29},"in_reply_to":"ba5da102_bbad968a","updated":"2016-10-27 13:51:46.000000000","message":"When the compute node first online, it will register a new chassis and add data to nb db. And the db publisher/subscriber will get the event and then update the tunnel at chassis_created(line 157)","commit_id":"da75244b0a9633c73bc020dc5bf94488f908ff02"},{"author":{"_account_id":18903,"name":"Yuli","email":"stremovsky@gmail.com","username":"yuli"},"change_message_id":"9570326e906bde8d1ad2c49f7f60d6a55d72d93d","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def run_sync(self):"},{"line_number":139,"context_line":"        while True:"},{"line_number":140,"context_line":"            time.sleep(1)"},{"line_number":141,"context_line":"            self.run_db_poll()"},{"line_number":142,"context_line":"            if self.sync_finished:"},{"line_number":143,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_ff479a48","line":140,"updated":"2016-11-01 10:38:54.000000000","message":"I think you can decrease the sleep time here","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"069615685e63317dabbbd47faa365d270a0955af","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def run_sync(self):"},{"line_number":139,"context_line":"        while True:"},{"line_number":140,"context_line":"            time.sleep(1)"},{"line_number":141,"context_line":"            self.run_db_poll()"},{"line_number":142,"context_line":"            if self.sync_finished:"},{"line_number":143,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_ac9cfe0e","line":140,"in_reply_to":"ba5da102_ff479a48","updated":"2016-12-11 22:03:46.000000000","message":"I won\u0027t do that, this is not something this patch should do :)","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"},{"author":{"_account_id":21007,"name":"yuan wei","email":"wei.yuan@huawei.com","username":"yuanwei"},"change_message_id":"562d5b63b640c7fcd519396a2ebbcf32bc4172bc","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def run_db_poll(self):"},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            topics \u003d self.topology.get_subscribed_topics()"},{"line_number":148,"context_line":"            df_db_objects_refresh.sync_local_cache_from_nb_db(topics)"},{"line_number":149,"context_line":"            self.sync_finished \u003d True"},{"line_number":150,"context_line":"        except Exception as e:"},{"line_number":151,"context_line":"            self.sync_finished \u003d False"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_98cebcb2","line":148,"updated":"2016-11-01 07:50:10.000000000","message":"Chassis information also could changed in DF DB when the connection to DF DB was broke. If we remove \u0027self.register_chassis\u0027 and \u0027self.create_tunnels\u0027 here, we should add \u0027chassis\u0027 table sync in \u0027sync_local_cache_from_nb_db\u0027 or something like that.","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"146725be210e97cb6e50adc3aa728f553fa9616e","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    def run_db_poll(self):"},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            topics \u003d self.topology.get_subscribed_topics()"},{"line_number":148,"context_line":"            df_db_objects_refresh.sync_local_cache_from_nb_db(topics)"},{"line_number":149,"context_line":"            self.sync_finished \u003d True"},{"line_number":150,"context_line":"        except Exception as e:"},{"line_number":151,"context_line":"            self.sync_finished \u003d False"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5da102_0b5fb80e","line":148,"in_reply_to":"ba5da102_98cebcb2","updated":"2016-11-01 08:29:38.000000000","message":"I think you are right, will move them back.","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"}],"dragonflow/controller/topology.py":[{"author":{"_account_id":17880,"name":"Shachar Snapiri","email":"shachar.snapiri@toganetworks.com","username":"snapiri"},"change_message_id":"3803309fa6e8d91b20aed4d7d484fcf43db7981c","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self._clear_tenant_topology(topic)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_subscribed_topics(self):"},{"line_number":233,"context_line":"        if not self.enable_selective_topo_dist:"},{"line_number":234,"context_line":"            return set()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return set(self.topic_subscribed)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_9bce1259","line":233,"range":{"start_line":233,"start_character":20,"end_line":233,"end_character":46},"updated":"2016-10-27 09:25:36.000000000","message":"As we hold a reference to the controller who holds this attribute, there is no need to hold it ourselves, we can just query the controller for it, this will reduce the chances of inconsistency.","commit_id":"da75244b0a9633c73bc020dc5bf94488f908ff02"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f832ec2b553a4f025ddfabd45a297456c279f689","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self._clear_tenant_topology(topic)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_subscribed_topics(self):"},{"line_number":233,"context_line":"        if not self.enable_selective_topo_dist:"},{"line_number":234,"context_line":"            return set()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return set(self.topic_subscribed)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_c96d1d34","line":233,"range":{"start_line":233,"start_character":20,"end_line":233,"end_character":46},"in_reply_to":"ba5da102_9bce1259","updated":"2016-10-27 13:51:46.000000000","message":"I agree, but it is the exsiting code in this file before this patch.","commit_id":"da75244b0a9633c73bc020dc5bf94488f908ff02"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"f67131a45aafa5eaa73b318f886167c1e4795b8b","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_subscribed_topics(self):"},{"line_number":233,"context_line":"        if not self.enable_selective_topo_dist:"},{"line_number":234,"context_line":"            return set()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return set(self.topic_subscribed)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a629dbe_159563e3","line":234,"range":{"start_line":234,"start_character":19,"end_line":234,"end_character":24},"updated":"2016-11-08 03:48:54.000000000","message":"why not return None, because I saw in some db driver, for example redis, it judge whether the topic is None to fetch the corresponding data, if you return set(), the driver will think it has some topic, maybe we can commit a patch to uniform the topic judgement to avoid this situation.","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"069615685e63317dabbbd47faa365d270a0955af","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def get_subscribed_topics(self):"},{"line_number":233,"context_line":"        if not self.enable_selective_topo_dist:"},{"line_number":234,"context_line":"            return set()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return set(self.topic_subscribed)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_ecb19690","line":234,"range":{"start_line":234,"start_character":19,"end_line":234,"end_character":24},"in_reply_to":"9a629dbe_159563e3","updated":"2016-12-11 22:03:46.000000000","message":"because I don\u0027t want to do extra none check in db_object_refresher. This is the method I create in this patch and only use in this patch. So I thought it might be fine to return empty set. But I think it is ok to return None here.","commit_id":"3c305cd9a5dd925a13258e6c7bc1411be88ab26e"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"c7abacee6f8b7b1b3a0b160f690a6c0640c5b68c","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def get_subscribed_topics(self):"},{"line_number":264,"context_line":"        if self.enable_selective_topo_dist:"},{"line_number":265,"context_line":"            return set(self.topic_subscribed)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _pull_tenant_topology_from_db(self, tenant_id):"},{"line_number":268,"context_line":"        df_db_objects_refresh.sync_local_cache_from_nb_db({tenant_id})"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6eadb0_35303ee8","line":265,"updated":"2016-12-15 02:20:05.000000000","message":"This function implies that it will return None when selective topo dist is disabled. I suggest you make it explicit.","commit_id":"f3007d326740a3d55bc65f1e15c9c17a6c50905b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4cb58ee9caf0d17d60f210dd5511e4697910d8ca","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def get_subscribed_topics(self):"},{"line_number":264,"context_line":"        if self.enable_selective_topo_dist:"},{"line_number":265,"context_line":"            return set(self.topic_subscribed)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _pull_tenant_topology_from_db(self, tenant_id):"},{"line_number":268,"context_line":"        df_db_objects_refresh.sync_local_cache_from_nb_db({tenant_id})"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a6eadb0_55977aeb","line":265,"in_reply_to":"1a6eadb0_35303ee8","updated":"2016-12-15 02:48:49.000000000","message":"Done","commit_id":"f3007d326740a3d55bc65f1e15c9c17a6c50905b"}]}
