)]}'
{"neutron/agent/l3/dvr_edge_router.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"ceb8a3e61a5e8701dbd968a5a8386220f6d44c13","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            # SNAT might be rescheduled to this agent; need to process like"},{"line_number":52,"context_line":"            # newly created gateway"},{"line_number":53,"context_line":"            return self.external_gateway_added(ex_gw_port, interface_name)"},{"line_number":54,"context_line":"        else:"},{"line_number":55,"context_line":"            self._external_gateway_added(ex_gw_port,"},{"line_number":56,"context_line":"                                        interface_name,"},{"line_number":57,"context_line":"                                        self.snat_namespace.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_58a9018f","line":54,"updated":"2015-08-12 16:38:23.000000000","message":"nit else is not needed","commit_id":"25326687a4b80de9eebcf82626a319b11c74cf0d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"64921da4f6797d5465fe32abf4ec32359ab29fbf","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            # SNAT might be rescheduled to this agent; need to process like"},{"line_number":52,"context_line":"            # newly created gateway"},{"line_number":53,"context_line":"            return self.external_gateway_added(ex_gw_port, interface_name)"},{"line_number":54,"context_line":"        else:"},{"line_number":55,"context_line":"            self._external_gateway_added(ex_gw_port,"},{"line_number":56,"context_line":"                                        interface_name,"},{"line_number":57,"context_line":"                                        self.snat_namespace.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_a18c76d7","line":54,"in_reply_to":"1a4dcd0f_58a9018f","updated":"2015-08-13 08:10:14.000000000","message":"I personally see code more readable with else as it\u0027s more obvious when code under else will be executed and when not. Still a matter of personal preference..","commit_id":"25326687a4b80de9eebcf82626a319b11c74cf0d"}],"neutron/agent/l3/ha_router.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"40e93f4d176cd1aa893298c1624de392e63e09a1","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    @staticmethod"},{"line_number":338,"context_line":"    def _gateway_ports_equal(port1, port2):"},{"line_number":339,"context_line":"        def _get_filtered_dict(d, ignore):"},{"line_number":340,"context_line":"            return dict((k, v) for k, v in six.iteritems(d)"},{"line_number":341,"context_line":"                        if k not in ignore)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        keys_to_ignore \u003d set([\u0027binding:host_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_8d714347","line":340,"updated":"2015-08-13 22:08:08.000000000","message":"nit:  You just moved this code from another spot so I won\u0027t insist but could we not use six here?\n\n   return {k: v for k, v in d.items() if k not in ignore}","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4ff3c29114bc04f515e9b6ea66f791884cb65eed","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    @staticmethod"},{"line_number":338,"context_line":"    def _gateway_ports_equal(port1, port2):"},{"line_number":339,"context_line":"        def _get_filtered_dict(d, ignore):"},{"line_number":340,"context_line":"            return dict((k, v) for k, v in six.iteritems(d)"},{"line_number":341,"context_line":"                        if k not in ignore)"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        keys_to_ignore \u003d set([\u0027binding:host_id\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_9a55d3fb","line":340,"in_reply_to":"1a4dcd0f_8d714347","updated":"2015-08-14 16:03:19.000000000","message":"sure, np","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"}],"neutron/tests/unit/agent/l3/test_agent.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"951efaba8c890f0788416e38a847d6fcdf5749c7","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def test_ext_gw_updated_dvr_agent_mode(self):"},{"line_number":605,"context_line":"        # no gateway should be added on dvr node"},{"line_number":606,"context_line":"        self._test_ext_gw_updated_dvr_agent_mode(\u0027any-foo\u0027, \u0027dvr\u0027, 0)"},{"line_number":607,"context_line":""},{"line_number":608,"context_line":"    def test_ext_gw_updated_dvr_snat_agent_mode_no_host(self):"},{"line_number":609,"context_line":"        # no gateway should be added on dvr_snat node without host match"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_33a2a59b","side":"PARENT","line":606,"updated":"2015-08-14 16:28:41.000000000","message":"this passes not because of dvr agent mode but because of host mismatch","commit_id":"4418bf426ac48935b27d235139912c2e3ec1d1b5"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3842db2f6c662f7aa08d7fd6de0b9817e1784619","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _test_ext_gw_updated_dvr_agent_mode(self, host,"},{"line_number":582,"context_line":"                                            agent_mode,"},{"line_number":583,"context_line":"                                            snat_hosted_before\u003dTrue):"},{"line_number":584,"context_line":"        router \u003d l3_test_common.prepare_router_data(num_internal_ports\u003d2)"},{"line_number":585,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":586,"context_line":"        ri \u003d dvr_router.DvrEdgeRouter(agent,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_cfdf4d39","line":583,"updated":"2015-08-13 17:23:35.000000000","message":"To me, this test has become harder to understand with all the extra if\u0027s and no comments as to what is being tested, not to mention the mocking of both external_gateway_added() and _external_gateway_added().  Not sure what other reviewers think...","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4ff3c29114bc04f515e9b6ea66f791884cb65eed","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _test_ext_gw_updated_dvr_agent_mode(self, host,"},{"line_number":582,"context_line":"                                            agent_mode,"},{"line_number":583,"context_line":"                                            snat_hosted_before\u003dTrue):"},{"line_number":584,"context_line":"        router \u003d l3_test_common.prepare_router_data(num_internal_ports\u003d2)"},{"line_number":585,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":586,"context_line":"        ri \u003d dvr_router.DvrEdgeRouter(agent,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_90b7eff4","line":583,"in_reply_to":"1a4dcd0f_cfdf4d39","updated":"2015-08-14 16:03:19.000000000","message":"Brian, Ill try to make test more readable.\n\nCarl, absolutely agree, will see if it makes sense to improve things as part of this patch","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"40e93f4d176cd1aa893298c1624de392e63e09a1","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _test_ext_gw_updated_dvr_agent_mode(self, host,"},{"line_number":582,"context_line":"                                            agent_mode,"},{"line_number":583,"context_line":"                                            snat_hosted_before\u003dTrue):"},{"line_number":584,"context_line":"        router \u003d l3_test_common.prepare_router_data(num_internal_ports\u003d2)"},{"line_number":585,"context_line":"        agent \u003d l3_agent.L3NATAgent(HOSTNAME, self.conf)"},{"line_number":586,"context_line":"        ri \u003d dvr_router.DvrEdgeRouter(agent,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_10f6a8f9","line":583,"in_reply_to":"1a4dcd0f_cfdf4d39","updated":"2015-08-13 22:08:08.000000000","message":"I tend to agree.  I wonder if this method should be refactored to better extract common parts.\n\nThe _external_gateway_added and external_gateway_added thing is confusing.  What\u0027s the difference?  I\u0027ve worked with both methods and I can\u0027t answer that off the top of my head.  Maybe a little bit of refactoring is in order for this but maybe not as part of this patch.","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"951efaba8c890f0788416e38a847d6fcdf5749c7","unresolved":false,"context_lines":[{"line_number":598,"context_line":""},{"line_number":599,"context_line":"        # test agent mode \u003d dvr (compute node)"},{"line_number":600,"context_line":"        router[\u0027gw_port_host\u0027] \u003d host"},{"line_number":601,"context_line":"        agent.conf.agent_mode \u003d agent_mode"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"        ri.external_gateway_updated(ex_gw_port, interface_name)"},{"line_number":604,"context_line":"        if host !\u003d HOSTNAME:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_73802df8","line":601,"updated":"2015-08-14 16:28:41.000000000","message":"not sure if it matters at all to the result of the test","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"40e93f4d176cd1aa893298c1624de392e63e09a1","unresolved":false,"context_lines":[{"line_number":634,"context_line":"    def test_ext_gw_updated_dvr_snat_agent_mode_snat_rescheduled(self):"},{"line_number":635,"context_line":"        # gateway should be added on dvr_snat node"},{"line_number":636,"context_line":"        self._test_ext_gw_updated_dvr_agent_mode("},{"line_number":637,"context_line":"            HOSTNAME, \u0027dvr_snat\u0027, False)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def test_agent_add_external_gateway(self):"},{"line_number":640,"context_line":"        router \u003d l3_test_common.prepare_router_data(num_internal_ports\u003d2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_f00c5cee","line":637,"updated":"2015-08-13 22:08:08.000000000","message":"If all else stays the same, could you call this with snat_hosted_before\u003dFalse for readability?","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4ff3c29114bc04f515e9b6ea66f791884cb65eed","unresolved":false,"context_lines":[{"line_number":634,"context_line":"    def test_ext_gw_updated_dvr_snat_agent_mode_snat_rescheduled(self):"},{"line_number":635,"context_line":"        # gateway should be added on dvr_snat node"},{"line_number":636,"context_line":"        self._test_ext_gw_updated_dvr_agent_mode("},{"line_number":637,"context_line":"            HOSTNAME, \u0027dvr_snat\u0027, False)"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def test_agent_add_external_gateway(self):"},{"line_number":640,"context_line":"        router \u003d l3_test_common.prepare_router_data(num_internal_ports\u003d2)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_fad3b75d","line":637,"in_reply_to":"1a4dcd0f_f00c5cee","updated":"2015-08-14 16:03:19.000000000","message":"Done","commit_id":"4a37ec6ff8af063243d8cbbe840e45ddc751caed"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9f5c49ba7c7aa7b4d8089aff18fb0f157dea5bf1","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            ri.create_snat_namespace()"},{"line_number":598,"context_line":"            snat_ns_name \u003d ri.snat_namespace.name"},{"line_number":599,"context_line":"        else:"},{"line_number":600,"context_line":"            self.assertIsNone(ri.snat_namespace)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        interface_name, ex_gw_port \u003d l3_test_common.prepare_ext_gw_test(self,"},{"line_number":603,"context_line":"                                                                        ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_a4809247","line":600,"updated":"2015-08-19 03:37:02.000000000","message":"I don\u0027t think this else is necessary, the init of DvrEdgeRouter set ri.snat_namespace to None, and nothing has happened since then to change that.","commit_id":"a264b329df82f3c391f75bd9ad73a1327616a43d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a758e46051178d6f60e921d4332ced2481de25e6","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            ri.create_snat_namespace()"},{"line_number":598,"context_line":"            snat_ns_name \u003d ri.snat_namespace.name"},{"line_number":599,"context_line":"        else:"},{"line_number":600,"context_line":"            self.assertIsNone(ri.snat_namespace)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        interface_name, ex_gw_port \u003d l3_test_common.prepare_ext_gw_test(self,"},{"line_number":603,"context_line":"                                                                        ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_dbf3209d","line":600,"in_reply_to":"fa1b9901_a4809247","updated":"2015-08-19 08:24:23.000000000","message":"Right, but things can change and we better fail fast in this case. I think I saw a patch which adds creation of snat_namespace on init","commit_id":"a264b329df82f3c391f75bd9ad73a1327616a43d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8fbdb10c99a1e90907c6e1b77e72bc2e6f8d0f84","unresolved":false,"context_lines":[{"line_number":597,"context_line":"            ri.create_snat_namespace()"},{"line_number":598,"context_line":"            snat_ns_name \u003d ri.snat_namespace.name"},{"line_number":599,"context_line":"        else:"},{"line_number":600,"context_line":"            self.assertIsNone(ri.snat_namespace)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        interface_name, ex_gw_port \u003d l3_test_common.prepare_ext_gw_test(self,"},{"line_number":603,"context_line":"                                                                        ri)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa1b9901_1b28b8e1","line":600,"in_reply_to":"fa1b9901_dbf3209d","updated":"2015-08-19 08:26:09.000000000","message":"ok, here it is https://review.openstack.org/#/c/123815/39/neutron/agent/l3/dvr_edge_router.py Abandoned but still","commit_id":"a264b329df82f3c391f75bd9ad73a1327616a43d"}]}
