)]}'
{"neutron/agent/l3/agent.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"75c6ccd130c08b3edb260fe799edf9fecfde7e79","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                ri.disable_keepalived()"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def _process_external(self, ri):"},{"line_number":534,"context_line":"        existing_floating_ips \u003d set()"},{"line_number":535,"context_line":"        try:"},{"line_number":536,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":537,"context_line":"                self._process_external_gateway(ri)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_9093a4a2","line":534,"updated":"2015-01-22 03:43:19.000000000","message":"how about putting line  existing_floating_ips \u003d ri.floating_ips here?","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"871c1c5cc3b5602a3060847ade296be78d7a2f39","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                ri.disable_keepalived()"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"    def _process_external(self, ri):"},{"line_number":534,"context_line":"        existing_floating_ips \u003d set()"},{"line_number":535,"context_line":"        try:"},{"line_number":536,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":537,"context_line":"                self._process_external_gateway(ri)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_96c71c45","line":534,"in_reply_to":"1a930d6b_9093a4a2","updated":"2015-01-22 06:06:31.000000000","message":"Thank you yongsheng, I will update it in the next patch.","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"e7ea52736a382f60001fb8ad32ade16d463e78ba","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                if not ex_gw_port:"},{"line_number":542,"context_line":"                    return"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":545,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":546,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":547,"context_line":"                    self.create_dvr_fip_interfaces(ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_824ee794","line":544,"updated":"2015-01-22 15:27:54.000000000","message":"This line is redundant now. it should be eliminated.","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"528a1c51ff82ad125af73a2b39a3c9ff5ec1a2c8","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                if not ex_gw_port:"},{"line_number":542,"context_line":"                    return"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":545,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":546,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":547,"context_line":"                    self.create_dvr_fip_interfaces(ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_43514f0d","line":544,"in_reply_to":"1a930d6b_29350ff7","updated":"2015-01-23 02:26:19.000000000","message":"Done","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"149e4e076ad76b8cd50a1c18296f38f0af48c85f","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                if not ex_gw_port:"},{"line_number":542,"context_line":"                    return"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":545,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":546,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":547,"context_line":"                    self.create_dvr_fip_interfaces(ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_29350ff7","line":544,"in_reply_to":"1a930d6b_824ee794","updated":"2015-01-22 19:38:43.000000000","message":"+1","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"528a1c51ff82ad125af73a2b39a3c9ff5ec1a2c8","unresolved":false,"context_lines":[{"line_number":541,"context_line":"                if not ex_gw_port:"},{"line_number":542,"context_line":"                    return"},{"line_number":543,"context_line":""},{"line_number":544,"context_line":"                # Process SNAT/DNAT rules and addresses for floating IPs"},{"line_number":545,"context_line":"                existing_floating_ips \u003d ri.floating_ips"},{"line_number":546,"context_line":"                if ri.router[\u0027distributed\u0027]:"},{"line_number":547,"context_line":"                    self.create_dvr_fip_interfaces(ri, ex_gw_port)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_63580b33","line":544,"in_reply_to":"1a930d6b_824ee794","updated":"2015-01-23 02:26:19.000000000","message":"Done","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"79f35a39206d5565093b39466c04ecdc08f0f3b5","unresolved":false,"context_lines":[{"line_number":551,"context_line":"                ri.disable_keepalived()"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def _process_external(self, ri):"},{"line_number":554,"context_line":"        existing_floating_ips \u003d ri.floating_ips"},{"line_number":555,"context_line":"        try:"},{"line_number":556,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":557,"context_line":"                self._process_external_gateway(ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_01af1e95","line":554,"updated":"2015-01-23 19:52:51.000000000","message":"After looking at the related code, I found ri.floating_ips are used only by\n_process_external and _update_fip_statuses.\n- saving old value before doing something.\n- update it later by _update_fip_statues.\n\nHow about introducing a new attribute to RouterInfo, something like old_floating_ips. and _update_fip_statuses updates both of old_floating_ips and floating_ips.\nThus only _update_fip_statuses touches those attributes and the code would be easier to understand a bit.","commit_id":"62cf2963cf2ef25d7360d7c21e8a95e3022a4342"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"1e684be6ca1b158e838f31c54ae9e17a12f3485c","unresolved":false,"context_lines":[{"line_number":551,"context_line":"                ri.disable_keepalived()"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":"    def _process_external(self, ri):"},{"line_number":554,"context_line":"        existing_floating_ips \u003d ri.floating_ips"},{"line_number":555,"context_line":"        try:"},{"line_number":556,"context_line":"            with ri.iptables_manager.defer_apply():"},{"line_number":557,"context_line":"                self._process_external_gateway(ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_f80c78ef","line":554,"in_reply_to":"1a930d6b_01af1e95","updated":"2015-01-24 03:18:00.000000000","message":"Perhaps the RouterInfo changes are best done in https://review.openstack.org/#/c/142863 ?  I don\u0027t want to overload this bug fix with a functional change.","commit_id":"62cf2963cf2ef25d7360d7c21e8a95e3022a4342"}],"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"bc3b276bce5551f470d36d663a6b10a24e72dc0f","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.warn(_LW(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_750c6a43","line":389,"updated":"2015-01-22 03:34:32.000000000","message":"nit: I think we should LOG.exception instead.","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"871c1c5cc3b5602a3060847ade296be78d7a2f39","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.warn(_LW(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_5bd79dc1","line":389,"in_reply_to":"1a930d6b_750c6a43","updated":"2015-01-22 06:06:31.000000000","message":"Done","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"75c6ccd130c08b3edb260fe799edf9fecfde7e79","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.warn(_LW(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_90dac476","line":389,"in_reply_to":"1a930d6b_750c6a43","updated":"2015-01-22 03:43:19.000000000","message":"LOG.error(_LE(\u0027\u0027\u0027  ?","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"871c1c5cc3b5602a3060847ade296be78d7a2f39","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.warn(_LW(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a930d6b_7bdb79ed","line":389,"in_reply_to":"1a930d6b_90dac476","updated":"2015-01-22 06:06:31.000000000","message":"Done","commit_id":"e6439975f32a75bdb3feaea707eb03034b87a24e"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"149e4e076ad76b8cd50a1c18296f38f0af48c85f","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.error(_LE(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_291c2f77","line":389,"updated":"2015-01-22 19:38:43.000000000","message":"You want LOG.exception here. Then you don\u0027t have to save the exception to \u0027ex\u0027 just to log it.","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":11114,"name":"yalei wang","email":"yalei.wang@intel.com","username":"yalie"},"change_message_id":"528a1c51ff82ad125af73a2b39a3c9ff5ec1a2c8","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception as ex:"},{"line_number":389,"context_line":"                LOG.error(_LE(\u0027Error \"%(e)s\" happened during defer_apply_off\u0027),"},{"line_number":390,"context_line":"                        {\"e\": ex})"},{"line_number":391,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":392,"context_line":"                                                   \u0027tables rules\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_e376bb3d","line":389,"in_reply_to":"1a930d6b_291c2f77","updated":"2015-01-23 02:26:19.000000000","message":"Done, thankyou for your advice","commit_id":"798fa85f640649623c1848fbbb058462e6fca9ed"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2b2dae81c7ca3e17d7d5735a99e04564afddfd7a","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception:"},{"line_number":389,"context_line":"                LOG.exceptions(_LE(\u0027Error happened during defer_apply_off\u0027))"},{"line_number":390,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":391,"context_line":"                                                   \u0027tables rules\u0027)"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_9bde2010","line":389,"updated":"2015-01-23 16:46:58.000000000","message":"s/LOG.exceptions/LOG.exception\n\nnit: I would change the message to: \"Failed to apply iptables rules\"","commit_id":"62cf2963cf2ef25d7360d7c21e8a95e3022a4342"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"592e8b95be9865feaff45efcb52ddeaaf41e132b","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception:"},{"line_number":389,"context_line":"                LOG.exceptions(_LE(\u0027Error happened during defer_apply_off\u0027))"},{"line_number":390,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":391,"context_line":"                                                   \u0027tables rules\u0027)"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_dbd268d1","line":389,"in_reply_to":"1a930d6b_9bde2010","updated":"2015-01-23 16:55:54.000000000","message":"+1 to both Brian\u0027s suggestions.\n\nNote:  I guess this is the best alternative to exception chaining, which will not be available to us until python 3.","commit_id":"62cf2963cf2ef25d7360d7c21e8a95e3022a4342"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"79f35a39206d5565093b39466c04ecdc08f0f3b5","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            try:"},{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception:"},{"line_number":389,"context_line":"                LOG.exceptions(_LE(\u0027Error happened during defer_apply_off\u0027))"},{"line_number":390,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying ip \u0027"},{"line_number":391,"context_line":"                                                   \u0027tables rules\u0027)"},{"line_number":392,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a930d6b_a191ea48","line":389,"in_reply_to":"1a930d6b_dbd268d1","updated":"2015-01-23 19:52:51.000000000","message":"+1","commit_id":"62cf2963cf2ef25d7360d7c21e8a95e3022a4342"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6c5da71736a58b07a5063e405e5ea748e336350b","unresolved":false,"context_lines":[{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception:"},{"line_number":389,"context_line":"                LOG.exception(_LE(\u0027Failure applying iptables rules\u0027))"},{"line_number":390,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying \u0027"},{"line_number":391,"context_line":"                                                   \u0027iptables rules\u0027)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    def defer_apply_on(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_c443af6a","line":390,"updated":"2015-02-09 09:50:32.000000000","message":"nit: since the message is the same here and above, you could put it into a variable and reuse. Like:\n\nmsg \u003d _LE(\u0027Failure applying iptables rules\u0027)\nLOG.exception(msg)\nraise n_exc.IpTablesApplyException(msg)","commit_id":"1977fe0c83c92115b5f4883a6818355bd9332b29"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2ba72a6fcea8682ed93162687ac923d246de08d5","unresolved":false,"context_lines":[{"line_number":387,"context_line":"                self.defer_apply_off()"},{"line_number":388,"context_line":"            except Exception:"},{"line_number":389,"context_line":"                LOG.exception(_LE(\u0027Failure applying iptables rules\u0027))"},{"line_number":390,"context_line":"                raise n_exc.IpTablesApplyException(\u0027Failure applying \u0027"},{"line_number":391,"context_line":"                                                   \u0027iptables rules\u0027)"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    def defer_apply_on(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_fa0d9536","line":390,"in_reply_to":"da86d52c_c443af6a","updated":"2015-02-09 18:10:49.000000000","message":"Done","commit_id":"1977fe0c83c92115b5f4883a6818355bd9332b29"}],"neutron/tests/unit/test_iptables_manager.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6dc920cd273c57e1c730d3774f612eafdc6274fe","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                pass"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"},{"line_number":265,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":266,"context_line":"            \u0027Failure applying iptables rules\u0027))"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _extend_with_ip6tables_filter(self, expected_calls, filter_dump):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_b074c436","line":265,"updated":"2015-01-24 17:56:59.000000000","message":"Personally, I don\u0027t like the fact that we match against a new message constructed here. So in case it\u0027s changed in iptables manager code, we\u0027ll need to modify the test. Tests should not require modification for legitimate changes.\n\nFor the very least, you could define the message in iptables manager module as a global variable and reuse it here.\n\nThough I wonder why checking that IpTablesApplyException is raised is not enough to check correct behaviour.","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c5bd7080c8fd7e42d06521711fb7a84d20feb660","unresolved":false,"context_lines":[{"line_number":262,"context_line":"                pass"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"},{"line_number":265,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":266,"context_line":"            \u0027Failure applying iptables rules\u0027))"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def _extend_with_ip6tables_filter(self, expected_calls, filter_dump):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_ba339fa9","line":265,"in_reply_to":"1a930d6b_b074c436","updated":"2015-01-26 16:54:37.000000000","message":"Yes, this probably wasn\u0027t the best test.  I\u0027ll change it to better test the exception and remove the check on the log message.  I was in a rush on Friday night to get something done :)","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9462355eb71022db9b0f6301b3e298ad65c97c29","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                         name[:11])"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_defer_apply_with_exception(self):"},{"line_number":256,"context_line":"        exception_triggered \u003d False"},{"line_number":257,"context_line":"        self.iptables._apply \u003d mock.Mock(side_effect\u003dException)"},{"line_number":258,"context_line":"        try:"},{"line_number":259,"context_line":"            with self.iptables.defer_apply():"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_591f09b7","line":256,"updated":"2015-01-27 09:56:46.000000000","message":"with testtools.ExpectedException(n_exc.IpTablesApplyException):\n...","commit_id":"bdb2702a1268271dca0fdd8b7fa1bd4329c62da9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"26fa364d22447261c832c8c4779e6859a4a19b5f","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                         name[:11])"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_defer_apply_with_exception(self):"},{"line_number":256,"context_line":"        exception_triggered \u003d False"},{"line_number":257,"context_line":"        self.iptables._apply \u003d mock.Mock(side_effect\u003dException)"},{"line_number":258,"context_line":"        try:"},{"line_number":259,"context_line":"            with self.iptables.defer_apply():"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_774da499","line":256,"in_reply_to":"1a930d6b_591f09b7","updated":"2015-01-27 14:51:30.000000000","message":"I didn\u0027t know about that one, will update, thanks Ihar.","commit_id":"bdb2702a1268271dca0fdd8b7fa1bd4329c62da9"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"4496c2869582e8470aba60f288fbf50d6ca02ec3","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        self.assertEqual(iptables_manager.get_chain_name(name, wrap\u003dTrue),"},{"line_number":254,"context_line":"                         name[:11])"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def test_defer_apply_with_exception(self):"},{"line_number":257,"context_line":"        self.iptables._apply \u003d mock.Mock(side_effect\u003dException)"},{"line_number":258,"context_line":"        with testtools.ExpectedException(n_exc.IpTablesApplyException):"},{"line_number":259,"context_line":"            with self.iptables.defer_apply():"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa81d914_15eeda88","line":256,"updated":"2015-01-28 12:54:47.000000000","message":"make no much sense.","commit_id":"980678189fb5e8a99c7b41cd42ac79793bc983c4"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"571e29ad1a39b3942056a186f3901f62e56d8329","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    def test_defer_apply_with_exception(self):"},{"line_number":257,"context_line":"        self.iptables._apply \u003d mock.Mock(side_effect\u003dException)"},{"line_number":258,"context_line":"        with testtools.ExpectedException(n_exc.IpTablesApplyException):"},{"line_number":259,"context_line":"            with self.iptables.defer_apply():"},{"line_number":260,"context_line":"                pass"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_5a677cb7","line":259,"updated":"2015-02-09 19:57:25.000000000","message":"why not: just: self.iptables.defer.apply()?","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"f522a058259a41faca2d61d7b055bb733c0b7edf","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    def test_defer_apply_with_exception(self):"},{"line_number":257,"context_line":"        self.iptables._apply \u003d mock.Mock(side_effect\u003dException)"},{"line_number":258,"context_line":"        with testtools.ExpectedException(n_exc.IpTablesApplyException):"},{"line_number":259,"context_line":"            with self.iptables.defer_apply():"},{"line_number":260,"context_line":"                pass"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_9c6395dc","line":259,"in_reply_to":"da86d52c_5a677cb7","updated":"2015-02-10 09:56:23.000000000","message":"Please refer to the bug report. https://bugs.launchpad.net/neutron/+bug/1413111\nIt needs to use defer_apply to reproduce the bug.","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a2a57c849c20da6c7e9a87fb023e3468f58f3e83","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            with self.iptables.defer_apply():"},{"line_number":260,"context_line":"                pass"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def _extend_with_ip6tables_filter(self, expected_calls, filter_dump):"},{"line_number":265,"context_line":"        expected_calls.insert(2, ("}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_550ef48c","line":262,"updated":"2015-02-12 06:01:44.000000000","message":"I don\u0027t think this line is necessary. The expected exception already ensures we are getting the exception code exercised. Do we really need to ensure it was called precisely 1 time?","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f11ee995d8922d8559ec897d154869e849a2de54","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            with self.iptables.defer_apply():"},{"line_number":260,"context_line":"                pass"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        self.assertEqual(self.iptables._apply.call_count, 1)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def _extend_with_ip6tables_filter(self, expected_calls, filter_dump):"},{"line_number":265,"context_line":"        expected_calls.insert(2, ("}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_ed403d61","line":262,"in_reply_to":"da86d52c_550ef48c","updated":"2015-02-18 16:10:55.000000000","message":"It just seemed strange to have a test that didn\u0027t assert anything, but that testtools call is implicitly doing that.  I\u0027ll remove it.","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"}],"neutron/tests/unit/test_l3_agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6dc920cd273c57e1c730d3774f612eafdc6274fe","unresolved":false,"context_lines":[{"line_number":2204,"context_line":""},{"line_number":2205,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2206,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2207,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2208,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":2209,"context_line":"            \u0027Failure applying iptables rules\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_509d6058","line":2207,"updated":"2015-01-24 17:56:59.000000000","message":"It would be beneficial to check call arguments here.","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c5bd7080c8fd7e42d06521711fb7a84d20feb660","unresolved":false,"context_lines":[{"line_number":2204,"context_line":""},{"line_number":2205,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2206,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2207,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2208,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":2209,"context_line":"            \u0027Failure applying iptables rules\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_0098c6be","line":2207,"in_reply_to":"1a930d6b_509d6058","updated":"2015-01-26 16:54:37.000000000","message":"To me it doesn\u0027t seem worth it to check the arguments as there is a test above for _put_fips_in_error_state() which checks that it works correctly, and we\u0027d basically be duplicating that code just to check the call to _update_fip_statuses()","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"6dc920cd273c57e1c730d3774f612eafdc6274fe","unresolved":false,"context_lines":[{"line_number":2205,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2206,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2207,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2208,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":2209,"context_line":"            \u0027Failure applying iptables rules\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_d0715045","line":2208,"updated":"2015-01-24 17:56:59.000000000","message":"Same comment from iptables manager test applies here.","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c5bd7080c8fd7e42d06521711fb7a84d20feb660","unresolved":false,"context_lines":[{"line_number":2205,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2206,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2207,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2208,"context_line":"        log.exception.assert_called_once_with(_("},{"line_number":2209,"context_line":"            \u0027Failure applying iptables rules\u0027))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_5a747b35","line":2208,"in_reply_to":"1a930d6b_d0715045","updated":"2015-01-26 16:54:37.000000000","message":"I\u0027ll remove this.","commit_id":"352dc240fdf8298cd46757f20f9331865c1a3bbf"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a2a57c849c20da6c7e9a87fb023e3468f58f3e83","unresolved":false,"context_lines":[{"line_number":2055,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2056,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2057,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2058,"context_line":"        self.assertTrue(log.exception.called)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_350b407e","line":2058,"updated":"2015-02-12 06:01:44.000000000","message":"I think we want to test something a little more meaningful here. This currently just checks that the process_external process hits a few things that you mocked out anyway. Can you rewrite it so that update_fip_statuses actually gets called to test the path that used to have an uninitialized value?","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f11ee995d8922d8559ec897d154869e849a2de54","unresolved":false,"context_lines":[{"line_number":2055,"context_line":"        self.assertEqual(ri.iptables_manager._apply.call_count, 1)"},{"line_number":2056,"context_line":"        agent._put_fips_in_error_state.assert_called_once_with(ri)"},{"line_number":2057,"context_line":"        self.assertEqual(agent._update_fip_statuses.call_count, 1)"},{"line_number":2058,"context_line":"        self.assertTrue(log.exception.called)"}],"source_content_type":"text/x-python","patch_set":10,"id":"da86d52c_f718e7ce","line":2058,"in_reply_to":"da86d52c_350b407e","updated":"2015-02-18 16:10:55.000000000","message":"There\u0027s already a test called test__put_fips_in_error_state() which indirectly tests much of this code path, I\u0027ll have to try to re-factor that so we can re-use some code for testing _process_external() better in various conditions.\n\nI\u0027ll also need to wait until https://review.openstack.org/#/c/142863 merges to get this change in as things are still moving around with the refactoring, so it might be a few more days.","commit_id":"89ce1cd50260c5886992b558f9fb4232010b88e6"}]}
