)]}'
{"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3246689b5d64f5d86264d2f7c991bc87886e223c","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"                continue"},{"line_number":1062,"context_line":"            other_config \u003d cur_info[\u0027other_config\u0027]"},{"line_number":1063,"context_line":"            if (cur_info[\u0027tag\u0027] !\u003d lvm.vlan or"},{"line_number":1064,"context_line":"                    other_config.get(\u0027tag\u0027) !\u003d str(lvm.vlan)):"},{"line_number":1065,"context_line":"                other_config[\u0027tag\u0027] \u003d str(lvm.vlan)"},{"line_number":1066,"context_line":"                self.int_br.set_db_attribute("},{"line_number":1067,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_1d9602f2","line":1064,"range":{"start_line":1064,"start_character":47,"end_line":1064,"end_character":60},"updated":"2019-09-11 13:56:21.000000000","message":"Could we add a new \"str_vlan \u003d str(lvm.vlan)\" on the top of the \u0027if\u0027 conditions to save this str() call and next line str() call?","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"075660a8ce1e02579242a6513e272417dcd88386","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"                continue"},{"line_number":1062,"context_line":"            other_config \u003d cur_info[\u0027other_config\u0027]"},{"line_number":1063,"context_line":"            if (cur_info[\u0027tag\u0027] !\u003d lvm.vlan or"},{"line_number":1064,"context_line":"                    other_config.get(\u0027tag\u0027) !\u003d str(lvm.vlan)):"},{"line_number":1065,"context_line":"                other_config[\u0027tag\u0027] \u003d str(lvm.vlan)"},{"line_number":1066,"context_line":"                self.int_br.set_db_attribute("},{"line_number":1067,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_8ec5d65d","line":1064,"range":{"start_line":1064,"start_character":47,"end_line":1064,"end_character":60},"in_reply_to":"5faad753_1d9602f2","updated":"2019-09-11 17:58:06.000000000","message":"Agreed, it\u0027s better to invoke str() once.","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"452c28940d2c4981c631f286803baff6d6d5b2ae","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"},{"line_number":1069,"context_line":"                # Uninitialized port has tag set to []"},{"line_number":1070,"context_line":"                if cur_info[\u0027tag\u0027]:"},{"line_number":1071,"context_line":"                    self.int_br.uninstall_flows(in_port\u003dport.ofport)"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"    def _bind_devices(self, need_binding_ports):"},{"line_number":1074,"context_line":"        devices_up \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_fc63d6af","line":1071,"range":{"start_line":1071,"start_character":20,"end_line":1071,"end_character":68},"updated":"2019-09-12 06:49:49.000000000","message":"I know it is unrelated to this change, but I\u0027d like to say we should add a DEBUG or WARNING log for this. This may have side-effect on instance network traffic.","commit_id":"9655e9dde86b80bf2b91cb56a0280e0af91cca83"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"ca96379d853575405d70e495d29d4b8577553164","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"},{"line_number":1069,"context_line":"                # Uninitialized port has tag set to []"},{"line_number":1070,"context_line":"                if cur_info[\u0027tag\u0027]:"},{"line_number":1071,"context_line":"                    self.int_br.uninstall_flows(in_port\u003dport.ofport)"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"    def _bind_devices(self, need_binding_ports):"},{"line_number":1074,"context_line":"        devices_up \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_d7bef563","line":1071,"range":{"start_line":1071,"start_character":20,"end_line":1071,"end_character":68},"in_reply_to":"5faad753_fc63d6af","updated":"2019-09-12 10:17:04.000000000","message":"Maybe warning is more suitable. When restart ovs or create instance, we can not hit this code, it\u0027s an unnormal situation that needs to be noticed.\nWe should add this warning in a seperate commit.","commit_id":"9655e9dde86b80bf2b91cb56a0280e0af91cca83"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"277e07e4c0399b4f7e2901f2a29004053981005e","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"},{"line_number":1069,"context_line":"                # Uninitialized port has tag set to []"},{"line_number":1070,"context_line":"                if cur_info[\u0027tag\u0027]:"},{"line_number":1071,"context_line":"                    self.int_br.uninstall_flows(in_port\u003dport.ofport)"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"    def _bind_devices(self, need_binding_ports):"},{"line_number":1074,"context_line":"        devices_up \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_c7ca404e","line":1071,"range":{"start_line":1071,"start_character":32,"end_line":1071,"end_character":47},"updated":"2019-09-16 15:28:35.000000000","message":"I may repeat this request here, please add a log before this call:\nLOG.warning(\"Uninstall flows of ofport %s due to local vlan change.\", port.ofport)","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"d9b60125aa91a129f46cd58df98170b27849291c","unresolved":false,"context_lines":[{"line_number":1068,"context_line":"                    \"Port\", port.port_name, \"other_config\", other_config)"},{"line_number":1069,"context_line":"                # Uninitialized port has tag set to []"},{"line_number":1070,"context_line":"                if cur_info[\u0027tag\u0027]:"},{"line_number":1071,"context_line":"                    self.int_br.uninstall_flows(in_port\u003dport.ofport)"},{"line_number":1072,"context_line":""},{"line_number":1073,"context_line":"    def _bind_devices(self, need_binding_ports):"},{"line_number":1074,"context_line":"        devices_up \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_390a4926","line":1071,"range":{"start_line":1071,"start_character":32,"end_line":1071,"end_character":47},"in_reply_to":"3fa7e38b_c7ca404e","updated":"2019-09-17 11:20:20.000000000","message":"Done","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"}],"neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3246689b5d64f5d86264d2f7c991bc87886e223c","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        lvm \u003d mock.Mock()"},{"line_number":708,"context_line":"        lvm.vlan \u003d 1"},{"line_number":709,"context_line":"        self.agent.vlan_manager.mapping[\"net1\"] \u003d lvm"},{"line_number":710,"context_line":"        ovs_db_list1 \u003d [{\u0027name\u0027: \u0027tap1\u0027,"},{"line_number":711,"context_line":"                         \u0027tag\u0027: [],"},{"line_number":712,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027}},"},{"line_number":713,"context_line":"                        {\u0027name\u0027: \u0027tap2\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_fd8686db","line":710,"range":{"start_line":710,"start_character":19,"end_line":710,"end_character":20},"updated":"2019-09-11 13:56:21.000000000","message":"You can remove this mark to make this more easy to backport. IMO, \u0027ovs_db_list2\u0027 is enough to  illustrate the problem.","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"075660a8ce1e02579242a6513e272417dcd88386","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        lvm \u003d mock.Mock()"},{"line_number":708,"context_line":"        lvm.vlan \u003d 1"},{"line_number":709,"context_line":"        self.agent.vlan_manager.mapping[\"net1\"] \u003d lvm"},{"line_number":710,"context_line":"        ovs_db_list1 \u003d [{\u0027name\u0027: \u0027tap1\u0027,"},{"line_number":711,"context_line":"                         \u0027tag\u0027: [],"},{"line_number":712,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027}},"},{"line_number":713,"context_line":"                        {\u0027name\u0027: \u0027tap2\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_ffbe7563","line":710,"range":{"start_line":710,"start_character":19,"end_line":710,"end_character":20},"in_reply_to":"5faad753_fd8686db","updated":"2019-09-11 17:58:06.000000000","message":"thank you for your advice","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3246689b5d64f5d86264d2f7c991bc87886e223c","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"            int_br.reset_mock()"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_3d665e53","line":747,"range":{"start_line":747,"start_character":11,"end_line":747,"end_character":31},"updated":"2019-09-11 13:56:21.000000000","message":"After so many change, I may say why not add a new test case?","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"075660a8ce1e02579242a6513e272417dcd88386","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"            int_br.reset_mock()"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5faad753_0200d600","line":747,"range":{"start_line":747,"start_character":11,"end_line":747,"end_character":31},"in_reply_to":"5faad753_3d665e53","updated":"2019-09-11 17:58:06.000000000","message":"Another similar test case may be a little confused.","commit_id":"2249aa9619082c54677280c5073b566873507d9f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"452c28940d2c4981c631f286803baff6d6d5b2ae","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"            int_br.reset_mock()"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_dc05bac3","line":747,"range":{"start_line":747,"start_character":0,"end_line":747,"end_character":31},"updated":"2019-09-12 06:49:49.000000000","message":"This looks a bit strange, how about a new with statement?\n         with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:","commit_id":"9655e9dde86b80bf2b91cb56a0280e0af91cca83"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"ca96379d853575405d70e495d29d4b8577553164","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"            int_br.reset_mock()"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_6d096e2f","line":747,"range":{"start_line":747,"start_character":0,"end_line":747,"end_character":31},"in_reply_to":"5faad753_dc05bac3","updated":"2019-09-12 10:17:04.000000000","message":"Got your point. Another different invocation may look more reasonable.","commit_id":"9655e9dde86b80bf2b91cb56a0280e0af91cca83"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"64a9cfe9c934b8067b2aac94009441e35ecadbc0","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"        with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_38173548","line":747,"range":{"start_line":747,"start_character":8,"end_line":747,"end_character":63},"updated":"2019-09-12 10:28:36.000000000","message":"Dose it look more strange?","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cab204464490c8e669b73f16dff94cb6c0f6de18","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"        with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_2d1215b3","line":747,"in_reply_to":"3fa7e38b_a7ef04af","updated":"2019-09-16 16:36:46.000000000","message":"Dongcan is right, you should reset the mock but not mocking it again","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"277e07e4c0399b4f7e2901f2a29004053981005e","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"        with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_a7ef04af","line":747,"range":{"start_line":747,"start_character":8,"end_line":747,"end_character":63},"in_reply_to":"5faad753_38173548","updated":"2019-09-16 15:28:35.000000000","message":"Acctually you can move line 719-721, 728 729 and 734 735 to this here, it will make the test more easily to read, and it\u0027s more like a independent test case:\n\n        ovs_db_list2 \u003d [{\u0027name\u0027: \u0027tap4\u0027,\n                         \u0027tag\u0027: 1,\n                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]\n        vif_port4 \u003d mock.Mock()\n        vif_port4.port_name \u003d \u0027tap4\u0027\n        port_details2 \u003d [\n            {\u0027network_id\u0027: \u0027net1\u0027, \u0027vif_port\u0027: vif_port4}]\n        with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:\n            int_br.get_ports_attributes.return_value \u003d ovs_db_list2\n            self.agent._add_port_tag_info(port_details2)\n            int_br.set_db_attribute.assert_not_called()","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"6ce31b7cc852f2530653ab7b99732e68e908c685","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"        with mock.patch.object(self.agent, \u0027int_br\u0027) as int_br:"},{"line_number":748,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":749,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":750,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_66c4ec40","line":747,"range":{"start_line":747,"start_character":8,"end_line":747,"end_character":63},"in_reply_to":"5faad753_38173548","updated":"2019-09-16 12:41:21.000000000","message":"Why not use reset_mock here?","commit_id":"abb012a0f72391023d765adbdcd26bdad2adc8e4"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"6affaac0fc34c415460d43f33dfd2612b0dfc604","unresolved":false,"context_lines":[{"line_number":716,"context_line":"                       {\u0027name\u0027: \u0027tap3\u0027,"},{"line_number":717,"context_line":"                        \u0027tag\u0027: [],"},{"line_number":718,"context_line":"                        \u0027other_config\u0027: None}]"},{"line_number":719,"context_line":"        ovs_db_list2 \u003d [{\u0027name\u0027: \u0027tap4\u0027,"},{"line_number":720,"context_line":"                         \u0027tag\u0027: 1,"},{"line_number":721,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":722,"context_line":"        vif_port1 \u003d mock.Mock()"},{"line_number":723,"context_line":"        vif_port1.port_name \u003d \u0027tap1\u0027"},{"line_number":724,"context_line":"        vif_port2 \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_8bf515ce","line":721,"range":{"start_line":719,"start_character":8,"end_line":721,"end_character":79},"updated":"2019-09-18 04:06:17.000000000","message":"You may add a test to cover the case cur_info[\u0027tag\u0027] \u003d\u003d lvm.vlan but other_config.get(\u0027tag\u0027) !\u003d str_vlan, and then set ovs db with vlan tag 1, like the following?\n\n\novs_db_list3 \u003d [{\u0027name\u0027: \u0027tap5\u0027,\n                         \u0027tag\u0027: 1,\n                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00272\u0027, \u0027tag\u0027: \u00272\u0027}}]\n\nBut I\u0027m not sure this case can really occurs.","commit_id":"2c4e115cf2f36aa856fda75be2058086c12bf1f1"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"39cc89fce70f7b75dd6f9a0d184506832c993d78","unresolved":false,"context_lines":[{"line_number":716,"context_line":"                       {\u0027name\u0027: \u0027tap3\u0027,"},{"line_number":717,"context_line":"                        \u0027tag\u0027: [],"},{"line_number":718,"context_line":"                        \u0027other_config\u0027: None}]"},{"line_number":719,"context_line":"        ovs_db_list2 \u003d [{\u0027name\u0027: \u0027tap4\u0027,"},{"line_number":720,"context_line":"                         \u0027tag\u0027: 1,"},{"line_number":721,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":722,"context_line":"        vif_port1 \u003d mock.Mock()"},{"line_number":723,"context_line":"        vif_port1.port_name \u003d \u0027tap1\u0027"},{"line_number":724,"context_line":"        vif_port2 \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_6b7699db","line":721,"range":{"start_line":719,"start_character":8,"end_line":721,"end_character":79},"in_reply_to":"3fa7e38b_8bf515ce","updated":"2019-09-18 04:49:52.000000000","message":"Good idea. This may happen if someone manually modified the other_config :)  I will add it. Thanks.","commit_id":"2c4e115cf2f36aa856fda75be2058086c12bf1f1"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"23739f7b55ed2cdb014b0412d4908cdef82bdcd1","unresolved":false,"context_lines":[{"line_number":744,"context_line":"                 mock.call.set_db_attribute(\"Port\", \"tap3\","},{"line_number":745,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":746,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":747,"context_line":"            # Reset mock to check port with tag"},{"line_number":748,"context_line":"            int_br.reset_mock()"},{"line_number":749,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":750,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":751,"context_line":"            int_br.set_db_attribute.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_f6311eee","line":748,"range":{"start_line":747,"start_character":12,"end_line":748,"end_character":31},"updated":"2019-09-17 09:15:39.000000000","message":"I use reset_mock with a comment to make this test more clear. Thank you for all your advices.","commit_id":"2c4e115cf2f36aa856fda75be2058086c12bf1f1"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"2d954d8179528c73915d65a58cda7b9bf1a5b54a","unresolved":false,"context_lines":[{"line_number":738,"context_line":"                    \"other_config\", {\"tag\": \"1\"})]"},{"line_number":739,"context_line":"            int_br.assert_has_calls(set_db_attribute_calls, any_order\u003dTrue)"},{"line_number":740,"context_line":""},{"line_number":741,"context_line":"    def test_add_port_tag_info_with_tagged_ports(self):"},{"line_number":742,"context_line":"        lvm \u003d mock.Mock()"},{"line_number":743,"context_line":"        lvm.vlan \u003d 1"},{"line_number":744,"context_line":"        self.agent.vlan_manager.mapping[\"net1\"] \u003d lvm"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_9773f2e7","line":741,"range":{"start_line":741,"start_character":4,"end_line":741,"end_character":55},"updated":"2019-09-18 09:20:06.000000000","message":"I write a new test to check port with tag. As LIU Yulong said,  a new test is better :)","commit_id":"00004d7fba1e4740e08bc02104f78a25732da941"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"53e20e67f50de8269ce46c99b6c8c1a5cf898de7","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        ovs_db_list1 \u003d [{\u0027name\u0027: \u0027tap1\u0027,"},{"line_number":746,"context_line":"                         \u0027tag\u0027: 1,"},{"line_number":747,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":748,"context_line":"        ovs_db_list2 \u003d [{\u0027name\u0027: \u0027tap2\u0027,"},{"line_number":749,"context_line":"                         \u0027tag\u0027: 2,"},{"line_number":750,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":751,"context_line":"        vif_port1 \u003d mock.Mock()"},{"line_number":752,"context_line":"        vif_port1.port_name \u003d \u0027tap1\u0027"},{"line_number":753,"context_line":"        vif_port2 \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_7d3bb7d0","line":750,"range":{"start_line":748,"start_character":8,"end_line":750,"end_character":79},"updated":"2019-09-18 10:31:13.000000000","message":"Thanks for update, still need to cover the case I mentioned in PS5. \n\n\novs_db_list3 \u003d [{\u0027name\u0027: \u0027tap3\u0027,\n                         \u0027tag\u0027: 1,\n                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00272\u0027, \u0027tag\u0027: \u00272\u0027}}]","commit_id":"00004d7fba1e4740e08bc02104f78a25732da941"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"e20b0ac37864b6f524d1660671395174aa11cbd4","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        ovs_db_list1 \u003d [{\u0027name\u0027: \u0027tap1\u0027,"},{"line_number":746,"context_line":"                         \u0027tag\u0027: 1,"},{"line_number":747,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":748,"context_line":"        ovs_db_list2 \u003d [{\u0027name\u0027: \u0027tap2\u0027,"},{"line_number":749,"context_line":"                         \u0027tag\u0027: 2,"},{"line_number":750,"context_line":"                         \u0027other_config\u0027: {\u0027segmentation_id\u0027: \u00271\u0027, \u0027tag\u0027: \u00271\u0027}}]"},{"line_number":751,"context_line":"        vif_port1 \u003d mock.Mock()"},{"line_number":752,"context_line":"        vif_port1.port_name \u003d \u0027tap1\u0027"},{"line_number":753,"context_line":"        vif_port2 \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_a6c26984","line":750,"range":{"start_line":748,"start_character":8,"end_line":750,"end_character":79},"in_reply_to":"3fa7e38b_7d3bb7d0","updated":"2019-09-19 11:42:45.000000000","message":"Done","commit_id":"00004d7fba1e4740e08bc02104f78a25732da941"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"53e20e67f50de8269ce46c99b6c8c1a5cf898de7","unresolved":false,"context_lines":[{"line_number":761,"context_line":"            # Reset mock to check port with changed tag"},{"line_number":762,"context_line":"            int_br.reset_mock()"},{"line_number":763,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":764,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":765,"context_line":"            int_br.uninstall_flows.assert_called_once()"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_9d3d53bd","line":764,"range":{"start_line":764,"start_character":12,"end_line":764,"end_character":56},"updated":"2019-09-18 10:31:13.000000000","message":"It\u0027s better to assert the set_db_attribute has called.","commit_id":"00004d7fba1e4740e08bc02104f78a25732da941"},{"author":{"_account_id":28463,"name":"Zhangruochen","email":"zhangruochen@unionpay.com","username":"RoyKing"},"change_message_id":"e20b0ac37864b6f524d1660671395174aa11cbd4","unresolved":false,"context_lines":[{"line_number":761,"context_line":"            # Reset mock to check port with changed tag"},{"line_number":762,"context_line":"            int_br.reset_mock()"},{"line_number":763,"context_line":"            int_br.get_ports_attributes.return_value \u003d ovs_db_list2"},{"line_number":764,"context_line":"            self.agent._add_port_tag_info(port_details2)"},{"line_number":765,"context_line":"            int_br.uninstall_flows.assert_called_once()"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_4654d5ca","line":764,"range":{"start_line":764,"start_character":12,"end_line":764,"end_character":56},"in_reply_to":"3fa7e38b_9d3d53bd","updated":"2019-09-19 11:42:45.000000000","message":"OK, I will assert all of calls in sequence","commit_id":"00004d7fba1e4740e08bc02104f78a25732da941"}]}
