)]}'
{"neutron/agent/l3/dvr_fip_ns.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # Now add the filter match rule for the table."},{"line_number":247,"context_line":"        fip_ns_name \u003d self.get_name()"},{"line_number":248,"context_line":"        fip_2_rtr_name \u003d self.get_int_device_name(ri.router_id)"},{"line_number":249,"context_line":"        ip_rule \u003d ip_lib.IPRule(namespace\u003dfip_ns_name)"},{"line_number":250,"context_line":"        ip_rule.rule.add(ip\u003dstr(fip_2_rtr.ip),"},{"line_number":251,"context_line":"                         iif\u003dfip_2_rtr_name,"},{"line_number":252,"context_line":"                         table\u003drt_tbl_index,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_9afd8570","line":249,"updated":"2016-09-16 19:30:15.000000000","message":"nit: namespace\u003dself.get_name() instead of L247 since it\u0027s only used here","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        # Now add the filter match rule for the table."},{"line_number":247,"context_line":"        fip_ns_name \u003d self.get_name()"},{"line_number":248,"context_line":"        fip_2_rtr_name \u003d self.get_int_device_name(ri.router_id)"},{"line_number":249,"context_line":"        ip_rule \u003d ip_lib.IPRule(namespace\u003dfip_ns_name)"},{"line_number":250,"context_line":"        ip_rule.rule.add(ip\u003dstr(fip_2_rtr.ip),"},{"line_number":251,"context_line":"                         iif\u003dfip_2_rtr_name,"},{"line_number":252,"context_line":"                         table\u003drt_tbl_index,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_fb004b36","line":249,"in_reply_to":"7a8ec9b2_9afd8570","updated":"2016-09-16 20:08:31.000000000","message":"will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            return"},{"line_number":262,"context_line":"        self.update_gateway_route(agent_gateway_port)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def update_gateway_route(self, agent_gateway_port, tbl_index\u003dNone):"},{"line_number":265,"context_line":"        ns_name \u003d self.get_name()"},{"line_number":266,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":267,"context_line":"        for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_da29cde7","line":264,"updated":"2016-09-16 19:30:15.000000000","message":"Who passes tlb_index ?","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            return"},{"line_number":262,"context_line":"        self.update_gateway_route(agent_gateway_port)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def update_gateway_route(self, agent_gateway_port, tbl_index\u003dNone):"},{"line_number":265,"context_line":"        ns_name \u003d self.get_name()"},{"line_number":266,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":267,"context_line":"        for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_cd591237","line":264,"in_reply_to":"7a8ec9b2_da29cde7","updated":"2016-09-16 20:08:31.000000000","message":"#L244 in this file.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"8f9acd2c0ce92f104bf723d069d7a3005cc9e2be","unresolved":false,"context_lines":[{"line_number":261,"context_line":"            return"},{"line_number":262,"context_line":"        self.update_gateway_route(agent_gateway_port)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def update_gateway_route(self, agent_gateway_port, tbl_index\u003dNone):"},{"line_number":265,"context_line":"        ns_name \u003d self.get_name()"},{"line_number":266,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":267,"context_line":"        for fixed_ip in agent_gateway_port[\u0027fixed_ips\u0027]:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_e6442b4b","line":264,"in_reply_to":"7a8ec9b2_da29cde7","updated":"2016-09-16 21:38:21.000000000","message":"My bad it should be called only from #L262 and #L244.\nI don\u0027t think that it needs to be called from #L130. I will remove it, since it will configure the gateway twice.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cde2a4d221dc089d30d6349dee0fc983c4badec2","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":258,"context_line":"        if gateway_ip_not_changed:"},{"line_number":259,"context_line":"            return"},{"line_number":260,"context_line":"        self.update_gateway_route(agent_gateway_port)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def update_gateway_route(self, agent_gateway_port, tbl_index\u003dNone):"},{"line_number":263,"context_line":"        ns_name \u003d self.get_name()"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5da102_67788af3","line":260,"updated":"2016-10-31 02:37:13.000000000","message":"Here\u0027s another case of the race (?) since we\u0027re not holding the lock.  Probably have to change the methods in fip_ns code a little so that only the \"create or update\" path is public.","commit_id":"e5bd3cf4fd1d7cbf5b3eaf6fdbdfad1dd377dafd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0e0d56ec7e38d0e074ca481efad69e12f941d6f1","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":258,"context_line":"        if gateway_ip_not_changed:"},{"line_number":259,"context_line":"            return"},{"line_number":260,"context_line":"        self.update_gateway_route(agent_gateway_port)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"    def update_gateway_route(self, agent_gateway_port, tbl_index\u003dNone):"},{"line_number":263,"context_line":"        ns_name \u003d self.get_name()"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5da102_ff08e1db","line":260,"in_reply_to":"ba5da102_67788af3","updated":"2016-11-04 16:07:27.000000000","message":"Yes we might have to rebase this patch based on our lock patch and we can make these functions as private methods and only accessible from create_or_update_gateway_port.\nI will try to refactor it.","commit_id":"e5bd3cf4fd1d7cbf5b3eaf6fdbdfad1dd377dafd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                         table\u003drt_tbl_index,"},{"line_number":288,"context_line":"                         priority\u003drt_tbl_index)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def check_agent_gateway_port_and_update_if_changed("},{"line_number":291,"context_line":"        self, agent_gateway_port, interface_name):"},{"line_number":292,"context_line":"        gateway_ip_not_changed \u003d self.agent_gateway_port and ("},{"line_number":293,"context_line":"            not self._check_for_gateway_ip_change(agent_gateway_port))"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_8895ec41","line":290,"updated":"2016-11-07 21:43:03.000000000","message":"I think this name could have stayed _update_gateway_port()","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":293,"context_line":"            not self._check_for_gateway_ip_change(agent_gateway_port))"},{"line_number":294,"context_line":"        if gateway_ip_not_changed:"},{"line_number":295,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":296,"context_line":"            return"},{"line_number":297,"context_line":"        self.update_gateway_route(agent_gateway_port, interface_name)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def update_gateway_route(self, agent_gateway_port,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_e873c84b","line":296,"updated":"2016-11-07 21:43:03.000000000","message":"I don\u0027t think you need the self.agent_gateway_port assignment here, the code as it was is Ok.","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if gateway_ip_not_changed:"},{"line_number":295,"context_line":"            self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":296,"context_line":"            return"},{"line_number":297,"context_line":"        self.update_gateway_route(agent_gateway_port, interface_name)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def update_gateway_route(self, agent_gateway_port,"},{"line_number":300,"context_line":"                             interface_name, tbl_index\u003dNone):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_e8aae86f","line":297,"updated":"2016-11-07 21:43:03.000000000","message":"We are already holding the lock in this case since called from create_or_update, so this can call _update_gateway_route() directly.","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            return"},{"line_number":297,"context_line":"        self.update_gateway_route(agent_gateway_port, interface_name)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def update_gateway_route(self, agent_gateway_port,"},{"line_number":300,"context_line":"                             interface_name, tbl_index\u003dNone):"},{"line_number":301,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":302,"context_line":"            self._update_gateway_route(agent_gateway_port,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_08b63cdc","line":299,"updated":"2016-11-07 21:43:03.000000000","message":"I\u0027d rather not have this visible from outside callers.","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f4d2513ff2d50961824b60d4f17afe0314c16974","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":122,"context_line":"        if is_first:"},{"line_number":123,"context_line":"            self._create_gateway_port_and_ns(agent_gateway_port,"},{"line_number":124,"context_line":"                                             interface_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a77a97e_0186f464","line":121,"updated":"2016-11-15 22:52:20.000000000","message":"This is re-introducing the race we are fixing in the other patch since we need to check is_first while holding the lock.\n\nI\u0027ll try and get an update out now that things have calmed down a little around here.","commit_id":"ea779059f2b7566ff44252637768a5f699baa05e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"95bfec8d4735e478ed8140a44d034487dbe8e9c0","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":122,"context_line":"        if is_first:"},{"line_number":123,"context_line":"            self._create_gateway_port_and_ns(agent_gateway_port,"},{"line_number":124,"context_line":"                                             interface_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a77a97e_b33c8be3","line":121,"in_reply_to":"7a77a97e_0186f464","updated":"2016-11-16 17:23:31.000000000","message":"I thought that race that we had was only for the update_gateway_port and not for the subscribe. The reason we had the initial lock here was that the create_gateway_port_and_ns was internally calling the update_gateway_port.\nNow it is external to that function and I believe that is not required.","commit_id":"ea779059f2b7566ff44252637768a5f699baa05e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a2c08b6da0c4fa57ceb4fea174ecb6eb498557b4","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def create_or_update_gateway_port(self, agent_gateway_port):"},{"line_number":119,"context_line":"        interface_name \u003d self.get_ext_device_name(agent_gateway_port[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":122,"context_line":"        if is_first:"},{"line_number":123,"context_line":"            self._create_gateway_port_and_ns(agent_gateway_port,"},{"line_number":124,"context_line":"                                             interface_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"7a77a97e_3648665b","line":121,"in_reply_to":"7a77a97e_b33c8be3","updated":"2016-11-16 18:30:35.000000000","message":"Oh, I see what you are saying.","commit_id":"ea779059f2b7566ff44252637768a5f699baa05e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"67e484a06a39abeffd0f5c376ffe86c21098787d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def _create_gateway_port_and_ns(self, agent_gateway_port, interface_name):"},{"line_number":143,"context_line":"        \"\"\"Create namespace and Floating IP gateway port.\"\"\""},{"line_number":144,"context_line":"        self.create()"},{"line_number":145,"context_line":"        self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":148,"context_line":"        \"\"\"Request port creation from Plugin then configure gateway port.\"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_c12e18a4","line":145,"updated":"2016-11-18 22:41:37.000000000","message":"This method can now just be merged with _create_gateway_port()","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"67e484a06a39abeffd0f5c376ffe86c21098787d","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        except Exception:"},{"line_number":281,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":282,"context_line":"            # good to clean up the namespace that has been created"},{"line_number":283,"context_line":"            # and reraise the exception in order to resync the router"},{"line_number":284,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":285,"context_line":"                self.unsubscribe(self.agent_gateway_port[\u0027network_id\u0027])"},{"line_number":286,"context_line":"                # It is also better to reset the fip count so that"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_211eec6f","line":283,"updated":"2016-11-18 22:41:37.000000000","message":"We\u0027re not cleaning-up the namespace here","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"2234b3a44ab6198e95e8237d4724bf7a684b2753","unresolved":false,"context_lines":[{"line_number":280,"context_line":"        except Exception:"},{"line_number":281,"context_line":"            # If an exception occurs at this point, then it is"},{"line_number":282,"context_line":"            # good to clean up the namespace that has been created"},{"line_number":283,"context_line":"            # and reraise the exception in order to resync the router"},{"line_number":284,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":285,"context_line":"                self.unsubscribe(self.agent_gateway_port[\u0027network_id\u0027])"},{"line_number":286,"context_line":"                # It is also better to reset the fip count so that"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_27a19cf8","line":283,"in_reply_to":"7a77a97e_211eec6f","updated":"2016-11-18 22:56:25.000000000","message":"The reason I don\u0027t want to clean up the namespace here, is because if there are other routers that are currently using the fip namespace, we don\u0027t need to clean up the fip namespace and just make sure that the router-to-fip link is created again.","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"67e484a06a39abeffd0f5c376ffe86c21098787d","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                         priority\u003drt_tbl_index)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _update_gateway_port("},{"line_number":301,"context_line":"        self, agent_gateway_port, interface_name):"},{"line_number":302,"context_line":"        if (self.agent_gateway_port and"},{"line_number":303,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port)):"},{"line_number":304,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_cc4acf54","line":301,"updated":"2016-11-18 22:41:37.000000000","message":"Can be put on L300","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"67e484a06a39abeffd0f5c376ffe86c21098787d","unresolved":false,"context_lines":[{"line_number":321,"context_line":"        # If the \u0027fg-\u0027 device doesn\u0027t exist in the namespace then trying"},{"line_number":322,"context_line":"        # to send advertisements or configure the default route will just"},{"line_number":323,"context_line":"        # throw exceptions.  Unsubscribe this external network so that"},{"line_number":324,"context_line":"        # the next call will trigger the interface to be plugged."},{"line_number":325,"context_line":"        if not ipd.exists():"},{"line_number":326,"context_line":"            LOG.warning(_LW(\u0027DVR: FIP gateway port with interface \u0027"},{"line_number":327,"context_line":"                            \u0027name: %(device)s does not exist in the given \u0027"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_6c229ba4","line":324,"updated":"2016-11-18 22:41:37.000000000","message":"unsubscribe not called any more","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"67e484a06a39abeffd0f5c376ffe86c21098787d","unresolved":false,"context_lines":[{"line_number":353,"context_line":"        # Cache the agent gateway port after successfully configuring"},{"line_number":354,"context_line":"        # the gateway, so that checking on self.agent_gateway_port"},{"line_number":355,"context_line":"        # will be a valid check"},{"line_number":356,"context_line":"        self.agent_gateway_port \u003d agent_gateway_port"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def _add_cidr_to_device(self, device, ip_cidr):"},{"line_number":359,"context_line":"        if not device.addr.list(to\u003dip_cidr):"}],"source_content_type":"text/x-python","patch_set":25,"id":"7a77a97e_6cf53beb","line":356,"updated":"2016-11-18 22:41:37.000000000","message":"This should probably move to L307 since we only need to set it on a port change","commit_id":"9d86f9a8c1f4291d918239d616e0421fa21e05af"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4d1d4be1bb644d2755311a3f3e69ec79a8c50a4b","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        if tbl_index is None:"},{"line_number":257,"context_line":"            ip_version \u003d ip_lib.get_ip_version(gw_ip)"},{"line_number":258,"context_line":"            tbl_index_list \u003d self.get_fip_table_indexes("},{"line_number":259,"context_line":"                ip_version)"},{"line_number":260,"context_line":"            for tbl_index in tbl_index_list:"},{"line_number":261,"context_line":"                ip_device.route.add_gateway(gw_ip, table\u003dtbl_index)"},{"line_number":262,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_17084f27","line":259,"updated":"2016-12-06 23:18:36.000000000","message":"nit: can fit on previous line","commit_id":"3adc5c407e3cab8a22689e9e1fe46ab9857f0e2c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4d1d4be1bb644d2755311a3f3e69ec79a8c50a4b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        interface_name \u003d self.get_ext_device_name("},{"line_number":272,"context_line":"            self.agent_gateway_port[\u0027id\u0027])"},{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            self._update_gateway_route_with_lock("},{"line_number":275,"context_line":"                self.agent_gateway_port,"},{"line_number":276,"context_line":"                interface_name, tbl_index\u003drt_tbl_index)"},{"line_number":277,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_a523e8bb","line":274,"updated":"2016-12-06 23:18:36.000000000","message":"We could just as easily put the \"with lock\" code here as there are no other callers of this method.","commit_id":"3adc5c407e3cab8a22689e9e1fe46ab9857f0e2c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"11b92d892e3b583f76f57a7bb08be25189f460d7","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            else:"},{"line_number":129,"context_line":"                self._update_gateway_port(agent_gateway_port, interface_name)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _create_gateway_port_and_ns(self, agent_gateway_port, interface_name):"},{"line_number":132,"context_line":"        \"\"\"Create namespace and Floating IP gateway port.\"\"\""},{"line_number":133,"context_line":"        self.create()"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a71b18c_170f9d39","side":"PARENT","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":35},"updated":"2016-12-13 07:43:16.000000000","message":"what\u0027s the reason for merging this into _create_gateway_port and removing exception handling?","commit_id":"5adb38cd6853c7d9cd78f7832c76de3c39848730"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0c4df693d8568066dce95181bc7f3f9ce256b418","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            else:"},{"line_number":129,"context_line":"                self._update_gateway_port(agent_gateway_port, interface_name)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _create_gateway_port_and_ns(self, agent_gateway_port, interface_name):"},{"line_number":132,"context_line":"        \"\"\"Create namespace and Floating IP gateway port.\"\"\""},{"line_number":133,"context_line":"        self.create()"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1a6eadb0_041604a7","side":"PARENT","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":35},"in_reply_to":"3a71b18c_170f9d39","updated":"2016-12-13 18:34:26.000000000","message":"The reason is update_gateway_port is not being called anymore from with the _create_gateway_port.","commit_id":"5adb38cd6853c7d9cd78f7832c76de3c39848730"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"11b92d892e3b583f76f57a7bb08be25189f460d7","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":175,"context_line":"                            clean_connections\u003dTrue)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self._update_gateway_port(ex_gw_port, interface_name)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"},{"line_number":180,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a6eadb0_3d825353","side":"PARENT","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":61},"updated":"2016-12-13 07:43:16.000000000","message":"So this was called earlier and not it\u0027s gone, can you please briefly explain why?","commit_id":"5adb38cd6853c7d9cd78f7832c76de3c39848730"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0c4df693d8568066dce95181bc7f3f9ce256b418","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        self.driver.init_l3(interface_name, ip_cidrs, namespace\u003dns_name,"},{"line_number":175,"context_line":"                            clean_connections\u003dTrue)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        self._update_gateway_port(ex_gw_port, interface_name)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        cmd \u003d [\u0027sysctl\u0027, \u0027-w\u0027, \u0027net.ipv4.conf.%s.proxy_arp\u003d1\u0027 % interface_name]"},{"line_number":180,"context_line":"        ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a6eadb0_a4e630b2","side":"PARENT","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":61},"in_reply_to":"1a6eadb0_3d825353","updated":"2016-12-13 18:34:26.000000000","message":"_update_gateway_port had common functionality for configuring the default gateway and validating if the gateway ip has changed.\nSo we made sure that this functionality is moved out and called when necessary.\nIf you look at the other child patches to this patch you will get to know.","commit_id":"5adb38cd6853c7d9cd78f7832c76de3c39848730"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"11b92d892e3b583f76f57a7bb08be25189f460d7","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":124,"context_line":"            is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":125,"context_line":"            if is_first:"},{"line_number":126,"context_line":"                self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    self._update_gateway_port("}],"source_content_type":"text/x-python","patch_set":30,"id":"3a71b18c_3746597b","line":126,"range":{"start_line":126,"start_character":21,"end_line":126,"end_character":41},"updated":"2016-12-13 07:43:16.000000000","message":"why not handling exceptions here as well?","commit_id":"9aa8b503a00ad05cb67d3baa76d6f74d0ee38814"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0c4df693d8568066dce95181bc7f3f9ce256b418","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        with self._fip_port_lock(interface_name):"},{"line_number":124,"context_line":"            is_first \u003d self.subscribe(agent_gateway_port[\u0027network_id\u0027])"},{"line_number":125,"context_line":"            if is_first:"},{"line_number":126,"context_line":"                self._create_gateway_port(agent_gateway_port, interface_name)"},{"line_number":127,"context_line":"            else:"},{"line_number":128,"context_line":"                try:"},{"line_number":129,"context_line":"                    self._update_gateway_port("}],"source_content_type":"text/x-python","patch_set":30,"id":"1a6eadb0_843bf437","line":126,"range":{"start_line":126,"start_character":21,"end_line":126,"end_character":41},"in_reply_to":"3a71b18c_3746597b","updated":"2016-12-13 18:34:26.000000000","message":"This is no more calling the update_gateway_port and this _create_gateway_port will be called just once since the \u0027is_first\u0027 will prevent from another such call.","commit_id":"9aa8b503a00ad05cb67d3baa76d6f74d0ee38814"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"11b92d892e3b583f76f57a7bb08be25189f460d7","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                         priority\u003drt_tbl_index)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _update_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":300,"context_line":"        if (self.agent_gateway_port and"},{"line_number":301,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port)):"},{"line_number":302,"context_line":"            return"},{"line_number":303,"context_line":"        # Caller already holding lock"},{"line_number":304,"context_line":"        self._update_gateway_route("},{"line_number":305,"context_line":"            agent_gateway_port, interface_name, tbl_index\u003dNone)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a71b18c_7a3fd8b3","line":302,"range":{"start_line":300,"start_character":8,"end_line":302,"end_character":18},"updated":"2016-12-13 07:43:16.000000000","message":"please refrain from unrelated changes","commit_id":"9aa8b503a00ad05cb67d3baa76d6f74d0ee38814"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"0c4df693d8568066dce95181bc7f3f9ce256b418","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                         priority\u003drt_tbl_index)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _update_gateway_port(self, agent_gateway_port, interface_name):"},{"line_number":300,"context_line":"        if (self.agent_gateway_port and"},{"line_number":301,"context_line":"                not self._check_for_gateway_ip_change(agent_gateway_port)):"},{"line_number":302,"context_line":"            return"},{"line_number":303,"context_line":"        # Caller already holding lock"},{"line_number":304,"context_line":"        self._update_gateway_route("},{"line_number":305,"context_line":"            agent_gateway_port, interface_name, tbl_index\u003dNone)"}],"source_content_type":"text/x-python","patch_set":30,"id":"1a6eadb0_24a06043","line":302,"range":{"start_line":300,"start_character":8,"end_line":302,"end_character":18},"in_reply_to":"3a71b18c_7a3fd8b3","updated":"2016-12-13 18:34:26.000000000","message":"will fix this one, did not notice it.","commit_id":"9aa8b503a00ad05cb67d3baa76d6f74d0ee38814"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c788206aba48024f3115bd900a16447d8038b33a","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                          \u0027FIP namespace failed\u0027))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":142,"context_line":"        \"\"\"Create namespace, request port creationg from Plugin,"},{"line_number":143,"context_line":"           then configure Floating IP gateway port."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        self.create()"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a461143_5e3e532a","line":142,"range":{"start_line":142,"start_character":50,"end_line":142,"end_character":51},"updated":"2017-02-03 02:48:34.000000000","message":"super nit: extra \u0027g\u0027 here","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c674f65aa618f8cfa5387c958387f6a698fd8f6b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                          \u0027FIP namespace failed\u0027))"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _create_gateway_port(self, ex_gw_port, interface_name):"},{"line_number":142,"context_line":"        \"\"\"Create namespace, request port creationg from Plugin,"},{"line_number":143,"context_line":"           then configure Floating IP gateway port."},{"line_number":144,"context_line":"        \"\"\""},{"line_number":145,"context_line":"        self.create()"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_65b79786","line":142,"range":{"start_line":142,"start_character":50,"end_line":142,"end_character":51},"in_reply_to":"3a461143_5e3e532a","updated":"2017-02-07 00:16:56.000000000","message":"Yes we can edit it.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"}],"neutron/agent/l3/dvr_local_router.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c07bf3de6be48887473de7c3d2ff094366583865","unresolved":false,"context_lines":[{"line_number":494,"context_line":"                self.agent.process_router_add(self)"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"    def update_routing_table(self, operation, route):"},{"line_number":497,"context_line":"        if self.fip_ns.agent_gateway_port:"},{"line_number":498,"context_line":"            fip_ns_name \u003d self.fip_ns.get_name()"},{"line_number":499,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":500,"context_line":"            if ip_wrapper.netns.exists(fip_ns_name):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_12ca061b","line":497,"updated":"2016-04-20 21:32:13.000000000","message":"Seems there should be a check for self.fip_ns here, it will be None if no FIPs are configured, right?","commit_id":"78b333b7b2551e2bad146172447b4f77fbb7cf8b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c07bf3de6be48887473de7c3d2ff094366583865","unresolved":false,"context_lines":[{"line_number":502,"context_line":"                    operation, route, namespace\u003dfip_ns_name)"},{"line_number":503,"context_line":"            else:"},{"line_number":504,"context_line":"                LOG.error(_LE(\"FIP namespace %s does not exist for \""},{"line_number":505,"context_line":"                              \"the router.\"), fip_ns_name)"},{"line_number":506,"context_line":"        super(DvrLocalRouter, self).update_routing_table(operation, route)"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"    def process(self, agent):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_d21feeb4","line":505,"updated":"2016-04-20 21:32:13.000000000","message":"Could this happen when we simply don\u0027t have a FIP associated to an instance on the compute node?  In that case I don\u0027t think we should log anything.","commit_id":"78b333b7b2551e2bad146172447b4f77fbb7cf8b"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e04a3648963b89c3cc45c0c1b71e43427b0be86e","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            fip_ns_name \u003d self.fip_ns.get_name()"},{"line_number":499,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":500,"context_line":"            if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":501,"context_line":"                super(DvrLocalRouter, self)._update_routing_table("},{"line_number":502,"context_line":"                    operation, route, namespace\u003dfip_ns_name)"},{"line_number":503,"context_line":"            else:"},{"line_number":504,"context_line":"                LOG.error(_LE(\"FIP namespace %s does not exist for \""},{"line_number":505,"context_line":"                              \"the router.\"), fip_ns_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_d6918c48","line":502,"range":{"start_line":501,"start_character":0,"end_line":502,"end_character":60},"updated":"2016-04-21 09:18:47.000000000","message":"I ran this patch locally today, and found one issue here. If we set a static route with next hop to some tenant network address, the l3-agent will output error like this \"ERROR neutron.agent.linux.utils [-] Exit code: 2; Stdin: ; Stdout: ; Stderr: RTNETLINK answers: Network is unreachable\"\n\nI think we should find some way to eliminate this error.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"430b9a0199ef01b4c213fb86f42ed89b8e27109c","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            fip_ns_name \u003d self.fip_ns.get_name()"},{"line_number":499,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":500,"context_line":"            if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":501,"context_line":"                super(DvrLocalRouter, self)._update_routing_table("},{"line_number":502,"context_line":"                    operation, route, namespace\u003dfip_ns_name)"},{"line_number":503,"context_line":"            else:"},{"line_number":504,"context_line":"                LOG.error(_LE(\"FIP namespace %s does not exist for \""},{"line_number":505,"context_line":"                              \"the router.\"), fip_ns_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_0915509a","line":502,"range":{"start_line":501,"start_character":0,"end_line":502,"end_character":60},"in_reply_to":"1a122d0e_08fe2905","updated":"2016-04-22 21:13:54.000000000","message":"If you look at the history behind the static route patch, I have created a patch that will only apply the external network related routes to snat namespace and internal network related routes to the router namespace. Then based on the review comments and to make it simple we went ahead and added the routes to router and snat namespace.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"287ceeed6c5f0d965c0a72191cb285c2084486d3","unresolved":false,"context_lines":[{"line_number":498,"context_line":"            fip_ns_name \u003d self.fip_ns.get_name()"},{"line_number":499,"context_line":"            ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":500,"context_line":"            if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":501,"context_line":"                super(DvrLocalRouter, self)._update_routing_table("},{"line_number":502,"context_line":"                    operation, route, namespace\u003dfip_ns_name)"},{"line_number":503,"context_line":"            else:"},{"line_number":504,"context_line":"                LOG.error(_LE(\"FIP namespace %s does not exist for \""},{"line_number":505,"context_line":"                              \"the router.\"), fip_ns_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_08fe2905","line":502,"range":{"start_line":501,"start_character":0,"end_line":502,"end_character":60},"in_reply_to":"1a122d0e_d6918c48","updated":"2016-04-21 16:20:11.000000000","message":"This is because the interfaces are not available in the fipnamespace.\nIf you configure a static route make sure that the related next hop interface is available on the namespace.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    if is_first:"},{"line_number":566,"context_line":"                        self.fip_ns.create_gateway_port(fip_agent_port)"},{"line_number":567,"context_line":"                    else:"},{"line_number":568,"context_line":"                        self.fip_ns.\\"},{"line_number":569,"context_line":"                            check_agent_gateway_port_and_update_if_changed("},{"line_number":570,"context_line":"                                fip_agent_port)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_da054d46","line":568,"updated":"2016-09-16 19:30:15.000000000","message":"nit: could put () around the whole thing instead of using the \\","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                    if is_first:"},{"line_number":566,"context_line":"                        self.fip_ns.create_gateway_port(fip_agent_port)"},{"line_number":567,"context_line":"                    else:"},{"line_number":568,"context_line":"                        self.fip_ns.\\"},{"line_number":569,"context_line":"                            check_agent_gateway_port_and_update_if_changed("},{"line_number":570,"context_line":"                                fip_agent_port)"},{"line_number":571,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_dbb38f96","line":568,"in_reply_to":"7a8ec9b2_da054d46","updated":"2016-09-16 20:08:31.000000000","message":"will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":612,"context_line":"            LOG.debug(\"The FIP Namespace %s does not exist for \""},{"line_number":613,"context_line":"                      \"the router.\", fip_ns_name)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def check_if_route_applicable_to_fip_namespace("},{"line_number":616,"context_line":"        self, route, agent_gateway_port):"},{"line_number":617,"context_line":"        subnet_cidr_match \u003d False"},{"line_number":618,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(agent_gateway_port[\u0027fixed_ips\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_3a53913a","line":615,"updated":"2016-09-16 19:30:15.000000000","message":"private method?","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":612,"context_line":"            LOG.debug(\"The FIP Namespace %s does not exist for \""},{"line_number":613,"context_line":"                      \"the router.\", fip_ns_name)"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    def check_if_route_applicable_to_fip_namespace("},{"line_number":616,"context_line":"        self, route, agent_gateway_port):"},{"line_number":617,"context_line":"        subnet_cidr_match \u003d False"},{"line_number":618,"context_line":"        ip_cidrs \u003d common_utils.fixed_ip_cidrs(agent_gateway_port[\u0027fixed_ips\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_9b6ca709","line":615,"in_reply_to":"7a8ec9b2_3a53913a","updated":"2016-09-16 20:08:31.000000000","message":"sure.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":621,"context_line":"            # NOTE: In the case of DVR routers apply the extra routes"},{"line_number":622,"context_line":"            # on the FIP Namespace only if is associated with the"},{"line_number":623,"context_line":"            # external agent gateway subnets."},{"line_number":624,"context_line":"            if netaddr.IPAddress(route[\u0027nexthop\u0027]) not in gw_subnet_cidr:"},{"line_number":625,"context_line":"                continue"},{"line_number":626,"context_line":"            subnet_cidr_match \u003d True"},{"line_number":627,"context_line":"        return subnet_cidr_match"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_55774e9f","line":624,"updated":"2016-09-16 19:30:15.000000000","message":"The nexthop calculation should be outside the for() so it\u0027s only done once.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            # external agent gateway subnets."},{"line_number":624,"context_line":"            if netaddr.IPAddress(route[\u0027nexthop\u0027]) not in gw_subnet_cidr:"},{"line_number":625,"context_line":"                continue"},{"line_number":626,"context_line":"            subnet_cidr_match \u003d True"},{"line_number":627,"context_line":"        return subnet_cidr_match"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    def get_router_cidrs(self, device):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_7a1ef970","line":626,"updated":"2016-09-16 19:30:15.000000000","message":"This could seemingly loop through cidrs after we found a match.  Can you get rid of the \u0027not\u0027 on L624 and return True instead ?","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            # external agent gateway subnets."},{"line_number":624,"context_line":"            if netaddr.IPAddress(route[\u0027nexthop\u0027]) not in gw_subnet_cidr:"},{"line_number":625,"context_line":"                continue"},{"line_number":626,"context_line":"            subnet_cidr_match \u003d True"},{"line_number":627,"context_line":"        return subnet_cidr_match"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    def get_router_cidrs(self, device):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_3b53933a","line":626,"in_reply_to":"7a8ec9b2_7a1ef970","updated":"2016-09-16 20:08:31.000000000","message":"will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            if netaddr.IPAddress(route[\u0027nexthop\u0027]) not in gw_subnet_cidr:"},{"line_number":625,"context_line":"                continue"},{"line_number":626,"context_line":"            subnet_cidr_match \u003d True"},{"line_number":627,"context_line":"        return subnet_cidr_match"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    def get_router_cidrs(self, device):"},{"line_number":630,"context_line":"        \"\"\"As no floatingip will be set on the rfp device. Get floatingip from"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_9a110560","line":627,"updated":"2016-09-16 19:30:15.000000000","message":"then this could be return False and L617 goes away","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":624,"context_line":"            if netaddr.IPAddress(route[\u0027nexthop\u0027]) not in gw_subnet_cidr:"},{"line_number":625,"context_line":"                continue"},{"line_number":626,"context_line":"            subnet_cidr_match \u003d True"},{"line_number":627,"context_line":"        return subnet_cidr_match"},{"line_number":628,"context_line":""},{"line_number":629,"context_line":"    def get_router_cidrs(self, device):"},{"line_number":630,"context_line":"        \"\"\"As no floatingip will be set on the rfp device. Get floatingip from"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_5b34dffa","line":627,"in_reply_to":"7a8ec9b2_9a110560","updated":"2016-09-16 20:08:31.000000000","message":"ok will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4d1d4be1bb644d2755311a3f3e69ec79a8c50a4b","unresolved":false,"context_lines":[{"line_number":599,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"},{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            LOG.debug(\"The FIP Namespace %s does not exist for \""},{"line_number":602,"context_line":"                      \"the router.\", fip_ns_name)"},{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def _check_if_route_applicable_to_fip_namespace("},{"line_number":605,"context_line":"        self, route, agent_gateway_port):"}],"source_content_type":"text/x-python","patch_set":29,"id":"3a71b18c_37438b14","line":602,"updated":"2016-12-06 23:18:36.000000000","message":"Should put the router id here as well","commit_id":"3adc5c407e3cab8a22689e9e1fe46ab9857f0e2c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c788206aba48024f3115bd900a16447d8038b33a","unresolved":false,"context_lines":[{"line_number":593,"context_line":"    def _update_fip_route_table_with_next_hop_routes("},{"line_number":594,"context_line":"        self, operation, route, fip_ns_name, tbl_index):"},{"line_number":595,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":596,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027], \u0027table\u0027, tbl_index]"},{"line_number":597,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":598,"context_line":"        if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":599,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_c54efe95","line":596,"updated":"2017-02-03 02:48:34.000000000","message":"Should we be using the device name as well?  Caller has the gw_port, but I guess it\u0027s not necessary as this is going down the veth pair.  That\u0027s probably you didn\u0027t use ip_lib code since it wants the device name.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f39f962ae1e7297a27ea173f8e8a114d5dcac734","unresolved":false,"context_lines":[{"line_number":593,"context_line":"    def _update_fip_route_table_with_next_hop_routes("},{"line_number":594,"context_line":"        self, operation, route, fip_ns_name, tbl_index):"},{"line_number":595,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":596,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027], \u0027table\u0027, tbl_index]"},{"line_number":597,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":598,"context_line":"        if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":599,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_bbf51ccc","line":596,"in_reply_to":"1a430d35_25ef4f88","updated":"2017-02-07 01:06:39.000000000","message":"Right, I was just thinking it would then be easier to use the ip_lib code directly since that class wants a device name.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c674f65aa618f8cfa5387c958387f6a698fd8f6b","unresolved":false,"context_lines":[{"line_number":593,"context_line":"    def _update_fip_route_table_with_next_hop_routes("},{"line_number":594,"context_line":"        self, operation, route, fip_ns_name, tbl_index):"},{"line_number":595,"context_line":"        cmd \u003d [\u0027ip\u0027, \u0027route\u0027, operation, \u0027to\u0027, route[\u0027destination\u0027],"},{"line_number":596,"context_line":"               \u0027via\u0027, route[\u0027nexthop\u0027], \u0027table\u0027, tbl_index]"},{"line_number":597,"context_line":"        ip_wrapper \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":598,"context_line":"        if ip_wrapper.netns.exists(fip_ns_name):"},{"line_number":599,"context_line":"            ip_wrapper.netns.execute(cmd, check_exit_code\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_25ef4f88","line":596,"in_reply_to":"1a430d35_c54efe95","updated":"2017-02-07 00:16:56.000000000","message":"I don\u0027t think we need the device name since it would be routed through the veth pair.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c788206aba48024f3115bd900a16447d8038b33a","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            LOG.debug(\"The FIP namespace %(ns)s does not exist for \""},{"line_number":602,"context_line":"                      \"router %(id)s\","},{"line_number":603,"context_line":"                      {\u0027ns\u0027: fip_ns_name, \u0027id\u0027: self.router_id})"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def _check_if_route_applicable_to_fip_namespace("},{"line_number":606,"context_line":"        self, route, agent_gateway_port):"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_a5bbb274","line":603,"updated":"2017-02-03 02:48:34.000000000","message":"nit: this should eventually be changed to use the ip_lib \"add_route\" code, and just do a try/except around it since it will fail if the namespace doesn\u0027t exist.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f39f962ae1e7297a27ea173f8e8a114d5dcac734","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            LOG.debug(\"The FIP namespace %(ns)s does not exist for \""},{"line_number":602,"context_line":"                      \"router %(id)s\","},{"line_number":603,"context_line":"                      {\u0027ns\u0027: fip_ns_name, \u0027id\u0027: self.router_id})"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def _check_if_route_applicable_to_fip_namespace("},{"line_number":606,"context_line":"        self, route, agent_gateway_port):"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_1b0630ce","line":603,"in_reply_to":"1a430d35_059093eb","updated":"2017-02-07 01:06:39.000000000","message":"No, this is a good follow-on, possibly updating the ip_lib code to be more liberal in arguments it accepts is necessary.","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"c674f65aa618f8cfa5387c958387f6a698fd8f6b","unresolved":false,"context_lines":[{"line_number":600,"context_line":"        else:"},{"line_number":601,"context_line":"            LOG.debug(\"The FIP namespace %(ns)s does not exist for \""},{"line_number":602,"context_line":"                      \"router %(id)s\","},{"line_number":603,"context_line":"                      {\u0027ns\u0027: fip_ns_name, \u0027id\u0027: self.router_id})"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def _check_if_route_applicable_to_fip_namespace("},{"line_number":606,"context_line":"        self, route, agent_gateway_port):"}],"source_content_type":"text/x-python","patch_set":38,"id":"1a430d35_059093eb","line":603,"in_reply_to":"1a430d35_a5bbb274","updated":"2017-02-07 00:16:56.000000000","message":"Is it a must?","commit_id":"c6de850021d099d6bad026b2192ea40b9c849f87"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    def add(self, ip, **kwargs):"},{"line_number":468,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        if not kwargs.get(\u0027iif\u0027):"},{"line_number":471,"context_line":"            kwargs.update({\u0027from\u0027: ip})"},{"line_number":472,"context_line":"        canonical_kwargs \u003d self._make_canonical(ip_version, kwargs)"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_15f146cd","line":470,"updated":"2016-09-16 19:30:15.000000000","message":"would be good to have a comment here stating that when we\u0027re adding a rule based on the incoming interface we don\u0027t want to filter on the IP","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":467,"context_line":"    def add(self, ip, **kwargs):"},{"line_number":468,"context_line":"        ip_version \u003d get_ip_version(ip)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        if not kwargs.get(\u0027iif\u0027):"},{"line_number":471,"context_line":"            kwargs.update({\u0027from\u0027: ip})"},{"line_number":472,"context_line":"        canonical_kwargs \u003d self._make_canonical(ip_version, kwargs)"},{"line_number":473,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_fb0a0b25","line":470,"in_reply_to":"7a8ec9b2_15f146cd","updated":"2016-09-16 20:08:31.000000000","message":"Sure will add a comment.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"3558bdf292b623b81e2fc10b5b24c0e66b5d41ac","unresolved":false,"context_lines":[{"line_number":795,"context_line":"        self._assert_extra_routes(router_updated, namespace\u003dsnat_ns_name)"},{"line_number":796,"context_line":"        self._assert_extra_routes(router_updated)"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"    def test_dvr_router_static_routes_in_fip_and_snat_namespace(self):"},{"line_number":799,"context_line":"        \"\"\"Test to validate the extra routes on dvr routers.\"\"\""},{"line_number":800,"context_line":"        self.agent.conf.agent_mode \u003d \u0027dvr_snat\u0027"},{"line_number":801,"context_line":"        router_info \u003d self.generate_dvr_router_info(enable_snat\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_bf96aeed","line":798,"range":{"start_line":798,"start_character":1,"end_line":798,"end_character":63},"updated":"2016-04-20 05:43:24.000000000","message":"nit: Some of this test case is duplicated with \"test_dvr_router_static_routes\", is it possible to eliminate the duplication?","commit_id":"0f3057753e7cd61cbcaeff53937add171738e702"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"9b0636583005420b68808432d17a146b08917e80","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_ee067e84","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"updated":"2016-04-21 02:16:13.000000000","message":"Why manually distinguish the static routes, it makes me feel that code couldn\u0027t judge where the static routes should be added, local router or edge/fip router.\n\nThe static routes may contain several static routes, for local and for edge, would you mind to commix them to test?","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"bc6f15b7ca25081078ed4b83d534a9ac804c596e","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_07804abe","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"in_reply_to":"1a122d0e_aaa8458d","updated":"2016-04-27 03:08:07.000000000","message":"Hi, Swami, sorry for my blind, I checked https://review.openstack.org/#/c/228026/9 patchset 9 and its comments, but didn\u0027t find helpful things to help me understand your purpose here.\n\nAnd I noticed that you add test_dvr_router_static_routes in PS #13, no meaningful comments around there.\n\nWell, I think I can accept your point that, it \"Should not stop this patch from merging.\", but I hope you can add some comments here if there will be another patch set. Thanks.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a621f12db9d44694e04be50db844de6120e8f93d","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_aaa8458d","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"in_reply_to":"1a122d0e_af6a17eb","updated":"2016-04-26 17:41:52.000000000","message":"ZongKai Li,\nI would also like you to take a look at the patch.\nhttps://review.openstack.org/#/c/228026/9 patchset 9 and its comments on why I moved in this direction to reduce the complexity.\n\nHope this helps.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"58b7c78c2224869a4eae622aca3a5f38f72db660","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_af6a17eb","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"in_reply_to":"1a122d0e_c8121a62","updated":"2016-04-26 17:25:15.000000000","message":"ZongKai Li,\nAs I have mentioned earlier, we went in that path and we move away from that path.\nBut this particular patch addresses adding the routes to the fipnamespace.\n\nIf that is important and if everyone agree then we might have to add in another patch to address that issue.\n\nShould not stop this patch from merging.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"5c74203da660896d46b7341b00b58ac9d1295146","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c8121a62","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"in_reply_to":"1a122d0e_c88f1174","updated":"2016-04-25 03:37:03.000000000","message":"Yes, that\u0027s right, but if routes is going to be added in the \"wrong\" netns, will not iproute2 fail to do that and return an error message?\n\nIf code can do it in correct way, I think we don\u0027t need manually separate test cases here. The distinguishing may confuse people for the way routes added into netns.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"287ceeed6c5f0d965c0a72191cb285c2084486d3","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":789,"context_line":"        snat_ns_name \u003d dvr_snat_ns.SnatNamespace.get_snat_ns_name("},{"line_number":790,"context_line":"            router1.router_id)"},{"line_number":791,"context_line":"        if router_namespace:"},{"line_number":792,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":793,"context_line":"                                         \u0027nexthop\u0027: \u002735.4.0.20\u0027}]"},{"line_number":794,"context_line":"        else:"},{"line_number":795,"context_line":"            router1.router[\u0027routes\u0027] \u003d [{\u0027destination\u0027: \u00278.8.4.0/24\u0027,"},{"line_number":796,"context_line":"                                         \u0027nexthop\u0027: \u002719.4.4.10\u0027}]"},{"line_number":797,"context_line":""},{"line_number":798,"context_line":"        self.agent._process_updated_router(router1.router)"},{"line_number":799,"context_line":"        router_updated \u003d self.agent.router_info[router_info[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_c88f1174","line":796,"range":{"start_line":791,"start_character":0,"end_line":796,"end_character":65},"in_reply_to":"1a122d0e_ee067e84","updated":"2016-04-21 16:20:11.000000000","message":"Hi zongKai Li, the reason is the routes related to external network can only be added to fip namespace and snat namespace.\nBut routes to internal network can be added to snat_namespace and router namespace.","commit_id":"2a23c531c9a5a485fce030fb180152583e1f8878"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":954,"context_line":"            self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":955,"context_line":"            self._assert_extra_routes_for_fipns("},{"line_number":956,"context_line":"                new_router_info, router_fip_table_idx,"},{"line_number":957,"context_line":"                check_rule_delete\u003dTrue)"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"    def _assert_extra_routes_for_fipns(self, router, router_fip_table_idx,"},{"line_number":960,"context_line":"                                       check_rule_delete\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_00f7428b","line":957,"updated":"2016-09-16 19:30:15.000000000","message":"check_rule_delete\u003dcheck_fip_rule_delete ?  Here and L948.  Or maybe just make it a positional argument?","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":954,"context_line":"            self.assertTrue(self._namespace_exists(fip_ns_name))"},{"line_number":955,"context_line":"            self._assert_extra_routes_for_fipns("},{"line_number":956,"context_line":"                new_router_info, router_fip_table_idx,"},{"line_number":957,"context_line":"                check_rule_delete\u003dTrue)"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"    def _assert_extra_routes_for_fipns(self, router, router_fip_table_idx,"},{"line_number":960,"context_line":"                                       check_rule_delete\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_2d4b565a","line":957,"in_reply_to":"7a8ec9b2_00f7428b","updated":"2016-09-16 20:08:31.000000000","message":"will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":957,"context_line":"                check_rule_delete\u003dTrue)"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"    def _assert_extra_routes_for_fipns(self, router, router_fip_table_idx,"},{"line_number":960,"context_line":"                                       check_rule_delete\u003dFalse):"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        fip_ns_name \u003d router.fip_ns.get_name()"},{"line_number":963,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_e04256ad","line":960,"updated":"2016-09-16 19:30:15.000000000","message":"nit: use the same argument name here and L920 for easier searching.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":957,"context_line":"                check_rule_delete\u003dTrue)"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"    def _assert_extra_routes_for_fipns(self, router, router_fip_table_idx,"},{"line_number":960,"context_line":"                                       check_rule_delete\u003dFalse):"},{"line_number":961,"context_line":""},{"line_number":962,"context_line":"        fip_ns_name \u003d router.fip_ns.get_name()"},{"line_number":963,"context_line":"        self.assertTrue(self._namespace_exists(fip_ns_name))"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_ad6da6cd","line":960,"in_reply_to":"7a8ec9b2_e04256ad","updated":"2016-09-16 20:08:31.000000000","message":"will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e2b5cffa2feca544199a269f64d7b479e050f852","unresolved":false,"context_lines":[{"line_number":982,"context_line":"            # corresponding rules and routes in route table are created"},{"line_number":983,"context_line":"            # for the router."},{"line_number":984,"context_line":"            expected_rule \u003d {unicode(\u0027from\u0027): \u00270.0.0.0/0\u0027,"},{"line_number":985,"context_line":"                             unicode(\u0027iif\u0027): fip_ns_int_name,"},{"line_number":986,"context_line":"                             \u0027priority\u0027: str(router_fip_table_idx),"},{"line_number":987,"context_line":"                             \u0027table\u0027: str(router_fip_table_idx),"},{"line_number":988,"context_line":"                             \u0027type\u0027: \u0027unicast\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_c0d39ad3","line":985,"updated":"2016-09-16 19:30:15.000000000","message":"u\u0027iif\u0027 ?  And other places","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9c291a6d711a0904d2de6232004ed9f19df0b1a","unresolved":false,"context_lines":[{"line_number":982,"context_line":"            # corresponding rules and routes in route table are created"},{"line_number":983,"context_line":"            # for the router."},{"line_number":984,"context_line":"            expected_rule \u003d {unicode(\u0027from\u0027): \u00270.0.0.0/0\u0027,"},{"line_number":985,"context_line":"                             unicode(\u0027iif\u0027): fip_ns_int_name,"},{"line_number":986,"context_line":"                             \u0027priority\u0027: str(router_fip_table_idx),"},{"line_number":987,"context_line":"                             \u0027table\u0027: str(router_fip_table_idx),"},{"line_number":988,"context_line":"                             \u0027type\u0027: \u0027unicast\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_4d5d0214","line":985,"in_reply_to":"7a8ec9b2_c0d39ad3","updated":"2016-09-16 20:08:31.000000000","message":"ok will fix it.","commit_id":"ce06ae149f55ef5527a2280590241570a11ffda9"}],"neutron/tests/unit/agent/l3/test_dvr_fip_ns.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        self, def_gw, fip_sub, send_adv_notif, IPDevice):"},{"line_number":113,"context_line":"        fip_sub.return_value \u003d False"},{"line_number":114,"context_line":"        self.fip_ns._check_for_gateway_ip_change \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":115,"context_line":"        #self.fip_ns.agent_gateway_port \u003d None"},{"line_number":116,"context_line":"        agent_gw_port \u003d self._get_agent_gw_port()"},{"line_number":117,"context_line":"        interface_name \u003d self.fip_ns.get_ext_device_name(agent_gw_port[\u0027id\u0027])"},{"line_number":118,"context_line":"        self.fip_ns.create_or_update_gateway_port(agent_gw_port)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_fcc8e176","line":115,"updated":"2016-11-07 21:43:03.000000000","message":"??","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3fe471728e27bc2074c9eaddee14c31225bf688d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        agent_gw_port \u003d self._get_agent_gw_port()"},{"line_number":117,"context_line":"        interface_name \u003d self.fip_ns.get_ext_device_name(agent_gw_port[\u0027id\u0027])"},{"line_number":118,"context_line":"        self.fip_ns.create_or_update_gateway_port(agent_gw_port)"},{"line_number":119,"context_line":"        self.fip_ns.update_gateway_route(agent_gw_port, interface_name)"},{"line_number":120,"context_line":"        expected \u003d ["},{"line_number":121,"context_line":"            mock.call(self.fip_ns.get_name(),"},{"line_number":122,"context_line":"                      self.fip_ns.get_ext_device_name(agent_gw_port[\u0027id\u0027]),"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a629dbe_1cabd575","line":119,"updated":"2016-11-07 21:43:03.000000000","message":"And I don\u0027t think this is required as L118 should call it, right?","commit_id":"2caba6f46419548216aeb14c2f6b51973f3a4e05"}]}
