)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"78da5967f9783d6b55b13096c464fb01d218e65e","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Swaminathan Vasudevan \u003cswaminathan.vasudevan@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-05 13:35:00 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: Use cached router gateway data to cleanup the snat redirect rules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Cache the router gateway data to the local filesystem to use it later"},{"line_number":10,"context_line":"during agent restart. Each agent will maintain a local copy of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1aa78d24_8c3be837","line":7,"updated":"2016-07-05 21:24:23.000000000","message":"Sorry why do you need to cache anything? When the agent starts it should get everything that it needs to determine that the router should be cleaned up, including the SNAT namespace and source routing rules in the qrouter namespace.\n\nThe commit message touches on this: \"When agent restarts the agent does not get the gateway data from the server [...]\". Why not?","commit_id":"b453262264aff9b409814508d5accc038d5fba9e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"e88b9fe018ed9a2f34fad22fe17a4df77c6c5963","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Swaminathan Vasudevan \u003cswaminathan.vasudevan@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-05 13:35:00 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: Use cached router gateway data to cleanup the snat redirect rules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Cache the router gateway data to the local filesystem to use it later"},{"line_number":10,"context_line":"during agent restart. Each agent will maintain a local copy of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1aa78d24_c7b5cb31","line":7,"in_reply_to":"1aa78d24_2c4bd488","updated":"2016-07-05 21:36:10.000000000","message":"It should be able to do this without caching any data locally. This adds significant complexity overhead and we\u0027ve been able to do without so far apart from local allocation for the source routing priorities for DVR.\n\nWe already have code that compares the data the agent got from the server and compares it to local state to determine if the external gateway should be created, updated or deleted. Why doesn\u0027t the delete path also get rid of the source routing rules in the qrouter namespace?","commit_id":"b453262264aff9b409814508d5accc038d5fba9e"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6f2abde70aca0d606232832ca854e14aacdf35ea","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Swaminathan Vasudevan \u003cswaminathan.vasudevan@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-05 13:35:00 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: Use cached router gateway data to cleanup the snat redirect rules"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Cache the router gateway data to the local filesystem to use it later"},{"line_number":10,"context_line":"during agent restart. Each agent will maintain a local copy of the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1aa78d24_2c4bd488","line":7,"in_reply_to":"1aa78d24_8c3be837","updated":"2016-07-05 21:30:02.000000000","message":"Assaf, yes if we delete the gateway when agent is dead and then when the agent restarts, the server would have already removed all the port information for the router gateway and now when the agent restarts, it does a full sync and you will not get any gateway related details, since it is already deleted from the DB.\n\nSo in this case we know that the snat namespace is stale and will remove it, but there are snat redirect rules and route in the router_namespace that has to be cleaned up.\n\nThat is the reason we need to cache the data.\n\nHope this helps.","commit_id":"b453262264aff9b409814508d5accc038d5fba9e"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"9982b1572db989cb2a3e93c4ca6e89a361c982fe","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Swaminathan Vasudevan \u003cswaminathan.vasudevan@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-06 22:47:38 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: Cleanup the stable snat redirect rules in router namespace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After the stale snat namespace is deleted the snat redirect rules"},{"line_number":10,"context_line":"in router namespace should be cleaned."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_746c2c08","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":23},"updated":"2016-07-07 10:02:18.000000000","message":"stale","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Swaminathan Vasudevan \u003cswaminathan.vasudevan@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-06 22:47:38 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: Cleanup the stable snat redirect rules in router namespace"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After the stale snat namespace is deleted the snat redirect rules"},{"line_number":10,"context_line":"in router namespace should be cleaned."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_0b82c2c7","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":23},"in_reply_to":"1aa78d24_746c2c08","updated":"2016-07-07 19:14:32.000000000","message":"Done","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4225b927e3055c15a52b5e6cb43d78912455888d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"After the stale snat namespace is deleted the snat redirect rules"},{"line_number":10,"context_line":"in router namespace should be cleaned."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Here we are basically reading the ip rule from the router namespace"},{"line_number":13,"context_line":"and just cleaning up the snat redirect rules that are no longer"},{"line_number":14,"context_line":"required, the rest of the rules should be untouched."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1aa78d24_9f1b8380","line":12,"updated":"2016-07-07 23:04:34.000000000","message":"Since we\u0027re dealing with the removal of the gateway device, we know all SNAT redirect rules should be removed. The code currently goes through every internal device and removes its redirect rules individually. Wouldn\u0027t it be easier to remove them all? Comments in-line.","commit_id":"4d037a4df513337400cc4c889b7e77dade5c90ec"}],"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":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            if ip_rule[\u0027table\u0027] \u003d\u003d \u0027default\u0027:"},{"line_number":287,"context_line":"                continue"},{"line_number":288,"context_line":"            if ip_rule[\u0027table\u0027] \u003d\u003d \u0027main\u0027:"},{"line_number":289,"context_line":"                continue"},{"line_number":290,"context_line":"            if (ip_rule[\u0027table\u0027] in"},{"line_number":291,"context_line":"                range(dvr_fip_ns.FIP_PR_START, dvr_fip_ns.FIP_PR_END)):"},{"line_number":292,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_cb8a7a1a","line":289,"updated":"2016-07-07 19:14:32.000000000","message":"The above could be on one line","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":288,"context_line":"            if ip_rule[\u0027table\u0027] \u003d\u003d \u0027main\u0027:"},{"line_number":289,"context_line":"                continue"},{"line_number":290,"context_line":"            if (ip_rule[\u0027table\u0027] in"},{"line_number":291,"context_line":"                range(dvr_fip_ns.FIP_PR_START, dvr_fip_ns.FIP_PR_END)):"},{"line_number":292,"context_line":"                continue"},{"line_number":293,"context_line":"            snat_table \u003d ip_rule[\u0027table\u0027]"},{"line_number":294,"context_line":"            gateway_cidr \u003d ip_rule[\u0027from\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_ab09ee96","line":291,"updated":"2016-07-07 19:14:32.000000000","message":"I think for this we also want to check ip_version is 4 since there is no FIPv6, right?","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        ns_ipr \u003d ip_lib.IPRule(namespace\u003dself.ns_name)"},{"line_number":307,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(rtr_interface, namespace\u003dself.ns_name)"},{"line_number":308,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, int(4))"},{"line_number":309,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, int(6))"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    def _snat_redirect_modify(self, gateway, sn_port, sn_int, is_add):"},{"line_number":312,"context_line":"        \"\"\"Adds or removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_4b984a78","line":309,"updated":"2016-07-07 19:14:32.000000000","message":"Think using IP_VERSION_4/6 from constants would fix this","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":445,"context_line":"        if not ex_gw_port:"},{"line_number":446,"context_line":"            for p in self.internal_ports:"},{"line_number":447,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":448,"context_line":"                self._snat_redirect_cleanup(internal_interface)"},{"line_number":449,"context_line":"            return"},{"line_number":450,"context_line":"        if self.snat_ports:"},{"line_number":451,"context_line":"            for p in self.internal_ports:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_2bccde87","line":448,"updated":"2016-07-07 19:14:32.000000000","message":"This an L461 could be combined in one.","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4225b927e3055c15a52b5e6cb43d78912455888d","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                snat_table in range(dvr_fip_ns.FIP_PR_START,"},{"line_number":288,"context_line":"                                    dvr_fip_ns.FIP_PR_END)):"},{"line_number":289,"context_line":"                continue"},{"line_number":290,"context_line":"            gateway \u003d ns_ipd.route.get_gateway("},{"line_number":291,"context_line":"                ip_version\u003dip_version, table\u003dsnat_table)"},{"line_number":292,"context_line":"            if gateway:"},{"line_number":293,"context_line":"                self._delete_gateway_device_if_exists("}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_da851908","line":290,"updated":"2016-07-07 23:04:34.000000000","message":"After filtering out any rules whose table is not \u0027local\u0027, \u0027default\u0027, \u0027main\u0027 or in the FIP range:\n\n\u0027ip rule del from %s\u0027 % ip_rule[\u0027from\u0027]\n\nThen:\n\n\u0027ip rule flush table %s\u0027 % snat_table\n\nThis way you don\u0027t have to execute get_gateway and we don\u0027t need ns_ipd.","commit_id":"4d037a4df513337400cc4c889b7e77dade5c90ec"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4225b927e3055c15a52b5e6cb43d78912455888d","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                               priority\u003dsnat_table)"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _snat_redirect_cleanup(self, sn_int):"},{"line_number":301,"context_line":"        ns_ipr \u003d ip_lib.IPRule(namespace\u003dself.ns_name)"},{"line_number":302,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(sn_int, namespace\u003dself.ns_name)"},{"line_number":303,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, l3_constants.IP_VERSION_4)"},{"line_number":304,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, l3_constants.IP_VERSION_6)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_5f163bf2","line":301,"updated":"2016-07-07 23:04:34.000000000","message":"Since ns_ipr is not a function of sn_int, but only self.ns_name, it should probably be defined in _stale_ip_rule_cleanup and not passed in as a parameter?","commit_id":"4d037a4df513337400cc4c889b7e77dade5c90ec"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4225b927e3055c15a52b5e6cb43d78912455888d","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    def _snat_redirect_cleanup(self, sn_int):"},{"line_number":301,"context_line":"        ns_ipr \u003d ip_lib.IPRule(namespace\u003dself.ns_name)"},{"line_number":302,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(sn_int, namespace\u003dself.ns_name)"},{"line_number":303,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, l3_constants.IP_VERSION_4)"},{"line_number":304,"context_line":"        self._stale_ip_rule_cleanup(ns_ipr, ns_ipd, l3_constants.IP_VERSION_6)"},{"line_number":305,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_fa973538","line":302,"updated":"2016-07-07 23:04:34.000000000","message":"I don\u0027t thnk we need ns_ipd, see comments above.","commit_id":"4d037a4df513337400cc4c889b7e77dade5c90ec"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fad41c33b761597f07bbce675c38465e401d99a0","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # cache along with the current ports."},{"line_number":458,"context_line":"            if self.snat_ports is None:"},{"line_number":459,"context_line":"                    internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":460,"context_line":"                    self.snat_redirect_cleanup(internal_interface)"},{"line_number":461,"context_line":"            else:"},{"line_number":462,"context_line":"                gateway \u003d self.get_snat_port_for_internal_port("},{"line_number":463,"context_line":"                    p, self.snat_ports)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9ad45d7e_8af3f99d","line":460,"updated":"2016-08-09 15:07:33.000000000","message":"Too much indentation, surprised pep8 missed this","commit_id":"c42de1e62926ac25abf1f14d0d44a64b37922fe3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f386c38e4d6fe2c8f9aaa031122c8a0864f6d1d1","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # cache along with the current ports."},{"line_number":458,"context_line":"            if self.snat_ports is None:"},{"line_number":459,"context_line":"                    internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":460,"context_line":"                    self.snat_redirect_cleanup(internal_interface)"},{"line_number":461,"context_line":"            else:"},{"line_number":462,"context_line":"                gateway \u003d self.get_snat_port_for_internal_port("},{"line_number":463,"context_line":"                    p, self.snat_ports)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9ad45d7e_5be1d199","line":460,"in_reply_to":"9ad45d7e_8af3f99d","updated":"2016-08-09 15:45:47.000000000","message":"Done","commit_id":"c42de1e62926ac25abf1f14d0d44a64b37922fe3"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b4c3e74507e85b96e4513d19ba7fc4b14d297b2","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        for p in self.internal_ports:"},{"line_number":456,"context_line":"            # NOTE: When removing the gateway port, pass in the snat_port"},{"line_number":457,"context_line":"            # cache along with the current ports."},{"line_number":458,"context_line":"            if self.snat_ports is None:"},{"line_number":459,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":460,"context_line":"                self.gateway_redirect_cleanup(internal_interface)"},{"line_number":461,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_fa217afc","line":458,"range":{"start_line":458,"start_character":12,"end_line":458,"end_character":39},"updated":"2016-08-10 08:54:22.000000000","message":"can this happen that someone called get_snat_port_for_internal_port() (or get_snat_interfaces()) earlier in router processing which made self.snat_ports \u003d\u003d []. Should we clean in this case as well?\n\nShould we explicitly call get_snat_port_for_internal_port() here? As otherwise we can clean snat rules while snat still exists but was rescheduled to another dvr_snat agent.","commit_id":"fda95663c66206494582991e41e473bb2eb34fca"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4649421ca44a0ddf9489654ae76c7a0781601b34","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        for p in self.internal_ports:"},{"line_number":456,"context_line":"            # NOTE: When removing the gateway port, pass in the snat_port"},{"line_number":457,"context_line":"            # cache along with the current ports."},{"line_number":458,"context_line":"            if self.snat_ports is None:"},{"line_number":459,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":460,"context_line":"                self.gateway_redirect_cleanup(internal_interface)"},{"line_number":461,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_138098f6","line":458,"range":{"start_line":458,"start_character":12,"end_line":458,"end_character":39},"in_reply_to":"9ad45d7e_fa217afc","updated":"2016-08-10 19:24:00.000000000","message":"Based on your comments, I checking the case and while the gateway is moved from one node to another or rescheduled from one node to another the self.snat_ports will not be None, because only the port-binding will change for the csnat ports.\n\nSo I think this part of the code #L-458 to #L-460 can be removed.","commit_id":"fda95663c66206494582991e41e473bb2eb34fca"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b4c3e74507e85b96e4513d19ba7fc4b14d297b2","unresolved":false,"context_lines":[{"line_number":464,"context_line":"                if not gateway:"},{"line_number":465,"context_line":"                    continue"},{"line_number":466,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":467,"context_line":"                self._snat_redirect_remove(gateway, p, internal_interface)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":470,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_950f712d","line":467,"range":{"start_line":467,"start_character":16,"end_line":467,"end_character":74},"updated":"2016-08-10 08:54:22.000000000","message":"unrelated to this patch but related to the one cleaning stale snat namespaces (merged): this code may be called on a dvr_snat agent when snat was rescheduled, is it correct to clean snat redirect rules in this case? seems no..","commit_id":"fda95663c66206494582991e41e473bb2eb34fca"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"023fe8f67358cb5e977e7b43208bae2bafee87fc","unresolved":false,"context_lines":[{"line_number":464,"context_line":"                if not gateway:"},{"line_number":465,"context_line":"                    continue"},{"line_number":466,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":467,"context_line":"                self._snat_redirect_remove(gateway, p, internal_interface)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":470,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_f56affeb","line":467,"range":{"start_line":467,"start_character":16,"end_line":467,"end_character":74},"in_reply_to":"9ad45d7e_73ed94b6","updated":"2016-08-11 00:12:49.000000000","message":"https://review.openstack.org/#/c/353788/ this should have the fix for calling _snat_redirect_remove properly.","commit_id":"fda95663c66206494582991e41e473bb2eb34fca"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"4649421ca44a0ddf9489654ae76c7a0781601b34","unresolved":false,"context_lines":[{"line_number":464,"context_line":"                if not gateway:"},{"line_number":465,"context_line":"                    continue"},{"line_number":466,"context_line":"                internal_interface \u003d self.get_internal_device_name(p[\u0027id\u0027])"},{"line_number":467,"context_line":"                self._snat_redirect_remove(gateway, p, internal_interface)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def _handle_router_snat_rules(self, ex_gw_port, interface_name):"},{"line_number":470,"context_line":"        \"\"\"Configures NAT rules for Floating IPs for DVR.\"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad45d7e_73ed94b6","line":467,"range":{"start_line":467,"start_character":16,"end_line":467,"end_character":74},"in_reply_to":"9ad45d7e_950f712d","updated":"2016-08-10 19:24:00.000000000","message":"This may not be related to this patch.\nBut calling the _snat_redirect_remove on gateway removed is a valid call. But while the gateway is moved or scheduled, it should not be called. That\u0027s what I think, since the csnat ports are still valid and so the rule should not be cleared.\nWhat do you think.","commit_id":"fda95663c66206494582991e41e473bb2eb34fca"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9ae0aa593d87bf171148bdf014fe1f1add7f0a59","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                               table\u003dsnat_table,"},{"line_number":310,"context_line":"                               priority\u003dpriority)"},{"line_number":311,"context_line":"            snat_table_list.append(snat_table)"},{"line_number":312,"context_line":"        for tb in snat_table_list:"},{"line_number":313,"context_line":"            ns_ipd.route.flush(ip_version, table\u003dtb)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def gateway_redirect_cleanup(self, rtr_interface):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7ac969e8_d0497190","line":312,"updated":"2016-08-13 02:28:49.000000000","message":"nit: s/tb/table","commit_id":"541ee07c12b922c413676d50e2fc3f30f71bd42f"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"9982b1572db989cb2a3e93c4ca6e89a361c982fe","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        self.delete_route(cidr, scope\u003d\u0027link\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"    def get_gateway("},{"line_number":753,"context_line":"        self, scope\u003dNone, filters\u003dNone, ip_version\u003dNone, table\u003dNone):"},{"line_number":754,"context_line":"        options \u003d [ip_version] if ip_version else []"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"        args \u003d [\u0027list\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_5f0b0924","line":753,"range":{"start_line":753,"start_character":8,"end_line":753,"end_character":69},"updated":"2016-07-07 10:02:18.000000000","message":"indent is confusing","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        self.delete_route(cidr, scope\u003d\u0027link\u0027)"},{"line_number":751,"context_line":""},{"line_number":752,"context_line":"    def get_gateway("},{"line_number":753,"context_line":"        self, scope\u003dNone, filters\u003dNone, ip_version\u003dNone, table\u003dNone):"},{"line_number":754,"context_line":"        options \u003d [ip_version] if ip_version else []"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"        args \u003d [\u0027list\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_8bf072ca","line":753,"range":{"start_line":753,"start_character":8,"end_line":753,"end_character":69},"in_reply_to":"1aa78d24_5f0b0924","updated":"2016-07-07 19:14:32.000000000","message":"Done","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"9982b1572db989cb2a3e93c4ca6e89a361c982fe","unresolved":false,"context_lines":[{"line_number":755,"context_line":""},{"line_number":756,"context_line":"        args \u003d [\u0027list\u0027]"},{"line_number":757,"context_line":"        args +\u003d self._dev_args()"},{"line_number":758,"context_line":"        if table:"},{"line_number":759,"context_line":"            args +\u003d self._table_args(table)"},{"line_number":760,"context_line":"        else:"},{"line_number":761,"context_line":"            args +\u003d self._table_args()"},{"line_number":762,"context_line":"        if filters:"},{"line_number":763,"context_line":"            args +\u003d filters"},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_9f11f154","line":761,"range":{"start_line":758,"start_character":8,"end_line":761,"end_character":38},"updated":"2016-07-07 10:02:18.000000000","message":"seems could be just: \n args +\u003d self._table_args(table)","commit_id":"b77dfef8999fc262f790108834daf17254b99429"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"772f2ffc85ead327a6837a6f910be4bb1c21a9c9","unresolved":false,"context_lines":[{"line_number":755,"context_line":""},{"line_number":756,"context_line":"        args \u003d [\u0027list\u0027]"},{"line_number":757,"context_line":"        args +\u003d self._dev_args()"},{"line_number":758,"context_line":"        if table:"},{"line_number":759,"context_line":"            args +\u003d self._table_args(table)"},{"line_number":760,"context_line":"        else:"},{"line_number":761,"context_line":"            args +\u003d self._table_args()"},{"line_number":762,"context_line":"        if filters:"},{"line_number":763,"context_line":"            args +\u003d filters"},{"line_number":764,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1aa78d24_6beb86dc","line":761,"range":{"start_line":758,"start_character":8,"end_line":761,"end_character":38},"in_reply_to":"1aa78d24_9f11f154","updated":"2016-07-07 19:14:32.000000000","message":"Done","commit_id":"b77dfef8999fc262f790108834daf17254b99429"}],"neutron/tests/functional/agent/l3/test_dvr_router.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"4225b927e3055c15a52b5e6cb43d78912455888d","unresolved":false,"context_lines":[{"line_number":772,"context_line":"        router1 \u003d self.manage_router(self.agent, router_info)"},{"line_number":773,"context_line":"        # Now save the internal device name to verify later"},{"line_number":774,"context_line":"        self._assert_snat_namespace_exists(router1)"},{"line_number":775,"context_line":"        self.assertTrue(self._namespace_exists(router1.ns_name))"},{"line_number":776,"context_line":"        # Now we have verified that the snat_namespace exists."},{"line_number":777,"context_line":"        self.assertTrue(router1.snat_namespace.exists())"},{"line_number":778,"context_line":"        restarted_agent \u003d neutron_l3_agent.L3NATAgentWithStateReport("}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_fafc5574","line":775,"updated":"2016-07-07 23:04:34.000000000","message":"What do you think of a functional test that configures a DVR router with a gateway, then \"restarts\" the agent (We do this in other tests by initializing a fresh copy of an agent, clearing any internal caches), then configuring the router again without an external interface, and asserting that the routing tables and rules were deleted.","commit_id":"4d037a4df513337400cc4c889b7e77dade5c90ec"}]}
