)]}'
{"devstack/df-ext-services.sh":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"1820b9bf70f1197d8f78144313b43d02c44c2762","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":22,"id":"ba5da102_e9510164","line":4,"updated":"2016-10-27 13:52:45.000000000","message":"This is annoying but you should not change it. Maybe we should find a way to eliminate this issue.","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"4d97378b31eb084470e5bdedca649bfbfdfa599e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/env bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# Locate devstack directory"},{"line_number":4,"context_line":"TOP_DIR\u003d/opt/stack/devstack"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Detect path for this script file"},{"line_number":7,"context_line":"DF_DIR\u003d$(cd $(dirname \"$0\") \u0026\u0026 pwd)"}],"source_content_type":"text/x-sh","patch_set":22,"id":"ba5da102_010dfe36","line":4,"in_reply_to":"ba5da102_e9510164","updated":"2016-10-30 14:10:51.000000000","message":"yes, that\u0027s great","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"aeccf1154aca5e8590c92f379270ae224bf88f28","unresolved":false,"context_lines":[{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def register_chassis(self):"},{"line_number":340,"context_line":"        chassis \u003d self.nb_api.get_chassis(self.chassis_name)"},{"line_number":341,"context_line":"        my_chassis \u003d {\u0027id\u0027: self.chassis_name,"},{"line_number":342,"context_line":"                      \u0027ip\u0027: self.ip,"},{"line_number":343,"context_line":"                      \u0027tunnel_type\u0027: self.tunnel_type}"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_14874210","line":341,"range":{"start_line":341,"start_character":8,"end_line":341,"end_character":18},"updated":"2016-09-03 00:15:23.000000000","message":"my_chassis looks like a test code... what about current_chassis or new_chassis?","commit_id":"fd9e9ec68ffa86be03e1a79670010a12e519e174"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"aeccf1154aca5e8590c92f379270ae224bf88f28","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                      \u0027ip\u0027: self.ip,"},{"line_number":343,"context_line":"                      \u0027tunnel_type\u0027: self.tunnel_type}"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        if cmp(chassis.chassis, my_chassis) !\u003d 0:"},{"line_number":346,"context_line":"            self.nb_api.add_chassis(self.chassis_name,"},{"line_number":347,"context_line":"                                    self.ip,"},{"line_number":348,"context_line":"                                    self.tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_7476ce3f","line":345,"range":{"start_line":345,"start_character":8,"end_line":345,"end_character":49},"updated":"2016-09-03 00:15:23.000000000","message":"Just use chassis.chassis !\u003d my_chassis here. Usually, cmp will not be used to compare dict.\n\nAlso, could you add a unit test for this patch?","commit_id":"fd9e9ec68ffa86be03e1a79670010a12e519e174"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"0f349d2f40ddc9638a5b3ea5729a74b4ea925603","unresolved":false,"context_lines":[{"line_number":342,"context_line":"                      \u0027ip\u0027: self.ip,"},{"line_number":343,"context_line":"                      \u0027tunnel_type\u0027: self.tunnel_type}"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        if cmp(chassis.chassis, my_chassis) !\u003d 0:"},{"line_number":346,"context_line":"            self.nb_api.add_chassis(self.chassis_name,"},{"line_number":347,"context_line":"                                    self.ip,"},{"line_number":348,"context_line":"                                    self.tunnel_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_e62a26e7","line":345,"range":{"start_line":345,"start_character":8,"end_line":345,"end_character":49},"in_reply_to":"9a89bdaa_7476ce3f","updated":"2016-09-04 12:18:06.000000000","message":"Done","commit_id":"fd9e9ec68ffa86be03e1a79670010a12e519e174"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"21192e4100c2f1698ac4e6f8daa61a418c661fec","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                      \u0027tunnel_type\u0027: self.tunnel_type}"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        if cmp(chassis.chassis, my_chassis) !\u003d 0:"},{"line_number":346,"context_line":"            self.nb_api.add_chassis(self.chassis_name,"},{"line_number":347,"context_line":"                                    self.ip,"},{"line_number":348,"context_line":"                                    self.tunnel_type)"},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_c590bcef","line":346,"updated":"2016-09-04 05:10:03.000000000","message":"You might also need to handle the case of chassis modification - i.e. ip or tunnel_type change. In this case, an update_chassis function will also have to be added to api_nb.","commit_id":"fd9e9ec68ffa86be03e1a79670010a12e519e174"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"0f349d2f40ddc9638a5b3ea5729a74b4ea925603","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                      \u0027tunnel_type\u0027: self.tunnel_type}"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        if cmp(chassis.chassis, my_chassis) !\u003d 0:"},{"line_number":346,"context_line":"            self.nb_api.add_chassis(self.chassis_name,"},{"line_number":347,"context_line":"                                    self.ip,"},{"line_number":348,"context_line":"                                    self.tunnel_type)"},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_463af237","line":346,"in_reply_to":"9a89bdaa_c590bcef","updated":"2016-09-04 12:18:06.000000000","message":"we\u0027re writing all the keys to overwrite the chassis table in df db here, so IMHO an update_chassis, which usually reads the df-db and then updates the value and writes it back,  is not necessary.","commit_id":"fd9e9ec68ffa86be03e1a79670010a12e519e174"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"719c06def24c2685d4d4bdb974cd8ac6a360e032","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                   \u0027type\u0027: port.get_type()}"},{"line_number":158,"context_line":"        return api_nb.Chassis(chassis)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def chassis_created(self, chassis):"},{"line_number":161,"context_line":"        # Check if tunnel already exists to this chassis"},{"line_number":162,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"},{"line_number":163,"context_line":"        if self.local_chassis \u003d\u003d chassis:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_1b6af780","line":160,"range":{"start_line":160,"start_character":8,"end_line":160,"end_character":23},"updated":"2016-09-05 05:28:39.000000000","message":"We may want to change this name to chassis_updated, since it will be called now when a chassis is both created, and modified (e.g. changes IP/tunnel type).","commit_id":"b24866cebc715e85e4703b52222d1fa4cf1e1821"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"072067729ff7f20d3a44030f933b2d8e5e1b7007","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            elif tunnel_chassis_info[\u0027id\u0027] \u003d\u003d chassis[\u0027id\u0027]:"},{"line_number":172,"context_line":"                if tunnel_chassis_info[\u0027type\u0027] !\u003d chassis[\u0027type\u0027]:"},{"line_number":173,"context_line":"                    LOG.warning(_LI(\"remote Chassis Tunnel %s has a\""},{"line_number":174,"context_line":"                                \" different type\") % chassis.__str__())"},{"line_number":175,"context_line":"                    return"},{"line_number":176,"context_line":"                elif tunnel_chassis_info[\u0027ip\u0027] !\u003d chassis[\u0027ip\u0027]:"},{"line_number":177,"context_line":"                    LOG.info(_LI(\"The IP address of remote Chassis Tunnel %s \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_dc031372","line":174,"range":{"start_line":174,"start_character":53,"end_line":174,"end_character":60},"updated":"2016-09-05 12:54:21.000000000","message":"record the tunnel_chassis_info also. It will be better to debug.","commit_id":"b24866cebc715e85e4703b52222d1fa4cf1e1821"},{"author":{"_account_id":20297,"name":"duankebo","email":"duankebo@huawei.com","username":"duankebo"},"change_message_id":"072067729ff7f20d3a44030f933b2d8e5e1b7007","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                    return"},{"line_number":176,"context_line":"                elif tunnel_chassis_info[\u0027ip\u0027] !\u003d chassis[\u0027ip\u0027]:"},{"line_number":177,"context_line":"                    LOG.info(_LI(\"The IP address of remote Chassis Tunnel %s \""},{"line_number":178,"context_line":"                                \"has been changed\") % chassis.__str__())"},{"line_number":179,"context_line":"                    self.vswitch_api.delete_port(t_port).execute()"},{"line_number":180,"context_line":"                    break"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_3cf31fa0","line":178,"range":{"start_line":178,"start_character":54,"end_line":178,"end_character":61},"updated":"2016-09-05 12:54:21.000000000","message":"+1","commit_id":"b24866cebc715e85e4703b52222d1fa4cf1e1821"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.db_store \u003d db_store.DbStore()"},{"line_number":58,"context_line":"        self.ip \u003d cfg.CONF.df.local_ip"},{"line_number":59,"context_line":"        self.tunnel_type \u003d cfg.CONF.df.tunnel_type"},{"line_number":60,"context_line":"        chassis \u003d {u\"id\": chassis_name,"},{"line_number":61,"context_line":"                   u\"ip\": self.ip,"},{"line_number":62,"context_line":"                   u\"tunnel_type\": self.tunnel_type}"},{"line_number":63,"context_line":"        self.local_chassis \u003d api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_917e3568","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":20},"updated":"2016-09-18 01:13:58.000000000","message":"Is the heading \u0027u\u0027 required?","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.db_store \u003d db_store.DbStore()"},{"line_number":58,"context_line":"        self.ip \u003d cfg.CONF.df.local_ip"},{"line_number":59,"context_line":"        self.tunnel_type \u003d cfg.CONF.df.tunnel_type"},{"line_number":60,"context_line":"        chassis \u003d {u\"id\": chassis_name,"},{"line_number":61,"context_line":"                   u\"ip\": self.ip,"},{"line_number":62,"context_line":"                   u\"tunnel_type\": self.tunnel_type}"},{"line_number":63,"context_line":"        self.local_chassis \u003d api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_d08d10d4","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":20},"in_reply_to":"7a8ec9b2_917e3568","updated":"2016-09-18 14:52:08.000000000","message":"I think not as part of this patch.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            LOG.exception(e)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _tunnel_port_to_chassis(self, port):"},{"line_number":157,"context_line":"        chassis \u003d {u\u0027id\u0027: port.get_chassis_id(),"},{"line_number":158,"context_line":"                   u\u0027ip\u0027: port.get_remote_ip(),"},{"line_number":159,"context_line":"                   u\u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_115dc514","line":157,"range":{"start_line":157,"start_character":19,"end_line":157,"end_character":24},"updated":"2016-09-18 01:13:58.000000000","message":"Is the heading \u0027u\u0027 required?","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            LOG.exception(e)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _tunnel_port_to_chassis(self, port):"},{"line_number":157,"context_line":"        chassis \u003d {u\u0027id\u0027: port.get_chassis_id(),"},{"line_number":158,"context_line":"                   u\u0027ip\u0027: port.get_remote_ip(),"},{"line_number":159,"context_line":"                   u\u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_aab8132b","line":157,"range":{"start_line":157,"start_character":19,"end_line":157,"end_character":24},"in_reply_to":"7a8ec9b2_115dc514","updated":"2016-09-18 14:35:42.000000000","message":"yes, we check the difference of two sets in line 388 and 389, the string of tunnel ports contains \u0027u\u0027, and it makes the two objects are not equal when Chassis.__repr__ is called","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                   u\u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _remote_chassis_can_be_added(self, chassis):"},{"line_number":163,"context_line":"        if self.local_chassis \u003d\u003d chassis:"},{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_70619c04","line":162,"updated":"2016-09-18 14:52:08.000000000","message":"I\u0027m not sure I understand this method or its name. A chassis cannot be updated if its encap type is different? I am not sure this is true in ML2 and L2. In any case, if this is true, than it should be fixed, not disallowed.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                   u\u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _remote_chassis_can_be_added(self, chassis):"},{"line_number":163,"context_line":"        if self.local_chassis \u003d\u003d chassis:"},{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_2f0f2d2f","line":162,"in_reply_to":"7a8ec9b2_70619c04","updated":"2016-09-21 00:30:31.000000000","message":"Actually, it is used to check if a \u0027tunnel\u0027 can be create to reach a remote chassis. If the remote chassis has a different tunnel type, we cannot create a proper tunnel.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\") %"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis.__str__(),"},{"line_number":170,"context_line":"                         \u0027local\u0027: self.local_chassis.__str__()})"},{"line_number":171,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_319e41b9","line":168,"range":{"start_line":168,"start_character":75,"end_line":168,"end_character":77},"updated":"2016-09-18 01:13:58.000000000","message":"You can replace the % with ,","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\") %"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis.__str__(),"},{"line_number":170,"context_line":"                         \u0027local\u0027: self.local_chassis.__str__()})"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":"        return True"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_51a10df7","line":170,"range":{"start_line":169,"start_character":24,"end_line":170,"end_character":64},"updated":"2016-09-18 01:13:58.000000000","message":"and just pass the object as value here.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\") %"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis.__str__(),"},{"line_number":170,"context_line":"                         \u0027local\u0027: self.local_chassis.__str__()})"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":"        return True"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_bff12f97","line":170,"range":{"start_line":169,"start_character":24,"end_line":170,"end_character":64},"in_reply_to":"7a8ec9b2_10c218e9","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\") %"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis.__str__(),"},{"line_number":170,"context_line":"                         \u0027local\u0027: self.local_chassis.__str__()})"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":"        return True"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_6a99abc3","line":170,"range":{"start_line":169,"start_character":24,"end_line":170,"end_character":64},"in_reply_to":"7a8ec9b2_51a10df7","updated":"2016-09-18 14:35:42.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\") %"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis.__str__(),"},{"line_number":170,"context_line":"                         \u0027local\u0027: self.local_chassis.__str__()})"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":"        return True"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_10c218e9","line":170,"range":{"start_line":169,"start_character":24,"end_line":170,"end_character":64},"in_reply_to":"7a8ec9b2_51a10df7","updated":"2016-09-18 14:52:08.000000000","message":"In any case, do not use __str__. If you must, use str(chassis), but I think passing chassis is enough (Like XiaoHongHui said).","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            tunnel_chassis_info \u003d self._tunnel_port_to_chassis(t_port)"},{"line_number":181,"context_line":"            if tunnel_chassis_info \u003d\u003d chassis:"},{"line_number":182,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_71a44907","line":183,"range":{"start_line":183,"start_character":21,"end_line":183,"end_character":38},"updated":"2016-09-18 01:13:58.000000000","message":"If % is replaced with \u0027,\u0027, then the __str__ is not required.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            tunnel_chassis_info \u003d self._tunnel_port_to_chassis(t_port)"},{"line_number":181,"context_line":"            if tunnel_chassis_info \u003d\u003d chassis:"},{"line_number":182,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_50ad8099","line":183,"range":{"start_line":183,"start_character":21,"end_line":183,"end_character":38},"in_reply_to":"7a8ec9b2_71a44907","updated":"2016-09-18 14:35:42.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            tunnel_chassis_info \u003d self._tunnel_port_to_chassis(t_port)"},{"line_number":181,"context_line":"            if tunnel_chassis_info \u003d\u003d chassis:"},{"line_number":182,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_f033ec11","line":183,"range":{"start_line":183,"start_character":21,"end_line":183,"end_character":38},"in_reply_to":"7a8ec9b2_71a44907","updated":"2016-09-18 14:52:08.000000000","message":"In any case, don\u0027t use __str__, use str(...) if you must.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            tunnel_chassis_info \u003d self._tunnel_port_to_chassis(t_port)"},{"line_number":181,"context_line":"            if tunnel_chassis_info \u003d\u003d chassis:"},{"line_number":182,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_dfec3bbd","line":183,"range":{"start_line":183,"start_character":21,"end_line":183,"end_character":38},"in_reply_to":"7a8ec9b2_f033ec11","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"},{"line_number":187,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":188,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":189,"context_line":"                    {chassis.__str__(), self.local_chassis.__str__()})"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_f154d9ca","line":186,"range":{"start_line":186,"start_character":18,"end_line":186,"end_character":72},"updated":"2016-09-18 01:13:58.000000000","message":"what if the tunnel type changes?","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                     chassis.__str__())"},{"line_number":184,"context_line":"                return"},{"line_number":185,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()"},{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"},{"line_number":187,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":188,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":189,"context_line":"                    {chassis.__str__(), self.local_chassis.__str__()})"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_ca8abf63","line":186,"range":{"start_line":186,"start_character":18,"end_line":186,"end_character":72},"in_reply_to":"7a8ec9b2_f154d9ca","updated":"2016-09-18 14:35:42.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"},{"line_number":187,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":188,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":189,"context_line":"                    {chassis.__str__(), self.local_chassis.__str__()})"},{"line_number":190,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":191,"context_line":"                break"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_91a7150a","line":189,"range":{"start_line":189,"start_character":20,"end_line":189,"end_character":70},"updated":"2016-09-18 01:13:58.000000000","message":"Ditto","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                  and tunnel_chassis_info.get_ip() !\u003d chassis.get_ip()):"},{"line_number":187,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":188,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":189,"context_line":"                    {chassis.__str__(), self.local_chassis.__str__()})"},{"line_number":190,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":191,"context_line":"                break"},{"line_number":192,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_4af5cfea","line":189,"range":{"start_line":189,"start_character":20,"end_line":189,"end_character":70},"in_reply_to":"7a8ec9b2_91a7150a","updated":"2016-09-18 14:35:42.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":377,"context_line":"            self.nb_api.update_chassis(self.local_chassis.chassis)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def create_tunnels(self):"},{"line_number":380,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"},{"line_number":381,"context_line":"        tunnel_ports \u003d {}"},{"line_number":382,"context_line":"        for t_port in t_ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_f10219b3","line":379,"range":{"start_line":379,"start_character":8,"end_line":379,"end_character":22},"updated":"2016-09-18 01:13:58.000000000","message":"The old tunnels are deleted here and new tunnels are also created here. But this method is usually called at startup, does that mean all sibling nodes need to restart to recreate tunnel to the updated node? For example, node A change ip from 10.0.0.1 -\u003e .2, and node A is restarted. But node B will not updated its tunnel to node A unless node B restart, or node B sync db(which seems not usually happen.)","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":377,"context_line":"            self.nb_api.update_chassis(self.local_chassis.chassis)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def create_tunnels(self):"},{"line_number":380,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"},{"line_number":381,"context_line":"        tunnel_ports \u003d {}"},{"line_number":382,"context_line":"        for t_port in t_ports:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_6a6b6bb7","line":379,"range":{"start_line":379,"start_character":8,"end_line":379,"end_character":22},"in_reply_to":"7a8ec9b2_f10219b3","updated":"2016-09-18 14:35:42.000000000","message":"when node A is restarted, it will change its chassis info in df-db, and controllers will receive a chassis_update event line 156, which causes them to recreate tunnels","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        chassis_to_del \u003d local_chassis - all_chassis"},{"line_number":389,"context_line":"        chassis_to_add \u003d all_chassis - local_chassis"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":392,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":393,"context_line":"        def del_handler(chassis):"},{"line_number":394,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":395,"context_line":"            self.vswitch_api.delete_port("},{"line_number":396,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":397,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":400,"context_line":"            if self._remote_chassis_can_be_added(chassis):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_900aa824","line":397,"range":{"start_line":391,"start_character":0,"end_line":397,"end_character":40},"updated":"2016-09-18 14:52:08.000000000","message":"I think this could be written more clearly as a for-loop.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        chassis_to_del \u003d local_chassis - all_chassis"},{"line_number":389,"context_line":"        chassis_to_add \u003d all_chassis - local_chassis"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":392,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":393,"context_line":"        def del_handler(chassis):"},{"line_number":394,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":395,"context_line":"            self.vswitch_api.delete_port("},{"line_number":396,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":397,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":400,"context_line":"            if self._remote_chassis_can_be_added(chassis):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_138cc9d8","line":397,"range":{"start_line":391,"start_character":0,"end_line":397,"end_character":40},"in_reply_to":"7a8ec9b2_900aa824","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":397,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":400,"context_line":"            if self._remote_chassis_can_be_added(chassis):"},{"line_number":401,"context_line":"                LOG.info(_LI(\"Adding new tunnels %s\"), str(chassis))"},{"line_number":402,"context_line":"                self.vswitch_api.add_tunnel_port(chassis).execute()"},{"line_number":403,"context_line":"        map(add_tunnel_port, chassis_to_add)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def port_mappings(self):"},{"line_number":406,"context_line":"        ports_to_remove \u003d self.db_store.get_port_keys()"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_b005e414","line":403,"range":{"start_line":399,"start_character":0,"end_line":403,"end_character":44},"updated":"2016-09-18 14:52:08.000000000","message":"Same here.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":397,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":400,"context_line":"            if self._remote_chassis_can_be_added(chassis):"},{"line_number":401,"context_line":"                LOG.info(_LI(\"Adding new tunnels %s\"), str(chassis))"},{"line_number":402,"context_line":"                self.vswitch_api.add_tunnel_port(chassis).execute()"},{"line_number":403,"context_line":"        map(add_tunnel_port, chassis_to_add)"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def port_mappings(self):"},{"line_number":406,"context_line":"        ports_to_remove \u003d self.db_store.get_port_keys()"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_738d0dd2","line":403,"range":{"start_line":399,"start_character":0,"end_line":403,"end_character":44},"in_reply_to":"7a8ec9b2_b005e414","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.db_store \u003d db_store.DbStore()"},{"line_number":58,"context_line":"        self.ip \u003d cfg.CONF.df.local_ip"},{"line_number":59,"context_line":"        self.tunnel_type \u003d cfg.CONF.df.tunnel_type"},{"line_number":60,"context_line":"        chassis \u003d {u\"id\": chassis_name,"},{"line_number":61,"context_line":"                   u\"ip\": self.ip,"},{"line_number":62,"context_line":"                   u\"tunnel_type\": self.tunnel_type}"},{"line_number":63,"context_line":"        self.local_chassis \u003d api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_df66fbb9","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":24},"updated":"2016-09-19 01:17:47.000000000","message":"It looks odd to me to use unicode string as dict key value, unless you must do it. I would suggest using regular string as dict key value.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.db_store \u003d db_store.DbStore()"},{"line_number":58,"context_line":"        self.ip \u003d cfg.CONF.df.local_ip"},{"line_number":59,"context_line":"        self.tunnel_type \u003d cfg.CONF.df.tunnel_type"},{"line_number":60,"context_line":"        chassis \u003d {u\"id\": chassis_name,"},{"line_number":61,"context_line":"                   u\"ip\": self.ip,"},{"line_number":62,"context_line":"                   u\"tunnel_type\": self.tunnel_type}"},{"line_number":63,"context_line":"        self.local_chassis \u003d api_nb.Chassis(chassis)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_af15fd9b","line":60,"range":{"start_line":60,"start_character":19,"end_line":60,"end_character":24},"in_reply_to":"7a8ec9b2_df66fbb9","updated":"2016-09-21 08:53:53.000000000","message":"I think I can remove the \u0027u\u0027 and modify the Chassis.__repr__ to make it convert any type of str to unicode there","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\"),"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis, \u0027local\u0027: self.local_chassis})"},{"line_number":170,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_ff0737c7","line":167,"range":{"start_line":167,"start_character":11,"end_line":167,"end_character":27},"updated":"2016-09-19 01:17:47.000000000","message":"It is just a normal message, I think debug should be enough.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":167,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":168,"context_line":"                            \" different type with local chassis %(local)s\"),"},{"line_number":169,"context_line":"                        {\u0027remote\u0027: chassis, \u0027local\u0027: self.local_chassis})"},{"line_number":170,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_ef854507","line":167,"range":{"start_line":167,"start_character":11,"end_line":167,"end_character":27},"in_reply_to":"7a8ec9b2_ff0737c7","updated":"2016-09-21 08:53:53.000000000","message":"I think it can be a kind of misconfigure, so we need warn the admin","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":182,"context_line":"                     chassis)"},{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_df143bea","line":184,"range":{"start_line":184,"start_character":17,"end_line":184,"end_character":18},"updated":"2016-09-19 01:17:47.000000000","message":"nit: the parenthesis is not needed here.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                LOG.info(_LI(\"Remote Chassis Tunnel already installed \u003d %s\"),"},{"line_number":182,"context_line":"                     chassis)"},{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_8f8f6122","line":184,"range":{"start_line":184,"start_character":17,"end_line":184,"end_character":18},"in_reply_to":"7a8ec9b2_df143bea","updated":"2016-09-21 08:53:53.000000000","message":"Done","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                     chassis)"},{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_dffd1bb2","line":186,"range":{"start_line":185,"start_character":16,"end_line":186,"end_character":64},"updated":"2016-09-19 01:17:47.000000000","message":"It might be tunnel type changed here, the message needs an update.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                     chassis)"},{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_2f9f2d51","line":186,"range":{"start_line":185,"start_character":16,"end_line":186,"end_character":64},"in_reply_to":"7a8ec9b2_dffd1bb2","updated":"2016-09-21 08:53:53.000000000","message":"Done","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_5f282b33","line":187,"range":{"start_line":187,"start_character":20,"end_line":187,"end_character":49},"updated":"2016-09-19 01:17:47.000000000","message":"There are multiple objects in the message, may be you want to use a dict here as you did in line 169.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            elif (tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id()):"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The IP address of remote Chassis Tunnel\""},{"line_number":186,"context_line":"                    \" %s has been changed, local tunnel is %s\"),"},{"line_number":187,"context_line":"                    {chassis, self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_4fae3986","line":187,"range":{"start_line":187,"start_character":20,"end_line":187,"end_character":49},"in_reply_to":"7a8ec9b2_5f282b33","updated":"2016-09-21 08:53:53.000000000","message":"Done","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":20336,"name":"heshan","email":"shan.he@huawei.com","username":"shanhe"},"change_message_id":"74128886b80886559b88d530869f7230e31039b8","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        local_chassis \u003d set(map(self._tunnel_port_to_chassis, t_ports))"},{"line_number":383,"context_line":"        all_chassis \u003d set(self.nb_api.get_all_chassis())"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        chassis_to_del \u003d local_chassis - all_chassis"},{"line_number":386,"context_line":"        chassis_to_add \u003d all_chassis - local_chassis"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # it will fail to create ports with the same id but different ip"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_3ff27f06","line":385,"range":{"start_line":385,"start_character":8,"end_line":385,"end_character":52},"updated":"2016-09-19 00:35:59.000000000","message":"chassis be deleted is the chassis that has tunnel port in chassis but doesn\u0027t have corresponding port in northbound api. here chassis_to_del is empty, it\u0027s wrong.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        chassis_to_del \u003d local_chassis - all_chassis"},{"line_number":386,"context_line":"        chassis_to_add \u003d all_chassis - local_chassis"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":389,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":390,"context_line":"        def del_handler(chassis):"},{"line_number":391,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":392,"context_line":"            self.vswitch_api.delete_port("},{"line_number":393,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":394,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":397,"context_line":"            if self._remote_chassis_can_be_added(chassis):"},{"line_number":398,"context_line":"                LOG.info(_LI(\"Adding new tunnels %s\"), str(chassis))"},{"line_number":399,"context_line":"                self.vswitch_api.add_tunnel_port(chassis).execute()"},{"line_number":400,"context_line":"        map(add_tunnel_port, chassis_to_add)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def port_mappings(self):"},{"line_number":403,"context_line":"        ports_to_remove \u003d self.db_store.get_port_keys()"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_1fc0634f","line":400,"range":{"start_line":388,"start_character":0,"end_line":400,"end_character":44},"updated":"2016-09-19 01:17:47.000000000","message":"pls consider Omer\u0027s suggestion to use for loop here.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        chassis_to_del \u003d local_chassis - all_chassis"},{"line_number":386,"context_line":"        chassis_to_add \u003d all_chassis - local_chassis"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":389,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":390,"context_line":"        def del_handler(chassis):"},{"line_number":391,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":392,"context_line":"            self.vswitch_api.delete_port("},{"line_number":393,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":394,"context_line":"        map(del_handler, chassis_to_del)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"        def add_tunnel_port(chassis):"},{"line_number":397,"context_line":"            if self._remote_chassis_can_be_added(chassis):"},{"line_number":398,"context_line":"                LOG.info(_LI(\"Adding new tunnels %s\"), str(chassis))"},{"line_number":399,"context_line":"                self.vswitch_api.add_tunnel_port(chassis).execute()"},{"line_number":400,"context_line":"        map(add_tunnel_port, chassis_to_add)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    def port_mappings(self):"},{"line_number":403,"context_line":"        ports_to_remove \u003d self.db_store.get_port_keys()"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_ef9c655f","line":400,"range":{"start_line":388,"start_character":0,"end_line":400,"end_character":44},"in_reply_to":"7a8ec9b2_1fc0634f","updated":"2016-09-21 08:53:53.000000000","message":"Done","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                   \u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _tunnel_should_be_created(self, chassis):"},{"line_number":163,"context_line":"        if self.local_chassis \u003d\u003d chassis:"},{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_a04c9477","line":162,"updated":"2016-09-22 05:25:47.000000000","message":"\u003e Actually, it is used to check if a \u0027tunnel\u0027 can be create to reach a remote chassis. If the remote chassis has a different tunnel type, we cannot create a proper tunnel.\n\nIsn\u0027t this restriction removed with ML2?","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"47e58eac4db42f3020e138caa67c8033d2c4c22f","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                   \u0027tunnel_type\u0027: port.get_type()}"},{"line_number":160,"context_line":"        return api_nb.Chassis(chassis)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _tunnel_should_be_created(self, chassis):"},{"line_number":163,"context_line":"        if self.local_chassis \u003d\u003d chassis:"},{"line_number":164,"context_line":"            return False"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_3268d6ba","line":162,"in_reply_to":"5a8bc5a2_a04c9477","updated":"2016-09-22 08:02:48.000000000","message":"why it should be removed with ML2?\nI am sure I understand your question.\nAre you saying, with ML2, in the case of multiple mechenism drivers, this restriction should be removed?","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id():"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The remote Chassis Tunnel %(remote)s has been \""},{"line_number":186,"context_line":"                             \"changed, local tunnel is %(local)s\"),"},{"line_number":187,"context_line":"                    {\u0027remote\u0027: chassis, \u0027local\u0027: self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_e06dbccd","line":186,"range":{"start_line":186,"start_character":45,"end_line":186,"end_character":51},"updated":"2016-09-22 05:25:47.000000000","message":"Your logging the local_chassis, but title it as tunnel. Please rephrase to match.","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"47e58eac4db42f3020e138caa67c8033d2c4c22f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                return"},{"line_number":184,"context_line":"            elif tunnel_chassis_info.get_id() \u003d\u003d chassis.get_id():"},{"line_number":185,"context_line":"                LOG.info(_LI(\"The remote Chassis Tunnel %(remote)s has been \""},{"line_number":186,"context_line":"                             \"changed, local tunnel is %(local)s\"),"},{"line_number":187,"context_line":"                    {\u0027remote\u0027: chassis, \u0027local\u0027: self.local_chassis})"},{"line_number":188,"context_line":"                self.vswitch_api.delete_port(t_port).execute()"},{"line_number":189,"context_line":"                break"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_d7d40449","line":186,"range":{"start_line":186,"start_character":45,"end_line":186,"end_character":51},"in_reply_to":"5a8bc5a2_e06dbccd","updated":"2016-09-22 08:02:48.000000000","message":"Done","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":391,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":392,"context_line":"        for chassis in chassis_to_del:"},{"line_number":393,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":394,"context_line":"            self.vswitch_api.delete_port("},{"line_number":395,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_c09fe0b2","line":393,"range":{"start_line":393,"start_character":55,"end_line":393,"end_character":58},"updated":"2016-09-22 05:25:47.000000000","message":"nit: call to str not needed here.","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"47e58eac4db42f3020e138caa67c8033d2c4c22f","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        # it will fail to create ports with the same id but different ip"},{"line_number":391,"context_line":"        # or tunnel type, so we need to del first"},{"line_number":392,"context_line":"        for chassis in chassis_to_del:"},{"line_number":393,"context_line":"            LOG.info(_LI(\"Removing stale tunnels %s\"), str(chassis))"},{"line_number":394,"context_line":"            self.vswitch_api.delete_port("},{"line_number":395,"context_line":"                    tunnel_ports[chassis.get_id()]).execute()"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_97e43c3c","line":393,"range":{"start_line":393,"start_character":55,"end_line":393,"end_character":58},"in_reply_to":"5a8bc5a2_c09fe0b2","updated":"2016-09-22 08:02:48.000000000","message":"Done","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7155c444f570f57a7cbedc261c09f0a0cdd97a7b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def chassis_updated(self, chassis):"},{"line_number":173,"context_line":"        if self._tunnel_should_be_created(chassis) is False:"},{"line_number":174,"context_line":"            return"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_ea126556","line":173,"range":{"start_line":173,"start_character":11,"end_line":173,"end_character":59},"updated":"2016-09-26 07:44:22.000000000","message":"nit: not self._tunnel_should_be_created(chassis)","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"73fcfa52bbb95b0ee499fc2e762adf9c831143e0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return True"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def chassis_updated(self, chassis):"},{"line_number":173,"context_line":"        if self._tunnel_should_be_created(chassis) is False:"},{"line_number":174,"context_line":"            return"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6895a0_f08e5826","line":173,"range":{"start_line":173,"start_character":11,"end_line":173,"end_character":59},"in_reply_to":"5a8bc5a2_ea126556","updated":"2016-10-21 07:36:33.000000000","message":"Done","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d43a224d14243e6bdf6bd8c63277fdff78a8a753","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        lport.set_external_value(\u0027local_network_id\u0027, local_network_id)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        if chassis \u003d\u003d self.local_chassis.get_id():"},{"line_number":305,"context_line":"            lport.set_external_value(\u0027is_local\u0027, True)"},{"line_number":306,"context_line":"            ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.get_id())"},{"line_number":307,"context_line":"            if ofport:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_00dd3114","line":304,"range":{"start_line":304,"start_character":22,"end_line":304,"end_character":49},"updated":"2016-10-27 08:47:28.000000000","message":"uniform to self.get_chassis_name()","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"4d97378b31eb084470e5bdedca649bfbfdfa599e","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        lport.set_external_value(\u0027local_network_id\u0027, local_network_id)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        if chassis \u003d\u003d self.local_chassis.get_id():"},{"line_number":305,"context_line":"            lport.set_external_value(\u0027is_local\u0027, True)"},{"line_number":306,"context_line":"            ofport \u003d self.vswitch_api.get_port_ofport_by_id(lport.get_id())"},{"line_number":307,"context_line":"            if ofport:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_e109ea2d","line":304,"range":{"start_line":304,"start_character":22,"end_line":304,"end_character":49},"in_reply_to":"ba5da102_00dd3114","updated":"2016-10-30 14:10:51.000000000","message":"I think get_chassis_name is public method, but local_chassis is an internal attribute. The controller expose chassis_name to other classes, such as Topology via get_chassis_name. As to controller itself, it should use the attribute local_chassis directly","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d43a224d14243e6bdf6bd8c63277fdff78a8a753","unresolved":false,"context_lines":[{"line_number":458,"context_line":"        self._delete_old_security_group(old_secgroup)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"    def register_chassis(self):"},{"line_number":461,"context_line":"        chassis \u003d self.nb_api.get_chassis(self.local_chassis.get_id())"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        if chassis is None:"},{"line_number":464,"context_line":"            self.nb_api.add_chassis(self.local_chassis.chassis[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_60ec2dc8","line":461,"range":{"start_line":461,"start_character":42,"end_line":461,"end_character":69},"updated":"2016-10-27 08:47:28.000000000","message":"ditto","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d43a224d14243e6bdf6bd8c63277fdff78a8a753","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        chassis \u003d self.nb_api.get_chassis(self.local_chassis.get_id())"},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        if chassis is None:"},{"line_number":464,"context_line":"            self.nb_api.add_chassis(self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":465,"context_line":"                                    **self.local_chassis.chassis)"},{"line_number":466,"context_line":"            return"},{"line_number":467,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_a0ce4558","line":464,"range":{"start_line":464,"start_character":36,"end_line":464,"end_character":68},"updated":"2016-10-27 08:47:28.000000000","message":"ditto","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d43a224d14243e6bdf6bd8c63277fdff78a8a753","unresolved":false,"context_lines":[{"line_number":465,"context_line":"                                    **self.local_chassis.chassis)"},{"line_number":466,"context_line":"            return"},{"line_number":467,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":468,"context_line":"            self.nb_api.update_chassis(self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":469,"context_line":"                                       **self.local_chassis.chassis)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def create_tunnels(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_c0db391a","line":468,"range":{"start_line":468,"start_character":39,"end_line":468,"end_character":71},"updated":"2016-10-27 08:47:28.000000000","message":"ditto","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            return False"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        if self.local_chassis.get_encap_type() !\u003d chassis.get_encap_type():"},{"line_number":209,"context_line":"            LOG.warning(_LW(\"Remote Chassis Tunnel %(remote)s has a\""},{"line_number":210,"context_line":"                            \" different type with local chassis %(local)s\"),"},{"line_number":211,"context_line":"                        {\u0027remote\u0027: chassis, \u0027local\u0027: self.local_chassis})"},{"line_number":212,"context_line":"            return False"},{"line_number":213,"context_line":"        return True"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_3f308656","line":211,"range":{"start_line":209,"start_character":0,"end_line":211,"end_character":73},"updated":"2016-11-08 03:08:24.000000000","message":"If we are going to allow multiple tunnel type in one df cluster, then I think this should just be a debug level log(or even just not log it). It feels wrong to me to see other tunnel type chassis online event as  warning.\n\nBut if not, just ignore this comment.","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":465,"context_line":"        chassis \u003d self.nb_api.get_chassis(self.local_chassis.get_id())"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        if chassis is None:"},{"line_number":468,"context_line":"            self.nb_api.add_chassis(self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":469,"context_line":"                     ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":470,"context_line":"                     tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":471,"context_line":"            return"},{"line_number":472,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":473,"context_line":"            self.nb_api.update_chassis(self.local_chassis.chassis[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_ff744efe","line":470,"range":{"start_line":468,"start_character":0,"end_line":470,"end_character":75},"updated":"2016-11-08 03:08:24.000000000","message":"The indention seems not right, it should be\nself.nb_api.add_chassis(\n    self.local_chassis.chassis[\u0027id\u0027],\n    ip\u003dself.local_chassis.chassis[\u0027ip\u0027],\n    tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":469,"context_line":"                     ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":470,"context_line":"                     tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":471,"context_line":"            return"},{"line_number":472,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":473,"context_line":"            self.nb_api.update_chassis(self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":474,"context_line":"                     ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":475,"context_line":"                     tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def create_tunnels(self):"},{"line_number":478,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_3f65e644","line":475,"range":{"start_line":472,"start_character":0,"end_line":475,"end_character":75},"updated":"2016-11-08 03:08:24.000000000","message":"ditto","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        if chassis is None:"},{"line_number":468,"context_line":"            self.nb_api.add_chassis("},{"line_number":469,"context_line":"                     self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":470,"context_line":"                     ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":471,"context_line":"                     tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":472,"context_line":"            return"},{"line_number":473,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":474,"context_line":"            self.nb_api.update_chassis("}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_bb9b4617","line":471,"range":{"start_line":469,"start_character":0,"end_line":471,"end_character":75},"updated":"2016-11-10 13:23:29.000000000","message":"The indention here is not increased by 4 spaces...","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":472,"context_line":"            return"},{"line_number":473,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":474,"context_line":"            self.nb_api.update_chassis("},{"line_number":475,"context_line":"                     self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":476,"context_line":"                     ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":477,"context_line":"                     tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"    def create_tunnels(self):"},{"line_number":480,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_fba13e47","line":477,"range":{"start_line":475,"start_character":0,"end_line":477,"end_character":75},"updated":"2016-11-10 13:23:29.000000000","message":"The indention here is not increased by 4 spaces...","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"5a766a28defc3356db688715c9c87946c804b55e","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        if chassis is None:"},{"line_number":470,"context_line":"            self.nb_api.add_chassis("},{"line_number":471,"context_line":"                    self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":472,"context_line":"                    ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":473,"context_line":"                    tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":474,"context_line":"            return"},{"line_number":475,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a629dbe_1a6779eb","line":472,"range":{"start_line":471,"start_character":20,"end_line":472,"end_character":55},"updated":"2016-11-13 07:05:47.000000000","message":"nit:you use dif methods to got the chassis id and ip, some place use self.local_chassis.get_id() which here you use self.local_chassis.chassis[\u0027id\u0027], it\u0027s better to uniform them:)","commit_id":"52523fa2cddf76fe8b4cd0dd5441fc9628653cf7"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"4a6d8d0434106d700856d0bbb235c0ce6c281032","unresolved":false,"context_lines":[{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        if chassis is None:"},{"line_number":470,"context_line":"            self.nb_api.add_chassis("},{"line_number":471,"context_line":"                    self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":472,"context_line":"                    ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":473,"context_line":"                    tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":474,"context_line":"            return"},{"line_number":475,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a629dbe_e6b5b931","line":472,"range":{"start_line":471,"start_character":20,"end_line":472,"end_character":55},"in_reply_to":"9a629dbe_1a6779eb","updated":"2016-11-14 13:06:52.000000000","message":"Done.","commit_id":"52523fa2cddf76fe8b4cd0dd5441fc9628653cf7"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"5a766a28defc3356db688715c9c87946c804b55e","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            return"},{"line_number":475,"context_line":"        if not chassis \u003d\u003d self.local_chassis:"},{"line_number":476,"context_line":"            self.nb_api.update_chassis("},{"line_number":477,"context_line":"                    self.local_chassis.chassis[\u0027id\u0027],"},{"line_number":478,"context_line":"                    ip\u003dself.local_chassis.chassis[\u0027ip\u0027],"},{"line_number":479,"context_line":"                    tunnel_type\u003dself.local_chassis.chassis[\u0027tunnel_type\u0027])"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"    def create_tunnels(self):"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a629dbe_5a61f1d2","line":478,"range":{"start_line":477,"start_character":20,"end_line":478,"end_character":56},"updated":"2016-11-13 07:05:47.000000000","message":"ditto","commit_id":"52523fa2cddf76fe8b4cd0dd5441fc9628653cf7"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            res.append(Chassis(entry_value))"},{"line_number":355,"context_line":"        return res"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def add_chassis(self, chassis):"},{"line_number":358,"context_line":"        chassis_json \u003d jsonutils.dumps(chassis)"},{"line_number":359,"context_line":"        self.driver.create_key(\u0027chassis\u0027, chassis[\u0027id\u0027], chassis_json, None)"},{"line_number":360,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_331f1e5c","line":357,"range":{"start_line":357,"start_character":0,"end_line":357,"end_character":35},"updated":"2016-09-18 14:52:08.000000000","message":"You have changed the API here, and it is different from the rest of the methods in this class. Please explain why.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            res.append(Chassis(entry_value))"},{"line_number":355,"context_line":"        return res"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def add_chassis(self, chassis):"},{"line_number":358,"context_line":"        chassis_json \u003d jsonutils.dumps(chassis)"},{"line_number":359,"context_line":"        self.driver.create_key(\u0027chassis\u0027, chassis[\u0027id\u0027], chassis_json, None)"},{"line_number":360,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_549410e1","line":357,"range":{"start_line":357,"start_character":0,"end_line":357,"end_character":35},"in_reply_to":"7a8ec9b2_331f1e5c","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        chassis_json \u003d jsonutils.dumps(chassis)"},{"line_number":359,"context_line":"        self.driver.create_key(\u0027chassis\u0027, chassis[\u0027id\u0027], chassis_json, None)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def update_chassis(self, chassis):"},{"line_number":362,"context_line":"        chassis_json \u003d self.driver.get_key(\u0027chassis\u0027, chassis.get(\u0027id\u0027))"},{"line_number":363,"context_line":"        ch \u003d jsonutils.loads(chassis_json)"},{"line_number":364,"context_line":"        for col, val in chassis.items():"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_5322eaa3","line":361,"updated":"2016-09-18 14:52:08.000000000","message":"Same here","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        chassis_json \u003d jsonutils.dumps(chassis)"},{"line_number":359,"context_line":"        self.driver.create_key(\u0027chassis\u0027, chassis[\u0027id\u0027], chassis_json, None)"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def update_chassis(self, chassis):"},{"line_number":362,"context_line":"        chassis_json \u003d self.driver.get_key(\u0027chassis\u0027, chassis.get(\u0027id\u0027))"},{"line_number":363,"context_line":"        ch \u003d jsonutils.loads(chassis_json)"},{"line_number":364,"context_line":"        for col, val in chassis.items():"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_748f4ccc","line":361,"in_reply_to":"7a8ec9b2_5322eaa3","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        return False"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":"    def __ne__(self, other):"},{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_d0a4304c","line":794,"updated":"2016-09-18 14:52:08.000000000","message":"Don\u0027t use __eq__. Use \u003d\u003d instead.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        return False"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":"    def __ne__(self, other):"},{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_7402ec0c","line":794,"in_reply_to":"7a8ec9b2_d0a4304c","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_907548cc","line":797,"range":{"start_line":797,"start_character":25,"end_line":797,"end_character":26},"updated":"2016-09-18 14:52:08.000000000","message":"IIRC, I think this needs to be %r. %s gives str representation. %r gives repr representation.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_8fff6100","line":797,"range":{"start_line":797,"start_character":25,"end_line":797,"end_character":26},"in_reply_to":"7a8ec9b2_907548cc","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_106938f9","line":800,"updated":"2016-09-18 14:52:08.000000000","message":"Don\u0027t use __repr__. Call repr(self) instead.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_cf09692e","line":800,"in_reply_to":"7a8ec9b2_106938f9","updated":"2016-09-21 00:30:31.000000000","message":"Done","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":793,"context_line":"    def __ne__(self, other):"},{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_df999b7a","line":800,"range":{"start_line":796,"start_character":0,"end_line":800,"end_character":36},"updated":"2016-09-19 01:17:47.000000000","message":"I guess you add these code is because you want to use chassis as set element. And as a result, you use unicode string as key to make the hash the same.\n\nI would suggest just not to use set operatiors (+ -), and just use 2 lists to compare the difference.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":793,"context_line":"    def __ne__(self, other):"},{"line_number":794,"context_line":"        return (not self.__eq__(other))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def __repr__(self):"},{"line_number":797,"context_line":"        return \"Chassis(%s)\" % (self.chassis)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    def __hash__(self):"},{"line_number":800,"context_line":"        return hash(self.__repr__())"},{"line_number":801,"context_line":""},{"line_number":802,"context_line":""},{"line_number":803,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_afca5d18","line":800,"range":{"start_line":796,"start_character":0,"end_line":800,"end_character":36},"in_reply_to":"7a8ec9b2_df999b7a","updated":"2016-09-21 08:53:53.000000000","message":"yes, I add these method to use set operations. And two lists can work, too. But using set operations is easier to read the code. If we use two lists, I think the code would be like:\n        for chassis in self.nb_api.get_all_chassis():\n            if chassis.get_id() in tunnel_ports:\n              if chassis \u003d\u003d tunnel_ports[chassis.get_id()]:\n                    del tunnel_ports[chassis.get_id()]\n              else\n                    delete_port\n                    add_port\n                    del tunnel_ports[chassis.get_id()]\n            elif can_be_added:\n                add_port\n                del tunnel_ports[chassis.get_id()]\n\n        # Iterate all tunnel ports that needs to be deleted\n        for port in tunnel_ports.values():\n            delete_port(port).execute()","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"b9eeb5ac4f5ec9b0ceacaa9a97e0e0eede6df4d9","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.publisher \u003d None"},{"line_number":51,"context_line":"        self.subscriber \u003d None"},{"line_number":52,"context_line":"        self.is_neutron_server \u003d is_neutron_server"},{"line_number":53,"context_line":"        self.db_table_monitors \u003d None"},{"line_number":54,"context_line":"        self.enable_selective_topo_dist \u003d \\"},{"line_number":55,"context_line":"            cfg.CONF.df.enable_selective_topology_distribution"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_14a1f7a9","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":37},"updated":"2016-09-22 12:59:54.000000000","message":"duplicated code","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"e84b1f2f3026f02d80b4456e05fef3dda7433d27","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.publisher \u003d None"},{"line_number":51,"context_line":"        self.subscriber \u003d None"},{"line_number":52,"context_line":"        self.is_neutron_server \u003d is_neutron_server"},{"line_number":53,"context_line":"        self.db_table_monitors \u003d None"},{"line_number":54,"context_line":"        self.enable_selective_topo_dist \u003d \\"},{"line_number":55,"context_line":"            cfg.CONF.df.enable_selective_topology_distribution"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_d3c0257f","line":53,"range":{"start_line":53,"start_character":8,"end_line":53,"end_character":37},"in_reply_to":"5a8bc5a2_14a1f7a9","updated":"2016-09-24 03:08:05.000000000","message":"Done","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a2b37c42131e934261663030aea3969c1a88d761","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    def __ne__(self, other):"},{"line_number":793,"context_line":"        return not self \u003d\u003d other"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def __repr__(self):"},{"line_number":796,"context_line":"        return \"Chassis(%r)\" % unicode(self.chassis)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def __hash__(self):"},{"line_number":799,"context_line":"        return hash(repr(self))"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_845bb12d","line":799,"range":{"start_line":795,"start_character":0,"end_line":799,"end_character":31},"updated":"2016-09-24 07:32:00.000000000","message":"I still think it is necessary and even dangerous to use chassis this way. The set element should be immutable. But that is not true for chassis, as it might be changed. This might change the nature of set, which will contain unique element. And the potential issue will be very hard to identify.\n\nAlthough you don\u0027t change the chassis in a set in this patch, chassis is a widely used resource. There is on way to prevent others use it improperly in future.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f7bb35731120c80b191c619706f439b265443030","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    def __ne__(self, other):"},{"line_number":793,"context_line":"        return not self \u003d\u003d other"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def __repr__(self):"},{"line_number":796,"context_line":"        return \"Chassis(%r)\" % unicode(self.chassis)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def __hash__(self):"},{"line_number":799,"context_line":"        return hash(repr(self))"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_db5aa6f1","line":799,"range":{"start_line":795,"start_character":0,"end_line":799,"end_character":31},"in_reply_to":"1a95cdbc_d9e789e2","updated":"2016-10-09 09:33:09.000000000","message":"I understand your point. And I am OK with current solution if you prefer it.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"99ba77116b9ed6596612aa54a5cc8cebce892077","unresolved":false,"context_lines":[{"line_number":792,"context_line":"    def __ne__(self, other):"},{"line_number":793,"context_line":"        return not self \u003d\u003d other"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def __repr__(self):"},{"line_number":796,"context_line":"        return \"Chassis(%r)\" % unicode(self.chassis)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def __hash__(self):"},{"line_number":799,"context_line":"        return hash(repr(self))"},{"line_number":800,"context_line":""},{"line_number":801,"context_line":""},{"line_number":802,"context_line":"class LogicalSwitch(DbStoreObject):"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_d9e789e2","line":799,"range":{"start_line":795,"start_character":0,"end_line":799,"end_character":31},"in_reply_to":"5a8bc5a2_845bb12d","updated":"2016-10-06 00:53:59.000000000","message":"I agree that elements in a set should be immutable. But I think chassis info hardly changes and the chassis object should be read-only. So what if I make Chassis a read-only object?","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"d43a224d14243e6bdf6bd8c63277fdff78a8a753","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        for col, val in columns.items():"},{"line_number":378,"context_line":"            ch[col] \u003d val"},{"line_number":379,"context_line":"        chassis_json \u003d jsonutils.dumps(ch)"},{"line_number":380,"context_line":"        self.driver.set_key(\u0027chassis\u0027, ch[\u0027id\u0027], chassis_json)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def get_lswitch(self, id, topic\u003dNone):"},{"line_number":383,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_e0467dbe","line":380,"range":{"start_line":380,"start_character":39,"end_line":380,"end_character":47},"updated":"2016-10-27 08:47:28.000000000","message":"use \"id\" directly","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"4d97378b31eb084470e5bdedca649bfbfdfa599e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        for col, val in columns.items():"},{"line_number":378,"context_line":"            ch[col] \u003d val"},{"line_number":379,"context_line":"        chassis_json \u003d jsonutils.dumps(ch)"},{"line_number":380,"context_line":"        self.driver.set_key(\u0027chassis\u0027, ch[\u0027id\u0027], chassis_json)"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def get_lswitch(self, id, topic\u003dNone):"},{"line_number":383,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_6607b01c","line":380,"range":{"start_line":380,"start_character":39,"end_line":380,"end_character":47},"in_reply_to":"ba5da102_e0467dbe","updated":"2016-10-30 14:10:51.000000000","message":"Done","commit_id":"40ddf907ec1989d997b55b73c95ad1435f73ddca"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        for col, val in columns.items():"},{"line_number":379,"context_line":"            ch[col] \u003d val"},{"line_number":380,"context_line":"        chassis_json \u003d jsonutils.dumps(ch)"},{"line_number":381,"context_line":"        self.driver.set_key(\u0027chassis\u0027, id, chassis_json)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def delete_chassis(self, id):"},{"line_number":384,"context_line":"        self.driver.delete_key(\u0027chassis\u0027, id)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_d2adc189","line":381,"updated":"2016-11-08 03:08:24.000000000","message":"I haven\u0027t tried this, but I have this doubt. If we don\u0027t call   self._send_db_change_event explicitly, how would other df controller get notified?","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"202816ec09e6724b414b3c0805188898ccd6fce1","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        for col, val in columns.items():"},{"line_number":379,"context_line":"            ch[col] \u003d val"},{"line_number":380,"context_line":"        chassis_json \u003d jsonutils.dumps(ch)"},{"line_number":381,"context_line":"        self.driver.set_key(\u0027chassis\u0027, id, chassis_json)"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def delete_chassis(self, id):"},{"line_number":384,"context_line":"        self.driver.delete_key(\u0027chassis\u0027, id)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_353187a3","line":381,"in_reply_to":"9a629dbe_d2adc189","updated":"2016-11-08 07:03:59.000000000","message":"Other controllers get notified via df-publisher-service, pls refer to https://review.openstack.org/#/c/391659/","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"}],"dragonflow/db/drivers/ovsdb_vswitch_impl.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        return self.chassis_id"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def get_remote_ip(self):"},{"line_number":316,"context_line":"        # FIXME: any other way to get the right interface ?"},{"line_number":317,"context_line":"        for itf in self.port_row.interfaces:"},{"line_number":318,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":319,"context_line":"                return itf.options[\u0027remote_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_53590a34","line":316,"updated":"2016-09-18 14:52:08.000000000","message":"Isn\u0027t there only one interface for this type of port?","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a853e9b7d61211e2984722db4fb849ed55d195fb","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        return self.chassis_id"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def get_remote_ip(self):"},{"line_number":316,"context_line":"        # FIXME: any other way to get the right interface ?"},{"line_number":317,"context_line":"        for itf in self.port_row.interfaces:"},{"line_number":318,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":319,"context_line":"                return itf.options[\u0027remote_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_9463f819","line":316,"in_reply_to":"7a8ec9b2_53590a34","updated":"2016-09-21 00:30:31.000000000","message":"Yes for now, but I am not sure if we will add another interface in the future.\nI am not sure this answers your question, if yes, I will documentation in method get_type","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"1b59d5f5c3b9f782d350f93d42ceb332360fa66c","unresolved":false,"context_lines":[{"line_number":321,"context_line":"    def get_type(self):"},{"line_number":322,"context_line":"        # FIXME: any other way to get the right interface ?"},{"line_number":323,"context_line":"        for itf in self.port_row.interfaces:"},{"line_number":324,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":325,"context_line":"                return itf.type"},{"line_number":326,"context_line":"        return"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_933f12b3","line":324,"updated":"2016-09-18 14:52:08.000000000","message":"This test seems strange here, since the \u0027remote_ip\u0027 key is not used later. I think at least documentation is needed, but first please review the comment on get_remote_ip.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    ],"},{"line_number":59,"context_line":"    \u0027Open_vSwitch\u0027: ["},{"line_number":60,"context_line":"        \u0027bridges\u0027,"},{"line_number":61,"context_line":"        \u0027cur_cfg\u0027,"},{"line_number":62,"context_line":"        \u0027next_cfg\u0027"},{"line_number":63,"context_line":"    ]"},{"line_number":64,"context_line":"}"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_005f0873","line":62,"range":{"start_line":61,"start_character":0,"end_line":62,"end_character":18},"updated":"2016-09-22 05:25:47.000000000","message":"Where are these columns used?","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"e84b1f2f3026f02d80b4456e05fef3dda7433d27","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    ],"},{"line_number":59,"context_line":"    \u0027Open_vSwitch\u0027: ["},{"line_number":60,"context_line":"        \u0027bridges\u0027,"},{"line_number":61,"context_line":"        \u0027cur_cfg\u0027,"},{"line_number":62,"context_line":"        \u0027next_cfg\u0027"},{"line_number":63,"context_line":"    ]"},{"line_number":64,"context_line":"}"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_33d4e91e","line":62,"range":{"start_line":61,"start_character":0,"end_line":62,"end_character":18},"in_reply_to":"5a8bc5a2_005f0873","updated":"2016-09-24 03:08:05.000000000","message":"https://review.openstack.org/#/c/369225/","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    def get_remote_ip(self):"},{"line_number":315,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":316,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":317,"context_line":"        # we have multiple interface in the future"},{"line_number":318,"context_line":"        for itf in self.port_row.interfaces:"},{"line_number":319,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":320,"context_line":"                return itf.options[\u0027remote_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_a05d74ee","line":317,"updated":"2016-09-22 05:25:47.000000000","message":"\u003e Yes for now, but I am not sure if we will add another interface in the future.\n\u003e I am not sure this answers your question, if yes, I will documentation in method get_type\n\nThen maybe we should wait with this logic until that happens:\n1. This code is complicated. More than necessary.\n2. We don\u0027t know what the interface records will look like (They may e.g. by prioritized, and then have to be sorted first).\n\nIf you still think selecting the interface in this way is better, please move the selection code to a separate function with the relevant documentation, e.g.\ndef _get_interface():\n    for itf in self.port_row.interfaces:\n        if \"remote_ip\" in itf.options:\n            return itf\n\nThis way it will be more contained.","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"47e58eac4db42f3020e138caa67c8033d2c4c22f","unresolved":false,"context_lines":[{"line_number":314,"context_line":"    def get_remote_ip(self):"},{"line_number":315,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":316,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":317,"context_line":"        # we have multiple interface in the future"},{"line_number":318,"context_line":"        for itf in self.port_row.interfaces:"},{"line_number":319,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":320,"context_line":"                return itf.options[\u0027remote_ip\u0027]"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_37afe8e4","line":317,"in_reply_to":"5a8bc5a2_a05d74ee","updated":"2016-09-22 08:02:48.000000000","message":"Done","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7155c444f570f57a7cbedc261c09f0a0cdd97a7b","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def get_chassis_id(self):"},{"line_number":307,"context_line":"        return self.chassis_id"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def get_remote_ip(self):"},{"line_number":310,"context_line":"        itf \u003d self._get_interface()"},{"line_number":311,"context_line":"        return itf.options[\u0027remote_ip\u0027]"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def get_type(self):"},{"line_number":314,"context_line":"        itf \u003d self._get_interface()"},{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_8f81f3c5","line":315,"range":{"start_line":309,"start_character":4,"end_line":315,"end_character":23},"updated":"2016-09-26 07:44:22.000000000","message":"the info has been stored in Chassis object, you can get them by the chassis_id here.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"99ba77116b9ed6596612aa54a5cc8cebce892077","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def get_chassis_id(self):"},{"line_number":307,"context_line":"        return self.chassis_id"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def get_remote_ip(self):"},{"line_number":310,"context_line":"        itf \u003d self._get_interface()"},{"line_number":311,"context_line":"        return itf.options[\u0027remote_ip\u0027]"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    def get_type(self):"},{"line_number":314,"context_line":"        itf \u003d self._get_interface()"},{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_b9639d40","line":315,"range":{"start_line":309,"start_character":4,"end_line":315,"end_character":23},"in_reply_to":"5a8bc5a2_8f81f3c5","updated":"2016-10-06 00:53:59.000000000","message":"I did not find we store this info anywhere, could you point out?","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a2b37c42131e934261663030aea3969c1a88d761","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":319,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":320,"context_line":"        # we have multiple interface in the future"},{"line_number":321,"context_line":"         for itf in self.port_row.interfaces:"},{"line_number":322,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":323,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_66214d9f","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":50},"updated":"2016-09-24 07:32:00.000000000","message":"I don\u0027t think there is a way in ovsdb or in neutron to query interface in ovsdb, which has \"something\" in its option.\n\nI think you could just put these the logic of _get_interface into get_tunnel_ports, it looks like it belongs there. The benefit is that the code don\u0027t have to iterate interfaces(although it is usually 1 interface) every time to get some tunnel specified attribute.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"f7bb35731120c80b191c619706f439b265443030","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":319,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":320,"context_line":"        # we have multiple interface in the future"},{"line_number":321,"context_line":"         for itf in self.port_row.interfaces:"},{"line_number":322,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":323,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_fb23e253","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":50},"in_reply_to":"1a95cdbc_59fd3939","updated":"2016-10-09 09:33:09.000000000","message":"get_remote_ip and get_type should be part of OvsdbTunnelPort. I mean you can just put the interface with remote_ip as one attribute of OvsdbTunnelPort. So you can just get the remote_ip and tunnel_type from it.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"73fcfa52bbb95b0ee499fc2e762adf9c831143e0","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":319,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":320,"context_line":"        # we have multiple interface in the future"},{"line_number":321,"context_line":"         for itf in self.port_row.interfaces:"},{"line_number":322,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":323,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":18,"id":"da6895a0_d07eb4ad","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":50},"in_reply_to":"1a95cdbc_fb23e253","updated":"2016-10-21 07:36:33.000000000","message":"good point","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"99ba77116b9ed6596612aa54a5cc8cebce892077","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        return itf.type"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def _get_interface(self):"},{"line_number":318,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":319,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":320,"context_line":"        # we have multiple interface in the future"},{"line_number":321,"context_line":"         for itf in self.port_row.interfaces:"},{"line_number":322,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":323,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a95cdbc_59fd3939","line":320,"range":{"start_line":318,"start_character":0,"end_line":320,"end_character":50},"in_reply_to":"5a8bc5a2_66214d9f","updated":"2016-10-06 00:53:59.000000000","message":"I am not sure I understand your point. Cloud you explain why it belongs to get_tunnel_ports ? and Do get_remote_ip and get_type belong there?","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"498846a1091a28cebaab327eabb9db8752a5dc2f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":20,"id":"da6895a0_15862c65","line":1,"updated":"2016-10-24 03:55:29.000000000","message":"This file has been moved to dragonflow/ovsdb/vswitch_impl.py\n\npls don\u0027t add it back :)","commit_id":"9e877806a930ada7b5d33668e1f3994bb889ece8"}],"dragonflow/db/models.py":[{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"63e253bb2969ac67fe7abcfb3542193a19dfc979","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        return str(self.ovs_port)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"class Chassis(DbStoreObject):"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    def __init__(self, value):"},{"line_number":426,"context_line":"        if isinstance(value, dict):"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a74a57a_9033d7aa","line":423,"range":{"start_line":423,"start_character":0,"end_line":423,"end_character":29},"updated":"2016-11-27 03:02:03.000000000","message":"it seems you rewrite the above objects.","commit_id":"a8ab238228084e138c630d1472514ae7de8c403c"}],"dragonflow/ovsdb/objects.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        return self.itf.get_tunnel_type()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _get_tunnel_interface(self, row):"},{"line_number":147,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":148,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":149,"context_line":"        # we have multiple interface in the future"},{"line_number":150,"context_line":"        for itf in row.interfaces:"},{"line_number":151,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":152,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_b2ce8d58","line":149,"range":{"start_line":147,"start_character":0,"end_line":149,"end_character":50},"updated":"2016-11-08 03:08:24.000000000","message":"Do we still need this fixme?","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"202816ec09e6724b414b3c0805188898ccd6fce1","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        return self.itf.get_tunnel_type()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _get_tunnel_interface(self, row):"},{"line_number":147,"context_line":"        # FIXME(wangjian): any other way to get the right interface ?"},{"line_number":148,"context_line":"        # For now we have only one interface in the row, here just in case"},{"line_number":149,"context_line":"        # we have multiple interface in the future"},{"line_number":150,"context_line":"        for itf in row.interfaces:"},{"line_number":151,"context_line":"            if \"remote_ip\" in itf.options:"},{"line_number":152,"context_line":"                return itf"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_d5f12bcf","line":149,"range":{"start_line":147,"start_character":0,"end_line":149,"end_character":50},"in_reply_to":"9a629dbe_b2ce8d58","updated":"2016-11-08 07:03:59.000000000","message":"I think so. It is wired to me to get the tunnel interface by check the string \u0027remote_ip\u0027","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"}],"dragonflow/tests/fullstack/test_chassis.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0b94d82aa2de1549eae75045cf752563ee12810f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        time.sleep(self.conf.monitor_table_poll_time * 2)"},{"line_number":35,"context_line":"        ret \u003d self._get_remote_tunnul_port("},{"line_number":36,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":37,"context_line":"        self.assertIsNotNone(ret)"},{"line_number":38,"context_line":"        self.assertEqual(ret.get_remote_ip(),"},{"line_number":39,"context_line":"                         self.remote_chassis.get(\u0027ip\u0027))"},{"line_number":40,"context_line":"        self.assertEqual(ret.get_type(),"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_727235e7","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":33},"updated":"2016-11-08 03:08:24.000000000","message":"This is where the fullstack fails, maybe it is because not explicitly call send_notification, or is it related to this patch ?\n\nhttps://review.openstack.org/#/c/391659/","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"202816ec09e6724b414b3c0805188898ccd6fce1","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        time.sleep(self.conf.monitor_table_poll_time * 2)"},{"line_number":35,"context_line":"        ret \u003d self._get_remote_tunnul_port("},{"line_number":36,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":37,"context_line":"        self.assertIsNotNone(ret)"},{"line_number":38,"context_line":"        self.assertEqual(ret.get_remote_ip(),"},{"line_number":39,"context_line":"                         self.remote_chassis.get(\u0027ip\u0027))"},{"line_number":40,"context_line":"        self.assertEqual(ret.get_type(),"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_95ced381","line":37,"range":{"start_line":37,"start_character":0,"end_line":37,"end_character":33},"in_reply_to":"9a629dbe_727235e7","updated":"2016-11-08 07:03:59.000000000","message":"yes, we need to enable df-publisher-service.","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"408202b6b70e97485dfd70fa20c31a5fd299b800","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":60,"context_line":"        self.assertIsNone(ret)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_remote_tunnul_port(self, chassis):"},{"line_number":63,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"},{"line_number":64,"context_line":"        for t_port in t_ports:"},{"line_number":65,"context_line":"            if t_port.get_chassis_id() \u003d\u003d self.remote_chassis.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_e2cd29b8","line":62,"range":{"start_line":62,"start_character":20,"end_line":62,"end_character":26},"updated":"2016-11-10 03:09:09.000000000","message":"tunnel","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c586f556dd6279c6d43ba63ab44bf64dd08826e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                            ip\u003dself.remote_chassis.get(\u0027ip\u0027),"},{"line_number":33,"context_line":"                            tunnel_type\u003dself.remote_chassis.get(\u0027tunnel_type\u0027))"},{"line_number":34,"context_line":"        time.sleep(self.conf.monitor_table_poll_time * 2)"},{"line_number":35,"context_line":"        ret \u003d self._get_remote_tunnul_port("},{"line_number":36,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":37,"context_line":"        self.assertIsNotNone(ret)"},{"line_number":38,"context_line":"        self.assertEqual(ret.get_remote_ip(),"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_4c77b601","line":35,"range":{"start_line":35,"start_character":31,"end_line":35,"end_character":37},"updated":"2016-11-11 02:08:07.000000000","message":"tunnel???","commit_id":"d84f81fe12e9fae3233942119da67c938b05d58a"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c586f556dd6279c6d43ba63ab44bf64dd08826e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                            ip\u003d\u00272.3.4.5\u0027,"},{"line_number":46,"context_line":"                            tunnel_type\u003dself.remote_chassis.get(\u0027tunnel_type\u0027))"},{"line_number":47,"context_line":"        time.sleep(self.conf.monitor_table_poll_time * 2)"},{"line_number":48,"context_line":"        ret \u003d self._get_remote_tunnul_port("},{"line_number":49,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":50,"context_line":"        self.assertIsNotNone(ret)"},{"line_number":51,"context_line":"        self.assertEqual(ret.get_remote_ip(), \u00272.3.4.5\u0027)"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_cc590690","line":48,"range":{"start_line":48,"start_character":31,"end_line":48,"end_character":37},"updated":"2016-11-11 02:08:07.000000000","message":"tunnel","commit_id":"d84f81fe12e9fae3233942119da67c938b05d58a"},{"author":{"_account_id":20287,"name":"hujie","email":"mike.hu@huawei.com","username":"hujie"},"change_message_id":"7c586f556dd6279c6d43ba63ab44bf64dd08826e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                self.remote_chassis.get(\u0027id\u0027))"},{"line_number":60,"context_line":"        self.assertIsNone(ret)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_remote_tunnul_port(self, chassis):"},{"line_number":63,"context_line":"        t_ports \u003d self.vswitch_api.get_tunnel_ports()"},{"line_number":64,"context_line":"        for t_port in t_ports:"},{"line_number":65,"context_line":"            if t_port.get_chassis_id() \u003d\u003d self.remote_chassis.get(\u0027id\u0027):"}],"source_content_type":"text/x-python","patch_set":32,"id":"9a629dbe_8c638e41","line":62,"range":{"start_line":62,"start_character":20,"end_line":62,"end_character":26},"updated":"2016-11-11 02:08:07.000000000","message":"ditto","commit_id":"d84f81fe12e9fae3233942119da67c938b05d58a"}],"dragonflow/tests/unit/test_app_base.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _cleanUp(self):"},{"line_number":62,"context_line":"        cfg.CONF.reset()"},{"line_number":63,"context_line":"        self.app_manager.stop()"},{"line_number":64,"context_line":"        self.arp_response.stop()"},{"line_number":65,"context_line":"        self.mod_flow.stop()"},{"line_number":66,"context_line":"        self.add_flow_go_to.stop()"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_e0aa1c85","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":32},"updated":"2016-09-22 05:25:47.000000000","message":"Where are these two attributes defined?","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"e84b1f2f3026f02d80b4456e05fef3dda7433d27","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _cleanUp(self):"},{"line_number":62,"context_line":"        cfg.CONF.reset()"},{"line_number":63,"context_line":"        self.app_manager.stop()"},{"line_number":64,"context_line":"        self.arp_response.stop()"},{"line_number":65,"context_line":"        self.mod_flow.stop()"},{"line_number":66,"context_line":"        self.add_flow_go_to.stop()"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_b3cf197e","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":32},"in_reply_to":"5a8bc5a2_e0aa1c85","updated":"2016-09-24 03:08:05.000000000","message":"Done","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a2b37c42131e934261663030aea3969c1a88d761","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _cleanUp(self):"},{"line_number":63,"context_line":"        cfg.CONF.reset()"},{"line_number":64,"context_line":"        self.app_manager.stop()"},{"line_number":65,"context_line":"        self.arp_responder.stop()"},{"line_number":66,"context_line":"        self.mod_flow.stop()"},{"line_number":67,"context_line":"        self.add_flow_go_to.stop()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"fake_logic_router1 \u003d api_nb.LogicalRouter(\"{}\")"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a8bc5a2_09033a10","line":67,"range":{"start_line":64,"start_character":0,"end_line":67,"end_character":33},"updated":"2016-09-24 07:32:00.000000000","message":"You should stop the pather, not the instance of patcher.stop. That is meaningless.","commit_id":"6ca87894c1fed7d8333cc3c59a28016065a91013"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _cleanUp(self):"},{"line_number":63,"context_line":"        cfg.CONF.reset()"},{"line_number":64,"context_line":"        self.app_manager.stop()"},{"line_number":65,"context_line":"        self.arp_responder.stop()"},{"line_number":66,"context_line":"        self.mod_flow.stop()"},{"line_number":67,"context_line":"        self.add_flow_go_to.stop()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"fake_logic_router1 \u003d api_nb.LogicalRouter(\"{}\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_b2220db8","line":67,"range":{"start_line":64,"start_character":0,"end_line":67,"end_character":34},"updated":"2016-11-08 03:19:18.000000000","message":"You should stop the pather, not the instance of patcher.start. That is meaningless. Do something like this:\n*****setUp******\nself.mod_flow_p \u003d mock.patch(\u0027dragonflow.controller.df_base_app.DFlowApp.mod_flow\u0027)\nself.mod_flow_p.start()\n\n*****cleanUp*****\nself.mod_flow_p.stop()","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"202816ec09e6724b414b3c0805188898ccd6fce1","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _cleanUp(self):"},{"line_number":63,"context_line":"        cfg.CONF.reset()"},{"line_number":64,"context_line":"        self.app_manager.stop()"},{"line_number":65,"context_line":"        self.arp_responder.stop()"},{"line_number":66,"context_line":"        self.mod_flow.stop()"},{"line_number":67,"context_line":"        self.add_flow_go_to.stop()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"fake_logic_router1 \u003d api_nb.LogicalRouter(\"{}\")"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_01b7e539","line":67,"range":{"start_line":64,"start_character":0,"end_line":67,"end_character":34},"in_reply_to":"9a629dbe_b2220db8","updated":"2016-11-08 07:03:59.000000000","message":"Done","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"}],"dragonflow/tests/unit/test_controller.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(TestDfController, self).setUp()"},{"line_number":30,"context_line":"        dispatcher.AppDispatcher \u003d mock.Mock()"},{"line_number":31,"context_line":"        db_store.DbStore \u003d mock.Mock()"},{"line_number":32,"context_line":"        #cfg.CONF \u003d mock.Mock()"},{"line_number":33,"context_line":"        cfg.CONF.df.local_ip \u003d \u0027192.168.202.10\u0027"},{"line_number":34,"context_line":"        cfg.CONF.df.tunnel_type \u003d \u0027vxlan\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_716d29cb","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":38},"updated":"2016-09-18 01:13:58.000000000","message":"Pls don\u0027t make global mock. This will cause error when other UT want to use the same class.","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d92aa61008aa09ae534b653867ea202b911e8d58","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.controller.nb_api.get_chassis \u003d mock.Mock("},{"line_number":67,"context_line":"                                             return_value\u003dlocal_chassis)"},{"line_number":68,"context_line":"        self.controller.register_chassis()"},{"line_number":69,"context_line":"        self.controller.nb_api.add_chassis.assert_not_called()"},{"line_number":70,"context_line":"        self.controller.nb_api.update_chassis.assert_not_called()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_chassis_can_be_added(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_f16139d4","line":69,"range":{"start_line":69,"start_character":43,"end_line":69,"end_character":60},"updated":"2016-09-18 01:13:58.000000000","message":"You can use assertFalse(self.controller.nb_api.add_chassis.called)","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"a602cffaf32ac9de0932333fa9fe2beb1e9c2e46","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        self.controller.nb_api.get_chassis \u003d mock.Mock("},{"line_number":67,"context_line":"                                             return_value\u003dlocal_chassis)"},{"line_number":68,"context_line":"        self.controller.register_chassis()"},{"line_number":69,"context_line":"        self.controller.nb_api.add_chassis.assert_not_called()"},{"line_number":70,"context_line":"        self.controller.nb_api.update_chassis.assert_not_called()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_chassis_can_be_added(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_2aa40306","line":69,"range":{"start_line":69,"start_character":43,"end_line":69,"end_character":60},"in_reply_to":"7a8ec9b2_f16139d4","updated":"2016-09-18 14:35:42.000000000","message":"what is the difference?","commit_id":"3ea63b824328977686b25f300026f57f129b2d4a"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"76eed5ad04749314e98b8b9db8c4ed69763de959","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(TestDfController, self).setUp()"},{"line_number":30,"context_line":"        dispatcher.AppDispatcher \u003d mock.Mock()"},{"line_number":31,"context_line":"        db_store.DbStore \u003d mock.Mock()"},{"line_number":32,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027,"},{"line_number":33,"context_line":"                              \u0027192.168.202.10\u0027,"},{"line_number":34,"context_line":"                              \u0027df\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_5f84ab09","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":38},"updated":"2016-09-19 01:17:47.000000000","message":"Again, pls avoid fake class globally, you could take https://review.openstack.org/#/c/371938/ as example.","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"8309bd7bc47b15b4a9c3392f8dfd39c29d19a92c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(TestDfController, self).setUp()"},{"line_number":30,"context_line":"        dispatcher.AppDispatcher \u003d mock.Mock()"},{"line_number":31,"context_line":"        db_store.DbStore \u003d mock.Mock()"},{"line_number":32,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027,"},{"line_number":33,"context_line":"                              \u0027192.168.202.10\u0027,"},{"line_number":34,"context_line":"                              \u0027df\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a8ec9b2_0f6ef12e","line":31,"range":{"start_line":30,"start_character":0,"end_line":31,"end_character":38},"in_reply_to":"7a8ec9b2_5f84ab09","updated":"2016-09-21 08:53:53.000000000","message":"Done","commit_id":"41e4c7092372dbdf19ef7a82360669d094175303"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"aa548fd1a993fd481e7f8b054a565c78f4717fdd","unresolved":false,"context_lines":[{"line_number":21,"context_line":"class TestDfController(test_app_base.DFAppTestBase):"},{"line_number":22,"context_line":"    # we don\u0027t use this app, but it fails to create df controller"},{"line_number":23,"context_line":"    # with a empty apps list"},{"line_number":24,"context_line":"    apps_list \u003d \u0027l2_app.L2App\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027,  \u0027192.168.202.10\u0027, \u0027df\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_c08c4038","line":24,"updated":"2016-09-22 05:25:47.000000000","message":"I think this test should also apply to l2_ml2_app.\n\nActually, I don\u0027t understand why this test is a DFAppTest? The test here is for the controller. Please explain where l2 app is used?","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"47e58eac4db42f3020e138caa67c8033d2c4c22f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"class TestDfController(test_app_base.DFAppTestBase):"},{"line_number":22,"context_line":"    # we don\u0027t use this app, but it fails to create df controller"},{"line_number":23,"context_line":"    # with a empty apps list"},{"line_number":24,"context_line":"    apps_list \u003d \u0027l2_app.L2App\u0027"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"},{"line_number":27,"context_line":"        cfg.CONF.set_override(\u0027local_ip\u0027,  \u0027192.168.202.10\u0027, \u0027df\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a8bc5a2_9748bc5d","line":24,"in_reply_to":"5a8bc5a2_c08c4038","updated":"2016-09-22 08:02:48.000000000","message":"As my comments in line 22,23 said, the l2 app is not used but to make the controller happy.","commit_id":"2df7dc1e8b4021ee9831310071e2ea563b3d4fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        old_local_chassis \u003d api_nb.Chassis(old_chassis)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.controller.nb_api.get_chassis \u003d mock.Mock(return_value\u003dNone)"},{"line_number":42,"context_line":"        self.controller.nb_api.add_chassis \u003d mock.Mock()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # add local chassis to df-db"},{"line_number":45,"context_line":"        self.controller.register_chassis()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_15ff2302","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":56},"updated":"2016-11-08 03:19:18.000000000","message":"This is actually not required, a mock object\u0027s attribute should already be a mock object.","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"202816ec09e6724b414b3c0805188898ccd6fce1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        old_local_chassis \u003d api_nb.Chassis(old_chassis)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.controller.nb_api.get_chassis \u003d mock.Mock(return_value\u003dNone)"},{"line_number":42,"context_line":"        self.controller.nb_api.add_chassis \u003d mock.Mock()"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # add local chassis to df-db"},{"line_number":45,"context_line":"        self.controller.register_chassis()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_556d1b03","line":42,"range":{"start_line":42,"start_character":7,"end_line":42,"end_character":56},"in_reply_to":"9a629dbe_15ff2302","updated":"2016-11-08 07:03:59.000000000","message":"Done","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        new_chassis \u003d api_nb.Chassis(_new_chassis)"},{"line_number":101,"context_line":"        ip_changed_chassis \u003d api_nb.Chassis(_ip_changed_chassis)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        self.vswitch_api.OvsdbTunnelPort \u003d mock.Mock("},{"line_number":104,"context_line":"                                        side_effect\u003d[mock.Mock(), mock.Mock()])"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        t_port1 \u003d self.vswitch_api.OvsdbTunnelPort()"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_35798794","line":103,"range":{"start_line":103,"start_character":25,"end_line":103,"end_character":40},"updated":"2016-11-08 03:19:18.000000000","message":"OvsdbTunnelPort has been changed to another module.","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        self.vswitch_api.OvsdbTunnelPort \u003d mock.Mock("},{"line_number":136,"context_line":"                          side_effect\u003d[mock.Mock(), mock.Mock(), mock.Mock()])"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        t_port_existed \u003d self.vswitch_api.OvsdbTunnelPort()"},{"line_number":139,"context_line":"        t_port_existed.get_chassis_id \u003d mock.Mock(return_value\u003d\u0027chassis1\u0027)"},{"line_number":140,"context_line":"        t_port_existed.get_remote_ip \u003d mock.Mock("},{"line_number":141,"context_line":"                                            return_value\u003d\u0027192.168.202.205\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_7573ffb1","line":138,"range":{"start_line":138,"start_character":42,"end_line":138,"end_character":57},"updated":"2016-11-08 03:19:18.000000000","message":"ditto","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        t_port_updated.get_type \u003d mock.Mock(return_value\u003d\u0027vxlan\u0027)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        t_ports \u003d list([t_port_existed, t_port_deleted, t_port_updated])"},{"line_number":157,"context_line":"        self.controller.vswitch_api \u003d mock.Mock()"},{"line_number":158,"context_line":"        self.controller.vswitch_api.get_tunnel_ports \u003d mock.Mock("},{"line_number":159,"context_line":"                                            return_value\u003dt_ports)"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_159ba3ca","line":157,"range":{"start_line":157,"start_character":8,"end_line":157,"end_character":49},"updated":"2016-11-08 03:19:18.000000000","message":"This has already been done in super class","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b8b518509dca8edf36339931f8fff3b5da7d36d9","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        self.controller.nb_api.get_all_chassis \u003d mock.Mock("},{"line_number":175,"context_line":"             return_value\u003d[existed_chassis, new_chassis, ip_changed_chassis])"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self.controller.vswitch_api.delete_port \u003d mock.Mock()"},{"line_number":178,"context_line":"        self.controller.vswitch_api.add_tunnel_port \u003d mock.Mock()"},{"line_number":179,"context_line":"        self.controller.create_tunnels()"},{"line_number":180,"context_line":"        self.controller.vswitch_api.delete_port.assert_has_calls("},{"line_number":181,"context_line":"                     [mock.call(t_port_updated), mock.call(t_port_deleted)],"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a629dbe_95afb3e2","line":178,"range":{"start_line":177,"start_character":0,"end_line":178,"end_character":65},"updated":"2016-11-08 03:19:18.000000000","message":"see comment above","commit_id":"54db8f14bf48e39ae12912a3a597c19278c81c7b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        local_chassis \u003d api_nb.Chassis(_local_chassis)"},{"line_number":79,"context_line":"        diff_tunnel_type \u003d api_nb.Chassis(_diff_type_chassis)"},{"line_number":80,"context_line":"        new_chassis \u003d api_nb.Chassis(_new_chassis)"},{"line_number":81,"context_line":"        self.assertFalse(self.controller."},{"line_number":82,"context_line":"                         _tunnel_should_be_created(local_chassis))"},{"line_number":83,"context_line":"        self.assertFalse(self.controller."},{"line_number":84,"context_line":"                         _tunnel_should_be_created(diff_tunnel_type))"},{"line_number":85,"context_line":"        self.assertTrue(self.controller._tunnel_should_be_created(new_chassis))"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_b12c479a","line":82,"range":{"start_line":81,"start_character":0,"end_line":82,"end_character":66},"updated":"2016-11-10 13:23:29.000000000","message":"The preferred style will be:\n\n        self.assertFalse(\n            self.controller._tunnel_should_be_created(local_chassis))","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"abebb88a0c9602fe7436910e22226514bd95da66","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        local_chassis \u003d api_nb.Chassis(_local_chassis)"},{"line_number":79,"context_line":"        diff_tunnel_type \u003d api_nb.Chassis(_diff_type_chassis)"},{"line_number":80,"context_line":"        new_chassis \u003d api_nb.Chassis(_new_chassis)"},{"line_number":81,"context_line":"        self.assertFalse(self.controller."},{"line_number":82,"context_line":"                         _tunnel_should_be_created(local_chassis))"},{"line_number":83,"context_line":"        self.assertFalse(self.controller."},{"line_number":84,"context_line":"                         _tunnel_should_be_created(diff_tunnel_type))"},{"line_number":85,"context_line":"        self.assertTrue(self.controller._tunnel_should_be_created(new_chassis))"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_983923da","line":82,"range":{"start_line":81,"start_character":0,"end_line":82,"end_character":66},"in_reply_to":"9a629dbe_b12c479a","updated":"2016-11-10 13:58:14.000000000","message":"Done","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        new_chassis \u003d api_nb.Chassis(_new_chassis)"},{"line_number":81,"context_line":"        self.assertFalse(self.controller."},{"line_number":82,"context_line":"                         _tunnel_should_be_created(local_chassis))"},{"line_number":83,"context_line":"        self.assertFalse(self.controller."},{"line_number":84,"context_line":"                         _tunnel_should_be_created(diff_tunnel_type))"},{"line_number":85,"context_line":"        self.assertTrue(self.controller._tunnel_should_be_created(new_chassis))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_chassis_created(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_51320bf3","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":69},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"abebb88a0c9602fe7436910e22226514bd95da66","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        new_chassis \u003d api_nb.Chassis(_new_chassis)"},{"line_number":81,"context_line":"        self.assertFalse(self.controller."},{"line_number":82,"context_line":"                         _tunnel_should_be_created(local_chassis))"},{"line_number":83,"context_line":"        self.assertFalse(self.controller."},{"line_number":84,"context_line":"                         _tunnel_should_be_created(diff_tunnel_type))"},{"line_number":85,"context_line":"        self.assertTrue(self.controller._tunnel_should_be_created(new_chassis))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def test_chassis_created(self):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_b83267f0","line":84,"range":{"start_line":83,"start_character":0,"end_line":84,"end_character":69},"in_reply_to":"9a629dbe_51320bf3","updated":"2016-11-10 13:58:14.000000000","message":"Done","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        t_ports \u003d list([t_port1, t_port2])"},{"line_number":112,"context_line":"        self.controller.vswitch_api.get_tunnel_ports \u003d mock.Mock("},{"line_number":113,"context_line":"                                                       return_value\u003dt_ports)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        self.controller.chassis_created(existed_chassis)"},{"line_number":116,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_d1545bff","line":113,"range":{"start_line":113,"start_character":0,"end_line":113,"end_character":76},"updated":"2016-11-10 13:23:29.000000000","message":"the indention is not increased by 4 spaces","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        self.controller.chassis_created(new_chassis)"},{"line_number":119,"context_line":"        self.controller.vswitch_api.delete_port.assert_not_called()"},{"line_number":120,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_once_with("},{"line_number":121,"context_line":"                                                   new_chassis)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.controller.chassis_created(ip_changed_chassis)"},{"line_number":124,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_51492b5f","line":121,"range":{"start_line":121,"start_character":0,"end_line":121,"end_character":63},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        self.controller.chassis_created(ip_changed_chassis)"},{"line_number":124,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":125,"context_line":"                                                   t_port2)"},{"line_number":126,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_with("},{"line_number":127,"context_line":"                                                   ip_changed_chassis)"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_91758399","line":125,"range":{"start_line":125,"start_character":0,"end_line":125,"end_character":59},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        self.controller.vswitch_api.delete_port.assert_called_once_with("},{"line_number":125,"context_line":"                                                   t_port2)"},{"line_number":126,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_called_with("},{"line_number":127,"context_line":"                                                   ip_changed_chassis)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def test_create_tunnels(self):"},{"line_number":130,"context_line":"        t_port_existed \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_b17a8786","line":127,"range":{"start_line":127,"start_character":0,"end_line":127,"end_character":70},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        t_port_existed \u003d mock.Mock()"},{"line_number":131,"context_line":"        t_port_existed.get_chassis_id \u003d mock.Mock(return_value\u003d\u0027chassis1\u0027)"},{"line_number":132,"context_line":"        t_port_existed.get_remote_ip \u003d mock.Mock("},{"line_number":133,"context_line":"                                            return_value\u003d\u0027192.168.202.205\u0027)"},{"line_number":134,"context_line":"        t_port_existed.get_type \u003d mock.Mock(return_value\u003d\u0027vxlan\u0027)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        t_port_deleted \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_119893bf","line":133,"range":{"start_line":133,"start_character":0,"end_line":133,"end_character":75},"updated":"2016-11-10 13:23:29.000000000","message":"ditto, and you can actullay use this way:\n\nt_port_existed.get_remote_ip.return_value \u003d \u0027192.168.202.205\u0027","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":9044,"name":"Will","email":"wangjian.ika@bytedance.com","username":"Will"},"change_message_id":"abebb88a0c9602fe7436910e22226514bd95da66","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        t_port_existed \u003d mock.Mock()"},{"line_number":131,"context_line":"        t_port_existed.get_chassis_id \u003d mock.Mock(return_value\u003d\u0027chassis1\u0027)"},{"line_number":132,"context_line":"        t_port_existed.get_remote_ip \u003d mock.Mock("},{"line_number":133,"context_line":"                                            return_value\u003d\u0027192.168.202.205\u0027)"},{"line_number":134,"context_line":"        t_port_existed.get_type \u003d mock.Mock(return_value\u003d\u0027vxlan\u0027)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        t_port_deleted \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_b5b7d238","line":133,"range":{"start_line":133,"start_character":0,"end_line":133,"end_character":75},"in_reply_to":"9a629dbe_119893bf","updated":"2016-11-10 13:58:14.000000000","message":"thx, but to keep it consisten, I will remain return_value\u003dxxx\nI think the 4-space rule is optional for continuation lines, and this line and the following ones obey the 4-space rule.","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        t_port_deleted \u003d mock.Mock()"},{"line_number":137,"context_line":"        t_port_deleted.get_chassis_id \u003d mock.Mock(return_value\u003d\u0027chassis2\u0027)"},{"line_number":138,"context_line":"        t_port_deleted.get_remote_ip \u003d mock.Mock("},{"line_number":139,"context_line":"                                            return_value\u003d\u0027192.168.202.215\u0027)"},{"line_number":140,"context_line":"        t_port_deleted.get_type \u003d mock.Mock(return_value\u003d\u0027vxlan\u0027)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        t_port_updated \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_718b8f68","line":139,"range":{"start_line":139,"start_character":0,"end_line":139,"end_character":75},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        t_port_updated \u003d mock.Mock()"},{"line_number":143,"context_line":"        t_port_updated.get_chassis_id \u003d mock.Mock(return_value\u003d\u0027chassis3\u0027)"},{"line_number":144,"context_line":"        t_port_updated.get_remote_ip \u003d mock.Mock("},{"line_number":145,"context_line":"                                            return_value\u003d\u0027192.168.202.225\u0027)"},{"line_number":146,"context_line":"        t_port_updated.get_type \u003d mock.Mock(return_value\u003d\u0027vxlan\u0027)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        t_ports \u003d list([t_port_existed, t_port_deleted, t_port_updated])"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_f1f5dfec","line":145,"range":{"start_line":145,"start_character":0,"end_line":145,"end_character":75},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        t_ports \u003d list([t_port_existed, t_port_deleted, t_port_updated])"},{"line_number":149,"context_line":"        self.controller.vswitch_api.get_tunnel_ports \u003d mock.Mock("},{"line_number":150,"context_line":"                                            return_value\u003dt_ports)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        _existed_chassis \u003d {\"id\": \u0027chassis1\u0027,"},{"line_number":153,"context_line":"                            \"ip\": \u0027192.168.202.205\u0027,"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_91d1035a","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":65},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        self.controller.create_tunnels()"},{"line_number":169,"context_line":"        self.controller.vswitch_api.delete_port.assert_has_calls("},{"line_number":170,"context_line":"                     [mock.call(t_port_updated), mock.call(t_port_deleted)],"},{"line_number":171,"context_line":"                     any_order\u003dTrue)"},{"line_number":172,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_has_calls("},{"line_number":173,"context_line":"                     [mock.call(new_chassis), mock.call(ip_changed_chassis)],"},{"line_number":174,"context_line":"                     any_order\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_d13e1b8a","line":171,"range":{"start_line":170,"start_character":0,"end_line":171,"end_character":36},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"00fbaf7296083ebd344690dc57d28d34ff8cb09e","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                     [mock.call(t_port_updated), mock.call(t_port_deleted)],"},{"line_number":171,"context_line":"                     any_order\u003dTrue)"},{"line_number":172,"context_line":"        self.controller.vswitch_api.add_tunnel_port.assert_has_calls("},{"line_number":173,"context_line":"                     [mock.call(new_chassis), mock.call(ip_changed_chassis)],"},{"line_number":174,"context_line":"                     any_order\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a629dbe_5153ebe1","line":174,"range":{"start_line":173,"start_character":0,"end_line":174,"end_character":36},"updated":"2016-11-10 13:23:29.000000000","message":"ditto","commit_id":"9f3fc2a4a7394041ca54ad8f629e99ca6c1d9fd1"}]}
