)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"86c347211a96abdabf54cfe9beb5d4eb4a4ff1d8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to remove the router interface from L3 agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This check ensure that the L3 agent will not try to remove the device"},{"line_number":14,"context_line":"gateway direction if the device no longer exists"},{"line_number":15,"context_line":"(Happens when the router external gateway is removed)"},{"line_number":16,"context_line":"(See bug for more details)"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7aaa499b_88cef858","line":14,"updated":"2015-04-10 21:20:41.000000000","message":"This comment isn\u0027t correct any more, as you\u0027re trying to delete it now, but catching the exception.  Same with the line above.","commit_id":"7b91fb00f91106993e6737b50f5325834f4b8bbb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"86c347211a96abdabf54cfe9beb5d4eb4a4ff1d8","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This check ensure that the L3 agent will not try to remove the device"},{"line_number":14,"context_line":"gateway direction if the device no longer exists"},{"line_number":15,"context_line":"(Happens when the router external gateway is removed)"},{"line_number":16,"context_line":"(See bug for more details)"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1435012"},{"line_number":19,"context_line":"Change-Id: Ieeaa01e7c0393f5200d1a8d2bbbc16befe7699a2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7aaa499b_2804847c","line":16,"updated":"2015-04-10 21:20:41.000000000","message":"Don\u0027t think you need this line.","commit_id":"7b91fb00f91106993e6737b50f5325834f4b8bbb"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"083f074613e595f5050d5826e13284ec782bd16b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"L3 service plugin first calls to remove_router_interface from the L2 OVS agent"},{"line_number":10,"context_line":"which delete this port from OVS and then the service plugin calls"},{"line_number":11,"context_line":"to remove the router interface from L3 agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This adds a new parameter to the delete_gateway method (ignore_dev_not_exist)"},{"line_number":14,"context_line":"that while set to true, supress the exception thrown when trying to"},{"line_number":15,"context_line":"delete gateway when the device doesnt exist"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7aaa499b_d89f0e5e","line":12,"updated":"2015-04-13 14:33:24.000000000","message":"Looking at the rest of the code, there\u0027s an attempt to unplug the device in case it exists. It looks like the code assumes that the device will be there... I added Michael Smith to the review, I\u0027d like to see what he thinks about this.","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"03f5f87b9cc46a9f24b3a4e61f07c7ef9947bee1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gal Sagie \u003cgal.sagie@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-15 08:53:56 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Supress exception when trying to remove non existing device in SNAT redirect"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"L3 service plugin first calls to remove_router_interface from the L2 OVS agent"},{"line_number":10,"context_line":"which delete this port from OVS and then the service plugin calls"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dac4157f_4c40c8a5","line":7,"updated":"2015-04-21 00:48:08.000000000","message":"Supress -\u003e Suppress","commit_id":"549e3e118e9eb0b3df7f2dc2697b3e8a5f3f3461"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"03f5f87b9cc46a9f24b3a4e61f07c7ef9947bee1","unresolved":false,"context_lines":[{"line_number":10,"context_line":"which delete this port from OVS and then the service plugin calls"},{"line_number":11,"context_line":"to remove the router interface from L3 agent."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Catch the exception thrown on the delete gateway, if its due to device doesnt exists"},{"line_number":14,"context_line":"ignore the exception"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1435012"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dac4157f_0c4ad0c5","line":13,"updated":"2015-04-21 00:48:08.000000000","message":"doesnt -\u003e doesn\u0027t","commit_id":"549e3e118e9eb0b3df7f2dc2697b3e8a5f3f3461"}],"neutron/agent/l3/dvr_router.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"654b7a4e8d1fa6af3cccbdcacab75942a7d7992b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_b16d639a","line":274,"updated":"2015-03-31 09:20:35.000000000","message":"It seems like there might be a race condition here if something else was deleting the gateway. It would be safer to try to delete the gateway and catch RuntimeErrors checking for \u0027Cannot find device\u0027 and then re-raising if that string isn\u0027t found. Correct me if I\u0027m misunderstanding the issue.","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a24f4388601d4966603a28223d142056eac7ad21","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_edc55e5b","line":274,"updated":"2015-03-30 21:06:50.000000000","message":"a new test seems required","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"75702a8c0efc982403c03977a5ac8a2bc5bf33ab","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_db3a3d98","line":274,"in_reply_to":"da9b358b_6a50fd5e","updated":"2015-03-31 12:37:02.000000000","message":"Ignore this, i will use what you suggested i understand the problem now","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"0f827d68c4a97ad508531ffa85a37cb801e7ceef","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_6a50fd5e","line":274,"in_reply_to":"da9b358b_b16d639a","updated":"2015-03-31 11:31:55.000000000","message":"You understand the issue completely, i am not sure why you think it would be safer.\n\nBut i have no problem reverting to your suggestion, i think it achieve the same","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"0cc58205ee6dfef280c117e57af1955f70f507b0","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_fb150a49","line":274,"in_reply_to":"da9b358b_edc55e5b","updated":"2015-03-31 08:45:46.000000000","message":"Thanks for the review Cedric,\n\nI do see that device_exists is tested in ip_lib and also the delete_gateway method is tested.\n\nI dont see any SNAT tests that i think are relevant to this, its a very simple \"if check\"\nHowever i do think that the entire snat_modify and snat operations in a DVR router are not covered enough in unit tests/functional tests and i plan on creating some scenarios in a different patch set.\n\nIf you think there is a proper place i can currently test this, please let me know.","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"79cf8c422a29b305b19ce76ba0c1fc7708944b5d","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            if ip_lib.device_exists(sn_int,"},{"line_number":275,"context_line":"                                                    namespace\u003dself.ns_name):"},{"line_number":276,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":277,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da9b358b_7b7d711b","line":274,"in_reply_to":"da9b358b_fb150a49","updated":"2015-03-31 12:44:00.000000000","message":"tests allow to check code behavior and code non-regression. imo, a test is required to ensure non-regression.\n\nI would define it in neutron/tests/unit/agent/l3/test_dvr_router","commit_id":"9d275e6a2fb6f3787eaf1c1bfdf33efbd19fbe75"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"70e744c5ab1ea9cd9179cedaadd50e9e579cd17a","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"},{"line_number":277,"context_line":"                                ignore_dev_not_exist\u003dTrue)"},{"line_number":278,"context_line":"                            ns_ipr.rule.delete(sn_port_cidr, snat_idx,"},{"line_number":279,"context_line":"                                               snat_idx)"},{"line_number":280,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_a4787ff3","line":277,"updated":"2015-04-03 10:36:06.000000000","message":"not sure we need to change method signature for this only case, how about handling exception here?","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a35901936ad31a77cbfa80e11a54bdccd20752b5","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"},{"line_number":277,"context_line":"                                ignore_dev_not_exist\u003dTrue)"},{"line_number":278,"context_line":"                            ns_ipr.rule.delete(sn_port_cidr, snat_idx,"},{"line_number":279,"context_line":"                                               snat_idx)"},{"line_number":280,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_e07d33b2","line":277,"in_reply_to":"baa041b7_a4787ff3","updated":"2015-04-05 04:38:02.000000000","message":"I think this option is use full for other users of this method (or future users)\n(i didnt check all places, but that could be a task for another change set)","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"083f074613e595f5050d5826e13284ec782bd16b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_78791a93","line":273,"updated":"2015-04-13 14:33:24.000000000","message":"Why did you choose to catch the exception inside the method and not by the caller?","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"aafef5b0f82c94f6bf2e7296f46cdb8d32975012","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_13b53bed","line":273,"in_reply_to":"7aaa499b_50385ca0","updated":"2015-04-14 07:55:52.000000000","message":"Let me jump in here. As per my earlier coment I also don\u0027t think that changing method API for this only case is a good idea. To me all these are not strong arguments: it \"can\" be used by \"someone\" at \"some\" point in future. Let\u0027s do refactoring when we actually see the need for it, not when we think we may have a need for it in future (YAGNI). It also brings a kind of inconsistency to ip_lib where delete_gateway() becomes the only method with ignore_dev_not_exist parameter.","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"5809603ea27c307fa520924d73a1d9da77ae6dd8","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_ee6560e1","line":273,"in_reply_to":"7aaa499b_78791a93","updated":"2015-04-13 15:26:44.000000000","message":"Because that way other users of this method can use this functionality which is useful","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"621cd3b017668e92ae1ee1851016dc8d803da082","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_50385ca0","line":273,"in_reply_to":"7aaa499b_d0d80256","updated":"2015-04-14 05:07:36.000000000","message":"I usually agree with you on this subject.\n\nDealing with synchronization problems can be achieved in two main ways in my opinion:\n\n1) solving and addressing every possible scenario\n\n2) doing a \"synchronization safe\" approach where few different flows can happen but the logical outcome is still correct.\n\nFrom my understanding the code in neutron took the second approach, which is to my opinion simpler and probably the better choice. \nThere are many different scenarios between the L2 and L3 agents and the controller.\n(Of course i could have gotten this wrong... so please correct me if i did)\n\nI think the logical thing to do in this case when a delete gateway route is applied on a none existence device is to ignore/catch the exception and continue with the code.\n\nI think there are other places in the code this can be used (or will be in the future), however i didn’t set it as the default behaviour exactly for the reason you mentioned, but it should be an option.\n\nIf you strongly think i should catch the exception here, i will convert it (i did see however few uses that similar things like that are used inside a method API, more specifically the if_exists/may_exists in the OVS lib)\n\nIf there are other issues in the rest of the code, we of course need to investigate and find them, at the time i noticed this issue i didnt see any other problems but i could have missed something.\n\nSorry for the long reply and let me know what you think :)","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3819d6ebe56f9bf8410d8ae9b2fe9edc4cc3b9b8","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_d0d80256","line":273,"in_reply_to":"7aaa499b_ee6560e1","updated":"2015-04-13 15:36:09.000000000","message":"I don\u0027t think it is. It wasn\u0027t needed up until this point, and now it\u0027s needed (And I use that term loosely) to hide a deeper issue, that this entire code flow assumes that the device exists when it doesn\u0027t. I really think that the exception should be caught the caller level. I wouldn\u0027t want more rampant use of this functionality - Any such time should be justified and explicit.","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"49a4d1ccf4c6deec5abbe8458fae7ebc4616ca0e","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            ns_ipd.route.delete_gateway("},{"line_number":275,"context_line":"                                gw_ip_addr,"},{"line_number":276,"context_line":"                                table\u003dsnat_idx,"},{"line_number":277,"context_line":"                                ignore_dev_not_exist\u003dTrue)"},{"line_number":278,"context_line":"                            ns_ipr.rule.delete(sn_port_cidr, snat_idx,"},{"line_number":279,"context_line":"                                               snat_idx)"},{"line_number":280,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":11,"id":"7aaa499b_33ba77c1","line":277,"updated":"2015-04-14 07:56:16.000000000","message":"please see comment on PS 10","commit_id":"1812ae7d699e02100b3bc64490151b08015b0042"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"03d659e699fe9b37d59c9713d4977c3630e7b1ad","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.warning(_LW(\"Suppressing device \""},{"line_number":280,"context_line":"                                                    \"not found exception, \""},{"line_number":281,"context_line":"                                                    \"device\u003d%s\"), sn_int)"},{"line_number":282,"context_line":"                                else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7aaa499b_6d693325","line":279,"updated":"2015-04-14 12:11:04.000000000","message":"Why warn level? Does it mean that something might be going wrong? Doesn\u0027t seem so according to the commit message.","commit_id":"d235df0e650d6f87e813025c6007874b9a268c44"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"18bd6b01f30be0d888c7cfd8f22860eb3ea01f2d","unresolved":false,"context_lines":[{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.warning(_LW(\"Suppressing device \""},{"line_number":280,"context_line":"                                                    \"not found exception, \""},{"line_number":281,"context_line":"                                                    \"device\u003d%s\"), sn_int)"},{"line_number":282,"context_line":"                                else:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7aaa499b_18baef0a","line":279,"in_reply_to":"7aaa499b_6d693325","updated":"2015-04-14 12:27:23.000000000","message":"Done","commit_id":"d235df0e650d6f87e813025c6007874b9a268c44"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2c1120664e3f2a3ff0881966e56eec8425370aa9","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            try:"},{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.debug(\"Suppressing device \""},{"line_number":280,"context_line":"                                              \"not found exception, \""}],"source_content_type":"text/x-python","patch_set":15,"id":"7aaa499b_23afac82","line":277,"updated":"2015-04-14 19:09:20.000000000","message":"This should use excutils.save_and_reraise_exception():\n\n  with excutils.save_and_reraise_exception() as ctx:\n      if \"Cannot find device\" in rte.message:\n          ctx.reraise \u003d False\n          LOG...","commit_id":"b7cda73aef1c85410add665fc558a73e4047b5a7"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"f81a4baaa02f1a770448326f3a204540d4d6108c","unresolved":false,"context_lines":[{"line_number":274,"context_line":"                            try:"},{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.debug(\"Suppressing device \""},{"line_number":280,"context_line":"                                              \"not found exception, \""}],"source_content_type":"text/x-python","patch_set":15,"id":"7aaa499b_3c0d7f37","line":277,"in_reply_to":"7aaa499b_23afac82","updated":"2015-04-15 05:50:11.000000000","message":"Done","commit_id":"b7cda73aef1c85410add665fc558a73e4047b5a7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"2c1120664e3f2a3ff0881966e56eec8425370aa9","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.debug(\"Suppressing device \""},{"line_number":280,"context_line":"                                              \"not found exception, \""},{"line_number":281,"context_line":"                                              \"device\u003d%s\", sn_int)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aaa499b_d4c0c0e2","line":278,"updated":"2015-04-14 19:09:20.000000000","message":"I dislike looking for specific text in an exception, especially at this high level.  Is there any way we can raise something more specific than a RuntimeError at the low level and catch a more specific exception?\n\nI realize that addressing this comment might get a little bit out of hand.  So, if there is already precedent for doing this sort of thing then I won\u0027t insist.","commit_id":"b7cda73aef1c85410add665fc558a73e4047b5a7"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"f81a4baaa02f1a770448326f3a204540d4d6108c","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"},{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                if \"Cannot find device\" in rte.message:"},{"line_number":279,"context_line":"                                    LOG.debug(\"Suppressing device \""},{"line_number":280,"context_line":"                                              \"not found exception, \""},{"line_number":281,"context_line":"                                              \"device\u003d%s\", sn_int)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7aaa499b_fcf4b787","line":278,"in_reply_to":"7aaa499b_d4c0c0e2","updated":"2015-04-15 05:50:11.000000000","message":"I could fine one example that uses the exception text (looked only at 10 results), however i am not sure how to do it any other way, this is an exception thrown trying to execute a CLI ip route command.\n\nIf you have better suggestion i will change it.","commit_id":"b7cda73aef1c85410add665fc558a73e4047b5a7"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"e56dbb19d908d2be0285c059e835f78500a10dff","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            try:"},{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bab921fb_2c002baa","line":273,"updated":"2015-04-22 18:59:33.000000000","message":"I know that this is on PS one trillion and you must be getting tired of idiotic -1\u0027s, but, bear with me: What do you think about encapsulating this bit of code in a method and targeting in a test? I\u0027d just like to see the code in the exception handling executed. Right now we don\u0027t even know if it\u0027s syntactically correct. I see you had tests in an earlier PS but removed them. Why is that?","commit_id":"82e5f84dca20a724dd9753ecad3fe4495bcab4b8"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"bfe91aa1b881418911b08c606d05ea0e605ec26f","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                            ns_ipwrapr.netns.execute("},{"line_number":271,"context_line":"                                [\u0027sysctl\u0027, \u0027-w\u0027,"},{"line_number":272,"context_line":"                                 \u0027net.ipv4.conf.%s.send_redirects\u003d0\u0027 % sn_int])"},{"line_number":273,"context_line":"                        else:"},{"line_number":274,"context_line":"                            try:"},{"line_number":275,"context_line":"                                ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":276,"context_line":"                                                            table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bab921fb_8e8548d0","line":273,"in_reply_to":"bab921fb_2c002baa","updated":"2015-04-25 15:00:08.000000000","message":"Its no problem, i prefer everyone to be comfortable with the code.\n\nThe reason why i removed the test is because before the change this check was inside the delete_gateway method, which is a small method defined to do a specific job and it made sense to test it.\n\nI think building a huge test case to mock this relatively small exception catching in this large (relatievly) method (which is currently not really tested a lot) is over complicated and not achieving what i would want in this case.\n\nI can\u0027t say i like the idea to change code just in order to test it, especially in this case, where i don\u0027t think it make much sense, i would more be interested to somehow split the seat_redirect_modify method (even that originally it was merged into one)\n\nI have added a bug and assigned it to me (https://bugs.launchpad.net/neutron/+bug/1438583) to create more test coverage for this method and area, and i intend to also add this case, but this is going to be on a different patch set.","commit_id":"82e5f84dca20a724dd9753ecad3fe4495bcab4b8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"673979cd0efcde37e46dd60ca612eb242b57ad8d","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                with (excutils.save_and_reraise_exception()"},{"line_number":279,"context_line":"                                      ) as ctx:"},{"line_number":280,"context_line":"                                    if \"Cannot find device\" in rte.message:"},{"line_number":281,"context_line":"                                        ctx.reraise \u003d False"},{"line_number":282,"context_line":"                                        LOG.debug(\"Suppressing device \""},{"line_number":283,"context_line":"                                                  \"not found exception, \""}],"source_content_type":"text/x-python","patch_set":17,"id":"bab921fb_4e8769d7","line":280,"updated":"2015-04-24 14:51:04.000000000","message":"also we should make an effort to avoid parsing text in exceptions.\nIf this is not possible as it would make the patch too big, please add a #FIXME note.","commit_id":"82e5f84dca20a724dd9753ecad3fe4495bcab4b8"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"bfe91aa1b881418911b08c606d05ea0e605ec26f","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                with (excutils.save_and_reraise_exception()"},{"line_number":279,"context_line":"                                      ) as ctx:"},{"line_number":280,"context_line":"                                    if \"Cannot find device\" in rte.message:"},{"line_number":281,"context_line":"                                        ctx.reraise \u003d False"},{"line_number":282,"context_line":"                                        LOG.debug(\"Suppressing device \""},{"line_number":283,"context_line":"                                                  \"not found exception, \""}],"source_content_type":"text/x-python","patch_set":17,"id":"bab921fb_8e5c287e","line":280,"in_reply_to":"bab921fb_4e8769d7","updated":"2015-04-25 15:00:08.000000000","message":"Can you please suggest how you would avoid this in this scenario (error message retrieved from issuing a CLI command)?","commit_id":"82e5f84dca20a724dd9753ecad3fe4495bcab4b8"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"fd1ef463356e44ae3a65f6a4e82aaf18a5313038","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                            except RuntimeError as rte:"},{"line_number":278,"context_line":"                                with (excutils.save_and_reraise_exception()"},{"line_number":279,"context_line":"                                      ) as ctx:"},{"line_number":280,"context_line":"                                    if \"Cannot find device\" in rte.message:"},{"line_number":281,"context_line":"                                        ctx.reraise \u003d False"},{"line_number":282,"context_line":"                                        LOG.debug(\"Suppressing device \""},{"line_number":283,"context_line":"                                                  \"not found exception, \""}],"source_content_type":"text/x-python","patch_set":17,"id":"bab921fb_707c02b5","line":280,"in_reply_to":"bab921fb_8e5c287e","updated":"2015-04-26 10:34:06.000000000","message":"The string could be checked in delete_gateway (or even deeper) and converted there to a proper exception.","commit_id":"82e5f84dca20a724dd9753ecad3fe4495bcab4b8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"d45af574757a92a0b2c46e99e0d5b192e8336bfc","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":254,"context_line":"        except ip_lib.DeviceNotExist:"},{"line_number":255,"context_line":"            with (excutils.save_and_reraise_exception()) as ctx:"},{"line_number":256,"context_line":"                ctx.reraise \u003d False"},{"line_number":257,"context_line":"                LOG.debug(\"Suppressing device not found exception, \""},{"line_number":258,"context_line":"                          \"device\u003d%s\", sn_int)"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_802d05aa","line":256,"updated":"2015-04-26 19:01:26.000000000","message":"If this block never reraises then there is no point in using save_and_reraise_exception().","commit_id":"45feb12259efd5b5530ab926582e8f681378733e"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"4f2da800e94af3bb99f122a2ce0035e501e3993c","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":254,"context_line":"        except ip_lib.DeviceNotExist:"},{"line_number":255,"context_line":"            with (excutils.save_and_reraise_exception()) as ctx:"},{"line_number":256,"context_line":"                ctx.reraise \u003d False"},{"line_number":257,"context_line":"                LOG.debug(\"Suppressing device not found exception, \""},{"line_number":258,"context_line":"                          \"device\u003d%s\", sn_int)"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_aca5a2a2","line":256,"in_reply_to":"bab921fb_802d05aa","updated":"2015-04-27 05:00:52.000000000","message":"Done","commit_id":"45feb12259efd5b5530ab926582e8f681378733e"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"56c0982e4c8becd058290a9cbe81693e73b8cc5a","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":254,"context_line":"        except ip_lib.DeviceNotExist:"},{"line_number":255,"context_line":"            with (excutils.save_and_reraise_exception()) as ctx:"},{"line_number":256,"context_line":"                ctx.reraise \u003d False"},{"line_number":257,"context_line":"                LOG.debug(\"Suppressing device not found exception, \""},{"line_number":258,"context_line":"                          \"device\u003d%s\", sn_int)"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_3160c9a4","line":256,"in_reply_to":"bab921fb_802d05aa","updated":"2015-04-27 02:24:44.000000000","message":"make sense","commit_id":"45feb12259efd5b5530ab926582e8f681378733e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6cc13ed3a8980bab5b3f6549890308135ef6114b","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            #remove default route entry"},{"line_number":133,"context_line":"            device \u003d ip_lib.IPDevice(rtr_2_fip_name, namespace\u003dself.ns_name)"},{"line_number":134,"context_line":"            ns_ip \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":135,"context_line":"            device.route.delete_gateway(str(fip_2_rtr.ip),"},{"line_number":136,"context_line":"                                        table\u003ddvr_fip_ns.FIP_RT_TBL)"},{"line_number":137,"context_line":"            self.fip_ns.local_subnets.release(self.router_id)"},{"line_number":138,"context_line":"            self.rtr_fip_subnet \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_6b6f2993","line":135,"updated":"2015-04-27 10:03:33.000000000","message":"can the same race occur here as well?\n\nand here too: ./neutron/agent/linux/dhcp.py:846","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a4d3042c38c61be48791d333f467c10d4e64faf7","unresolved":false,"context_lines":[{"line_number":132,"context_line":"            #remove default route entry"},{"line_number":133,"context_line":"            device \u003d ip_lib.IPDevice(rtr_2_fip_name, namespace\u003dself.ns_name)"},{"line_number":134,"context_line":"            ns_ip \u003d ip_lib.IPWrapper(namespace\u003dfip_ns_name)"},{"line_number":135,"context_line":"            device.route.delete_gateway(str(fip_2_rtr.ip),"},{"line_number":136,"context_line":"                                        table\u003ddvr_fip_ns.FIP_RT_TBL)"},{"line_number":137,"context_line":"            self.fip_ns.local_subnets.release(self.router_id)"},{"line_number":138,"context_line":"            self.rtr_fip_subnet \u003d None"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_66ce405c","line":135,"in_reply_to":"9abe1de1_6b6f2993","updated":"2015-04-27 10:48:26.000000000","message":"I assume its possible, i haven’t seen it happen in this area,\nBut there are many places where this needs to be checked \n\n(This is why i originally added an option to perform this in the delete_gateway API)\n\nHopefully that i will have some time to try and follow some paths and try to check problems (the big question here is if we want to enable this check here even if i wont be able to reproduce a problem)","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6cc13ed3a8980bab5b3f6549890308135ef6114b","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        return snat_idx"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _snat_delete_device_gateway(self, ns_ipd, gw_ip_addr,"},{"line_number":250,"context_line":"                                    snat_idx, sn_int):"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_cb7bd57a","line":250,"updated":"2015-04-27 10:03:33.000000000","message":"nitpicking: please use longer parameter names for help readability... for instance: ns_ipd -\u003e ns_ip_device or sn_int -\u003e snat_iface","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a4d3042c38c61be48791d333f467c10d4e64faf7","unresolved":false,"context_lines":[{"line_number":247,"context_line":"        return snat_idx"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def _snat_delete_device_gateway(self, ns_ipd, gw_ip_addr,"},{"line_number":250,"context_line":"                                    snat_idx, sn_int):"},{"line_number":251,"context_line":"        try:"},{"line_number":252,"context_line":"            ns_ipd.route.delete_gateway(gw_ip_addr,"},{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_86f8347e","line":250,"in_reply_to":"9abe1de1_cb7bd57a","updated":"2015-04-27 10:48:26.000000000","message":"Done","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6cc13ed3a8980bab5b3f6549890308135ef6114b","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":254,"context_line":"        except ip_lib.DeviceNotExist:"},{"line_number":255,"context_line":"            LOG.debug(\"Suppressing device not found exception, \""},{"line_number":256,"context_line":"                      \"device\u003d%s\", sn_int)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _snat_redirect_modify(self, gateway, sn_port, sn_int, is_add):"},{"line_number":259,"context_line":"        \"\"\"Adds or removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_ebd45948","line":256,"updated":"2015-04-27 10:03:33.000000000","message":"As suggested in another comment, this should be printed in the exception message and then you\u0027ll just suppress the exception","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a4d3042c38c61be48791d333f467c10d4e64faf7","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":254,"context_line":"        except ip_lib.DeviceNotExist:"},{"line_number":255,"context_line":"            LOG.debug(\"Suppressing device not found exception, \""},{"line_number":256,"context_line":"                      \"device\u003d%s\", sn_int)"},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def _snat_redirect_modify(self, gateway, sn_port, sn_int, is_add):"},{"line_number":259,"context_line":"        \"\"\"Adds or removes rules and routes for SNAT redirection.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_91ce2c82","line":256,"in_reply_to":"9abe1de1_ebd45948","updated":"2015-04-27 10:48:26.000000000","message":"Done","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d1cced9e5fbc014d8ad38151cbc83a75942e0013","unresolved":false,"context_lines":[{"line_number":247,"context_line":"            snat_idx \u003d net.value"},{"line_number":248,"context_line":"        return snat_idx"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"    def _snat_delete_device_gateway(self, ns_ip_device, gw_ip_addr,"},{"line_number":251,"context_line":"                                    snat_idx):"},{"line_number":252,"context_line":"        try:"},{"line_number":253,"context_line":"            ns_ip_device.route.delete_gateway(gw_ip_addr,"}],"source_content_type":"text/x-python","patch_set":25,"id":"5ad0253b_c9b3e109","line":250,"updated":"2015-04-28 17:44:34.000000000","message":"nit:  How about _delete_gateway_if_exists or something.  I look at the name of this method and wonder why it has snat in the name.","commit_id":"f6845986446601b92082c811f4181016ef0fefc8"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c74612b99268fb9e536f461bb9766d5b271e8581","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            ns_ip_device.route.delete_gateway(gw_ip_addr,"},{"line_number":254,"context_line":"                                        table\u003dsnat_idx)"},{"line_number":255,"context_line":"        except exceptions.DeviceNotFoundError:"},{"line_number":256,"context_line":"            # Suppress device not exist exception"},{"line_number":257,"context_line":"            pass"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _snat_redirect_modify(self, gateway, sn_port, sn_int, is_add):"}],"source_content_type":"text/x-python","patch_set":25,"id":"7ad32947_2859055b","line":256,"updated":"2015-04-28 14:50:23.000000000","message":"nit: the comment is kind-of overkill","commit_id":"f6845986446601b92082c811f4181016ef0fefc8"}],"neutron/agent/linux/ip_lib.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"e14576e2b8c396b66adc58576774dcc97b845d4b","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        try:"},{"line_number":410,"context_line":"            self._as_root([ip_version], tuple(args))"},{"line_number":411,"context_line":"        except RuntimeError as rte:"},{"line_number":412,"context_line":"            if (\"Cannot find device\" in rte.message) and ignore_dev_not_exist:"},{"line_number":413,"context_line":"                return"},{"line_number":414,"context_line":"            raise rte"},{"line_number":415,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_8eaa59d3","line":412,"updated":"2015-04-02 14:41:35.000000000","message":"a log message wouldn\u0027t hurt...","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a35901936ad31a77cbfa80e11a54bdccd20752b5","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        try:"},{"line_number":410,"context_line":"            self._as_root([ip_version], tuple(args))"},{"line_number":411,"context_line":"        except RuntimeError as rte:"},{"line_number":412,"context_line":"            if (\"Cannot find device\" in rte.message) and ignore_dev_not_exist:"},{"line_number":413,"context_line":"                return"},{"line_number":414,"context_line":"            raise rte"},{"line_number":415,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_c04b4f86","line":412,"in_reply_to":"baa041b7_8eaa59d3","updated":"2015-04-05 04:38:02.000000000","message":"Done","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"70e744c5ab1ea9cd9179cedaadd50e9e579cd17a","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        except RuntimeError as rte:"},{"line_number":412,"context_line":"            if (\"Cannot find device\" in rte.message) and ignore_dev_not_exist:"},{"line_number":413,"context_line":"                return"},{"line_number":414,"context_line":"            raise rte"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def list_onlink_routes(self, ip_version):"},{"line_number":417,"context_line":"        def iterate_routes():"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_64615739","line":414,"updated":"2015-04-03 10:36:06.000000000","message":"please use just \u0027raise\u0027 to preserve the stack trace","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a35901936ad31a77cbfa80e11a54bdccd20752b5","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        except RuntimeError as rte:"},{"line_number":412,"context_line":"            if (\"Cannot find device\" in rte.message) and ignore_dev_not_exist:"},{"line_number":413,"context_line":"                return"},{"line_number":414,"context_line":"            raise rte"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def list_onlink_routes(self, ip_version):"},{"line_number":417,"context_line":"        def iterate_routes():"}],"source_content_type":"text/x-python","patch_set":7,"id":"baa041b7_a04e0b94","line":414,"in_reply_to":"baa041b7_64615739","updated":"2015-04-05 04:38:02.000000000","message":"Done","commit_id":"bf2b865f640690e5503907890241a6122cb1ef85"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"86c347211a96abdabf54cfe9beb5d4eb4a4ff1d8","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        except RuntimeError as rte:"},{"line_number":412,"context_line":"            if (\"Cannot find device\" in rte.message) and ignore_dev_not_exist:"},{"line_number":413,"context_line":"                LOG.debug(\"Suppressing device not found exception, \""},{"line_number":414,"context_line":"                          \"device\u003d%s\" % (self.name))"},{"line_number":415,"context_line":"                return"},{"line_number":416,"context_line":"            raise"},{"line_number":417,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7aaa499b_48c1102e","line":414,"updated":"2015-04-10 21:20:41.000000000","message":"I think the (\"%s\", self.name) is preferred as it won\u0027t evaluate the argument here, but instead inside LOG.debug() only if it\u0027s called.","commit_id":"7b91fb00f91106993e6737b50f5325834f4b8bbb"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"d45af574757a92a0b2c46e99e0d5b192e8336bfc","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        except RuntimeError as rte:"},{"line_number":416,"context_line":"            if \"Cannot find device\" in rte.message:"},{"line_number":417,"context_line":"                raise DeviceNotExist()"},{"line_number":418,"context_line":"            raise"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    def list_onlink_routes(self, ip_version):"},{"line_number":421,"context_line":"        def iterate_routes():"}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_602af191","line":418,"updated":"2015-04-26 19:01:26.000000000","message":"Here I would use save_and_reraise_exception(), disabling reraise for DeviceNotExist.","commit_id":"45feb12259efd5b5530ab926582e8f681378733e"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"4f2da800e94af3bb99f122a2ce0035e501e3993c","unresolved":false,"context_lines":[{"line_number":415,"context_line":"        except RuntimeError as rte:"},{"line_number":416,"context_line":"            if \"Cannot find device\" in rte.message:"},{"line_number":417,"context_line":"                raise DeviceNotExist()"},{"line_number":418,"context_line":"            raise"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    def list_onlink_routes(self, ip_version):"},{"line_number":421,"context_line":"        def iterate_routes():"}],"source_content_type":"text/x-python","patch_set":19,"id":"bab921fb_0cbdaeb6","line":418,"in_reply_to":"bab921fb_602af191","updated":"2015-04-27 05:00:52.000000000","message":"Done\n\nEven that it looks strange to me since i do raise an exception here (its just a different one)","commit_id":"45feb12259efd5b5530ab926582e8f681378733e"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"d48979a3bdffdc29d835f3813f19d942fe1e7061","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        return retval"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"class DeviceNotExist(Exception):"},{"line_number":391,"context_line":"    pass"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_3a497dd1","line":390,"updated":"2015-04-27 09:12:11.000000000","message":"extend RuntimeError as it\u0027s a RuntimeError\nSet the message in the initializer. You want %s to\nbe able print you exception.\nAlso put context in the error (eg. device name)\nso that you can know what happened from the message\nand not have to dig up the logs.\n\n class DeviceNotExistsError(RuntimeError):\n     def __init__(self, device_name):\n         super(DeviceNotExistsError, self).__init__(\"IP device does not exist: %s\" % device_name)\n         self.device_name \u003d device_name","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"639a330614883992ee8b05a2054dccd639f63a7b","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        return retval"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"class DeviceNotExist(Exception):"},{"line_number":391,"context_line":"    pass"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_064d4472","line":390,"in_reply_to":"9abe1de1_3a497dd1","updated":"2015-04-27 10:20:22.000000000","message":"I think the context to the caller is obvious from the exception name (\"DeviceNotExist\") and from the fact that the caller received this exception when trying to delete a specific interface gateway route.\n\nHowever i will post a fix with this if you think its better","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"6cc13ed3a8980bab5b3f6549890308135ef6114b","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        return retval"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"class DeviceNotExist(Exception):"},{"line_number":391,"context_line":"    pass"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_eb78d991","line":390,"in_reply_to":"9abe1de1_3a497dd1","updated":"2015-04-27 10:03:33.000000000","message":"Most of the above is correct.\nHowever, while RuntimeError is technically correct, please consider defining the exception in neutron.common.exceptions and extending NeutronException.\n\nThere is already another exception raised in this module which follows this pattern and being consistent helps keeping the code base maintaineable.","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"a4d3042c38c61be48791d333f467c10d4e64faf7","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        return retval"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"class DeviceNotExist(Exception):"},{"line_number":391,"context_line":"    pass"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9abe1de1_d11f045a","line":390,"in_reply_to":"9abe1de1_eb78d991","updated":"2015-04-27 10:48:26.000000000","message":"Done","commit_id":"4ed0d6ba1e42d702745408940ea6e852a9acaa87"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a1be0430161bdbf71d164a54a4db0d0276c9d443","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        return retval"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"class DeviceNotExistsError(RuntimeError):"},{"line_number":391,"context_line":"    def __init__(self, device_name):"},{"line_number":392,"context_line":"        super(DeviceNotExistsError, self).__init__(\"IP device does not \""},{"line_number":393,"context_line":"                                                   \"exist: %s\" % device_name)"}],"source_content_type":"text/x-python","patch_set":21,"id":"9abe1de1_06b664dc","line":390,"updated":"2015-04-27 10:29:39.000000000","message":"whatever. I was just suggesting to keep the code a bit more maintainable, keeping all the exceptions together in the same module","commit_id":"fb0d2dce0afba75399d5afb234fa30430d59646b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d1cced9e5fbc014d8ad38151cbc83a75942e0013","unresolved":false,"context_lines":[{"line_number":409,"context_line":"            args +\u003d [\u0027table\u0027, table]"},{"line_number":410,"context_line":"        try:"},{"line_number":411,"context_line":"            self._as_root([ip_version], tuple(args))"},{"line_number":412,"context_line":"        except RuntimeError as rte:"},{"line_number":413,"context_line":"            with (excutils.save_and_reraise_exception()) as ctx:"},{"line_number":414,"context_line":"                if \"Cannot find device\" in rte.message:"},{"line_number":415,"context_line":"                    ctx.reraise \u003d False"}],"source_content_type":"text/x-python","patch_set":25,"id":"5ad0253b_8995e941","line":412,"updated":"2015-04-28 17:44:34.000000000","message":"I like this.  I\u0027m glad you convert to a more specific exception here as close as possible to the source of the error.","commit_id":"f6845986446601b92082c811f4181016ef0fefc8"}],"neutron/common/exceptions.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0b8d5672760bb0a3e9ec4a244e48f223048d44f3","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class DeviceNotExistsError(NeutronException):"},{"line_number":459,"context_line":"    message \u003d _(\"IP Device \u0027%(device_name)s\u0027 does not exists\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"7ad32947_36c18d2f","line":459,"updated":"2015-04-27 17:17:22.000000000","message":"Correct english is \"does not exist\".\n\nThis is a user facing message so I think it is important for it to be correct.\n\nAlso consider naming the exception DeviceNotFoundError.","commit_id":"a75d446fe697264c37b7253feb66c8575034430c"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c74612b99268fb9e536f461bb9766d5b271e8581","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class DeviceNotFoundError(NeutronException):"},{"line_number":459,"context_line":"    message \u003d _(\"IP Device \u0027%(device_name)s\u0027 does not exist\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"7ad32947_c86851f8","line":459,"updated":"2015-04-28 14:50:23.000000000","message":"Drop \u0027IP\u0027 here as the error only has to do with the device not existing, not the fact that an IP address is missing.  Other messages for this type of error are similar, like those in interface.py","commit_id":"f6845986446601b92082c811f4181016ef0fefc8"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cab051d234598fe34a64a06d8e3d9b8f186b4f88","unresolved":false,"context_lines":[{"line_number":456,"context_line":""},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"class DeviceNotFoundError(NeutronException):"},{"line_number":459,"context_line":"    message \u003d _(\"IP Device \u0027%(device_name)s\u0027 does not exist\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"5ad0253b_64519462","line":459,"in_reply_to":"7ad32947_c86851f8","updated":"2015-04-28 17:49:31.000000000","message":"After talking to Carl, I\u0027m fine with a follow-up to fix this later as it\u0027s a nit.  I can even do it once this merges.","commit_id":"f6845986446601b92082c811f4181016ef0fefc8"}],"neutron/tests/functional/agent/linux/test_ip_lib.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"083f074613e595f5050d5826e13284ec782bd16b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        routes \u003d ip_lib.get_routing_table(namespace\u003dattr.namespace)"},{"line_number":140,"context_line":"        self.assertEqual(expected_routes, routes)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def test_removing_non_existing_gateway_device_from_ns(self):"},{"line_number":143,"context_line":"        attr \u003d self.generate_device_details()"},{"line_number":144,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace\u003dattr.namespace)"},{"line_number":145,"context_line":"        ip.netns.add(attr.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_18e8d6e1","line":142,"updated":"2015-04-13 14:33:24.000000000","message":"Could you please add a comment saying that the device is not actually created? I had to double check what\u0027s going on here to make sense of it...","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"621cd3b017668e92ae1ee1851016dc8d803da082","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        routes \u003d ip_lib.get_routing_table(namespace\u003dattr.namespace)"},{"line_number":140,"context_line":"        self.assertEqual(expected_routes, routes)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def test_removing_non_existing_gateway_device_from_ns(self):"},{"line_number":143,"context_line":"        attr \u003d self.generate_device_details()"},{"line_number":144,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace\u003dattr.namespace)"},{"line_number":145,"context_line":"        ip.netns.add(attr.namespace)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_10589431","line":142,"in_reply_to":"7aaa499b_18e8d6e1","updated":"2015-04-14 05:07:36.000000000","message":"Done","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"083f074613e595f5050d5826e13284ec782bd16b","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace\u003dattr.namespace)"},{"line_number":145,"context_line":"        ip.netns.add(attr.namespace)"},{"line_number":146,"context_line":"        self.addCleanup(ip.netns.delete, attr.namespace)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(\"test\", namespace\u003dattr.namespace)"},{"line_number":149,"context_line":"        self.assertRaises(RuntimeError, ns_ipd.route.delete_gateway,"},{"line_number":150,"context_line":"                          \"192.168.10.1\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_18fa16be","line":147,"updated":"2015-04-13 14:33:24.000000000","message":"I don\u0027t think \u0027ipd\u0027 is a very common acronym, could you please rename it to something simple like \u0027device\u0027?","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"621cd3b017668e92ae1ee1851016dc8d803da082","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        ip \u003d ip_lib.IPWrapper(namespace\u003dattr.namespace)"},{"line_number":145,"context_line":"        ip.netns.add(attr.namespace)"},{"line_number":146,"context_line":"        self.addCleanup(ip.netns.delete, attr.namespace)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(\"test\", namespace\u003dattr.namespace)"},{"line_number":149,"context_line":"        self.assertRaises(RuntimeError, ns_ipd.route.delete_gateway,"},{"line_number":150,"context_line":"                          \"192.168.10.1\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"7aaa499b_d0422c3e","line":147,"in_reply_to":"7aaa499b_18fa16be","updated":"2015-04-14 05:07:36.000000000","message":"Done","commit_id":"542db3f3f3128a7b7bfba8d1b44bab2d6f787aa4"}],"neutron/tests/unit/test_linux_ip_lib.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"168f9f99be5782c80191185277df7bd8b23e1c33","unresolved":false,"context_lines":[{"line_number":928,"context_line":"            execute.assert_called_once_with([\u0027test\u0027],"},{"line_number":929,"context_line":"                                            check_exit_code\u003dTrue,"},{"line_number":930,"context_line":"                                            extra_ok_codes\u003dNone)"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    def test_removing_non_existing_gateway_device_from_ns(self):"},{"line_number":933,"context_line":"        netns_cmd \u003d ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":934,"context_line":"        netns_cmd.add(\"test_ns\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"baa041b7_231a746f","line":931,"updated":"2015-04-01 13:43:56.000000000","message":"You should be testing this in neutron/tests/functional/agent/linux/test_ip_lib.","commit_id":"175d8330ce71786d29bf756bfa44ee14243828f6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d5272f1125d336e9200b95fbea422f3029b9e8a0","unresolved":false,"context_lines":[{"line_number":930,"context_line":"                                            extra_ok_codes\u003dNone)"},{"line_number":931,"context_line":""},{"line_number":932,"context_line":"    def test_removing_non_existing_gateway_device_from_ns(self):"},{"line_number":933,"context_line":"        netns_cmd \u003d ip_lib.IpNetnsCommand(ip_lib.SubProcessBase())"},{"line_number":934,"context_line":"        netns_cmd.add(\"test_ns\")"},{"line_number":935,"context_line":"        ns_ipd \u003d ip_lib.IPDevice(\"test\", namespace\u003d\"test_ns\")"},{"line_number":936,"context_line":"        self.assertRaises(RuntimeError, ns_ipd.route.delete_gateway,"}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_f49846c2","line":933,"updated":"2015-04-01 11:01:19.000000000","message":"you should mock system calls","commit_id":"175d8330ce71786d29bf756bfa44ee14243828f6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d5272f1125d336e9200b95fbea422f3029b9e8a0","unresolved":false,"context_lines":[{"line_number":936,"context_line":"        self.assertRaises(RuntimeError, ns_ipd.route.delete_gateway,"},{"line_number":937,"context_line":"                          \"192.168.10.1\")"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        # With ignore_dev_not_exists, exception is supressed"},{"line_number":940,"context_line":"        ns_ipd.route.delete_gateway(\"192.168.10.1\", ignore_dev_not_exist\u003dTrue)"},{"line_number":941,"context_line":"        netns_cmd.delete(\"test_ns\")"},{"line_number":942,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_d1af9428","line":939,"updated":"2015-04-01 11:01:19.000000000","message":"L939-942 seem not required?","commit_id":"175d8330ce71786d29bf756bfa44ee14243828f6"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"2f0e5f6ea51dd42eb140fcedab4d722ba1781577","unresolved":false,"context_lines":[{"line_number":936,"context_line":"        self.assertRaises(RuntimeError, ns_ipd.route.delete_gateway,"},{"line_number":937,"context_line":"                          \"192.168.10.1\")"},{"line_number":938,"context_line":""},{"line_number":939,"context_line":"        # With ignore_dev_not_exists, exception is supressed"},{"line_number":940,"context_line":"        ns_ipd.route.delete_gateway(\"192.168.10.1\", ignore_dev_not_exist\u003dTrue)"},{"line_number":941,"context_line":"        netns_cmd.delete(\"test_ns\")"},{"line_number":942,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da9b358b_8601c807","line":939,"in_reply_to":"da9b358b_d1af9428","updated":"2015-04-01 13:25:05.000000000","message":"Checks that no exception is raised when ignore_dev_not_exist\u003dTrue\n\nshould i use assertIsNone instead?","commit_id":"175d8330ce71786d29bf756bfa44ee14243828f6"}]}
