)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fdb091f85f1fa8ea7a0e75fcea5b30f7b5e659eb","unresolved":false,"context_lines":[{"line_number":16,"context_line":"The solution is to simply return \u0027False\u0027 instead \u0027RouterNotHostedByL3Agent\u0027"},{"line_number":17,"context_line":"which will not propagate and avoid causing an error to the user."},{"line_number":18,"context_line":"This solution matches the behaviour found when trying"},{"line_number":19,"context_line":"to schedule a router to the same agent twich."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-Bug: #1406705"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a930d6b_b71436f6","line":19,"updated":"2015-01-21 11:30:16.000000000","message":"typo: twice","commit_id":"a9e6738727c7ad23579804d58ceedd769aa8dd2a"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"848d4feef2d7b25a96abd955e01fa73637c588b4","unresolved":false,"context_lines":[{"line_number":16,"context_line":"The solution is to simply return \u0027False\u0027 instead \u0027RouterNotHostedByL3Agent\u0027"},{"line_number":17,"context_line":"which will not propagate and avoid causing an error to the user."},{"line_number":18,"context_line":"This solution matches the behaviour found when trying"},{"line_number":19,"context_line":"to schedule a router to the same agent twich."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-Bug: #1406705"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a930d6b_92574802","line":19,"in_reply_to":"1a930d6b_b71436f6","updated":"2015-01-21 11:50:56.000000000","message":"Done","commit_id":"a9e6738727c7ad23579804d58ceedd769aa8dd2a"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"fdb091f85f1fa8ea7a0e75fcea5b30f7b5e659eb","unresolved":false,"context_lines":[{"line_number":19,"context_line":"to schedule a router to the same agent twich."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-Bug: #1406705"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I015bfc0fde11ba4f39417e4c134faa8132cb3eac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a930d6b_f7f5decb","line":22,"updated":"2015-01-21 11:30:16.000000000","message":"APIImpact?","commit_id":"a9e6738727c7ad23579804d58ceedd769aa8dd2a"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"848d4feef2d7b25a96abd955e01fa73637c588b4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"to schedule a router to the same agent twich."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-Bug: #1406705"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I015bfc0fde11ba4f39417e4c134faa8132cb3eac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a930d6b_d240f037","line":22,"in_reply_to":"1a930d6b_f7f5decb","updated":"2015-01-21 11:50:56.000000000","message":"I\u0027ll add it.","commit_id":"a9e6738727c7ad23579804d58ceedd769aa8dd2a"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7813239a00acf0fb8c88be0e0cadd0077a226d4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yoni Shafrir \u003cyshafrir@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-21 13:44:13 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Removing a router twice from the same agent shouldn\u0027t cause an error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_a7fac840","line":7,"updated":"2015-01-25 14:46:51.000000000","message":"Why? We should expect an error in such case as we are trying to unbind a router from an unbinded agent","commit_id":"d77b3b8229358e4967261f4891bd8320b1fc8424"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"979e5f92262f89ddc9a2d2391a9233a44684ec67","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Yoni Shafrir \u003cyshafrir@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-21 13:44:13 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Removing a router twice from the same agent shouldn\u0027t cause an error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_eaf73057","line":7,"in_reply_to":"1a930d6b_a7fac840","updated":"2015-01-26 05:40:47.000000000","message":"This is in order to preserve consistency.\nOriginally i suggested to match the \u0027add\u0027 behavior to the \u0027remove\u0027 behavior causing it to fail: \n\nhttps://review.openstack.org/#/c/144681/2\n\nThis was discouraged and as an alternative others suggested to adapt the \u0027remove\u0027 behavior to avoid errors.","commit_id":"d77b3b8229358e4967261f4891bd8320b1fc8424"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"e7813239a00acf0fb8c88be0e0cadd0077a226d4","unresolved":false,"context_lines":[{"line_number":19,"context_line":"to schedule a router to the same agent twice."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"APIImpact: Server no longer responds with HTTP 409 \u0027Conflict\u0027"},{"line_number":22,"context_line":"\t   when trying to remove a router from the same agent"},{"line_number":23,"context_line":"\t   twice."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Closes-Bug: #1406705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_e7f05069","line":22,"updated":"2015-01-25 14:46:51.000000000","message":"avoid tabulations","commit_id":"d77b3b8229358e4967261f4891bd8320b1fc8424"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"979e5f92262f89ddc9a2d2391a9233a44684ec67","unresolved":false,"context_lines":[{"line_number":19,"context_line":"to schedule a router to the same agent twice."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"APIImpact: Server no longer responds with HTTP 409 \u0027Conflict\u0027"},{"line_number":22,"context_line":"\t   when trying to remove a router from the same agent"},{"line_number":23,"context_line":"\t   twice."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Closes-Bug: #1406705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a930d6b_6aa3404f","line":22,"in_reply_to":"1a930d6b_e7f05069","updated":"2015-01-26 05:40:47.000000000","message":"Done","commit_id":"d77b3b8229358e4967261f4891bd8320b1fc8424"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Removing a router twice from the same agent shouldn\u0027t cause an error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_22fe6206","line":10,"updated":"2015-02-26 21:57:47.000000000","message":"nit: cause -\u003e causes","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Removing a router twice from the same agent shouldn\u0027t cause an error"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_281279b4","line":10,"in_reply_to":"ba7be1f8_22fe6206","updated":"2015-03-01 09:45:26.000000000","message":"Done","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f0f6fd3510d3e932b42ff0c1e0b2e215242da30a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"},{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_b5c61998","line":12,"updated":"2015-02-26 16:52:16.000000000","message":"picking nits here.  Your patch doesn\u0027t actually return False, it returns None.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"},{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_e2f0ca93","line":12,"in_reply_to":"ba7be1f8_0ee19629","updated":"2015-02-26 21:57:47.000000000","message":"A method that always returns \u0027None\u0027 effectively does not return a value.  I suggest rewording to\n\nThe method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception\ton failure.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"fa8cdf638aad446209398b9dd543a53261caa1e1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"},{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_0ee19629","line":12,"in_reply_to":"ba7be1f8_b5c61998","updated":"2015-02-26 17:27:52.000000000","message":"nit: returing -\u003e returning","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When we remove a router from an agent that has already been"},{"line_number":10,"context_line":"unscheduled from we raise an exception that eventually cause an error."},{"line_number":11,"context_line":"The method \u0027_unbind_router\u0027 raises a \u0027RouterNotHostedByL3Agent\u0027 exception"},{"line_number":12,"context_line":"as opposed to simply returing \u0027False\u0027."},{"line_number":13,"context_line":"In both cases the actual removal of the router from the same agent"},{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_0844d5b5","line":12,"in_reply_to":"ba7be1f8_e2f0ca93","updated":"2015-03-01 09:45:26.000000000","message":"Done","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The solution is to simply return \u0027False\u0027 instead \u0027RouterNotHostedByL3Agent\u0027"},{"line_number":17,"context_line":"which will not propagate and avoid causing an error to the user."},{"line_number":18,"context_line":"This solution matches the behaviour found when trying"},{"line_number":19,"context_line":"to schedule a router to the same agent twice."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_c20e6632","line":17,"updated":"2015-02-26 21:57:47.000000000","message":"causing -\u003e showing\n\n-\u003e The solution is to stop raising RouterNotHostedByL3Agent so that  _unbind_router() being invoked without error can indicate that the router is no longer bound.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":14,"context_line":"has no effect."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The solution is to simply return \u0027False\u0027 instead \u0027RouterNotHostedByL3Agent\u0027"},{"line_number":17,"context_line":"which will not propagate and avoid causing an error to the user."},{"line_number":18,"context_line":"This solution matches the behaviour found when trying"},{"line_number":19,"context_line":"to schedule a router to the same agent twice."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_c820fdfa","line":17,"in_reply_to":"ba7be1f8_c20e6632","updated":"2015-03-01 09:45:26.000000000","message":"Done","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"https://review.openstack.org/#/c/144681/2"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"APIImpact: Server no longer responds with HTTP 409 \u0027Conflict\u0027"},{"line_number":26,"context_line":"when trying to remove a router from the same agent twice."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Closes-Bug: #1406705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_4251960d","line":25,"updated":"2015-02-26 21:57:47.000000000","message":"Is this behavior (returning 409) actually documented?  If not, I don\u0027t think an APIImpact tag is suggested.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"https://review.openstack.org/#/c/144681/2"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"APIImpact: Server no longer responds with HTTP 409 \u0027Conflict\u0027"},{"line_number":26,"context_line":"when trying to remove a router from the same agent twice."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Closes-Bug: #1406705"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_e81f81b5","line":25,"in_reply_to":"ba7be1f8_4251960d","updated":"2015-03-01 09:45:26.000000000","message":"I\u0027ll remove it.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c64eba92ab5ec35509932ed7bebabed81237f96f","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                raise l3agentscheduler.RouterNotHostedByL3Agent("},{"line_number":235,"context_line":"                    router_id\u003drouter_id, agent_id\u003dagent_id)"},{"line_number":236,"context_line":"            context.session.delete(binding)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_8850dd5f","side":"PARENT","line":234,"updated":"2015-02-09 14:57:45.000000000","message":"You should also remove the exception class since it\u0027s not used anywhere else.\n\nAlso, you will need to cleanup code in:\nneutron/plugins/ml2/plugin.py\nneutron/tests/unit/ml2/test_ml2_plugin.py\n\nSince you don\u0027t raise the exception anymore, there is not reason to test and handle it there.","commit_id":"64bd24f9d63f679140b770eb59e196636d71926c"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"fe77ebca54fedb2893f8e7ca9cbe946ee14f2be1","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                raise l3agentscheduler.RouterNotHostedByL3Agent("},{"line_number":235,"context_line":"                    router_id\u003drouter_id, agent_id\u003dagent_id)"},{"line_number":236,"context_line":"            context.session.delete(binding)"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_b0db221a","side":"PARENT","line":234,"in_reply_to":"da86d52c_8850dd5f","updated":"2015-02-10 08:26:43.000000000","message":"Actually it was used in another place and i updated it to conform with the exception\u0027s removal. thanks.","commit_id":"64bd24f9d63f679140b770eb59e196636d71926c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c64eba92ab5ec35509932ed7bebabed81237f96f","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                return False"},{"line_number":235,"context_line":"            context.session.delete(binding)"},{"line_number":236,"context_line":"        return True"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_a880418c","line":234,"updated":"2015-02-09 14:57:45.000000000","message":"I wonder why we return anything at all. It does not seem we actually use the return value anywhere. If it\u0027s just for tests, I think there are other ways to test those two different cases without adding the return value hook here.","commit_id":"82b037207c5e3f5b52b15db31d8972143ae5073e"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"fe77ebca54fedb2893f8e7ca9cbe946ee14f2be1","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                return False"},{"line_number":235,"context_line":"            context.session.delete(binding)"},{"line_number":236,"context_line":"        return True"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_12c31758","line":234,"in_reply_to":"da86d52c_a880418c","updated":"2015-02-10 08:26:43.000000000","message":"Done","commit_id":"82b037207c5e3f5b52b15db31d8972143ae5073e"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c903612dadd04957e9640236ced43965d1bcb1cb","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":230,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d agent_id)"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"                context.session.delete(binding)"},{"line_number":234,"context_line":"            except exc.NoResultFound:"},{"line_number":235,"context_line":"                # router may have been removed by another process"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_f3b9097a","line":232,"updated":"2015-02-10 19:42:39.000000000","message":"I think the deletion should be moved out of the try block. Reference: http://stackoverflow.com/questions/25030656/python-try-block-size","commit_id":"cd2874f3a1ede5c6fb3941ceef1e1391e6038644"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"09d1b14ed592b6966ce34203a9e154a5f51dfecd","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":230,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d agent_id)"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"                context.session.delete(binding)"},{"line_number":234,"context_line":"            except exc.NoResultFound:"},{"line_number":235,"context_line":"                # router may have been removed by another process"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_93543155","line":232,"in_reply_to":"da86d52c_f3b9097a","updated":"2015-02-18 09:08:15.000000000","message":"Done","commit_id":"cd2874f3a1ede5c6fb3941ceef1e1391e6038644"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"689caa6030185cd53f72c2972e4884eda8674212","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":230,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d agent_id)"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                # router may have been removed by another process"},{"line_number":235,"context_line":"                LOG.debug(\"Router %(id)s not hosted by L3 agent %(agent)s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_751a247e","line":232,"updated":"2015-02-25 12:17:43.000000000","message":"we could do just query.delete() and even avoid catching NoResultFound.\n\nBut debug message might be useful for troubleshooting","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":230,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d agent_id)"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                # router may have been removed by another process"},{"line_number":235,"context_line":"                LOG.debug(\"Router %(id)s not hosted by L3 agent %(agent)s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_e26a8a80","line":232,"in_reply_to":"ba7be1f8_751a247e","updated":"2015-02-26 21:57:47.000000000","message":"I also think that it would be preferable to simply use query.delete().  We can as easily look at db or sqlalchemy logs when we need to troubleshoot, so let\u0027s skip retrieval of an object that won\u0027t be used.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                RouterL3AgentBinding.router_id \u003d\u003d router_id,"},{"line_number":230,"context_line":"                RouterL3AgentBinding.l3_agent_id \u003d\u003d agent_id)"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                binding \u003d query.one()"},{"line_number":233,"context_line":"            except exc.NoResultFound:"},{"line_number":234,"context_line":"                # router may have been removed by another process"},{"line_number":235,"context_line":"                LOG.debug(\"Router %(id)s not hosted by L3 agent %(agent)s\","}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_a85d894a","line":232,"in_reply_to":"ba7be1f8_e26a8a80","updated":"2015-03-01 09:45:26.000000000","message":"I\u0027ll replace this section with \u0027query.delete\u0027","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"}],"neutron/tests/unit/test_l3_schedulers.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c64eba92ab5ec35509932ed7bebabed81237f96f","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self, router_scheduled\u003dTrue):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_7cab6ed6","line":344,"updated":"2015-02-09 14:57:45.000000000","message":"\u0027router_scheduled\u0027 implies that it\u0027s already scheduled before the method is called, while the real intent of the argument is to request router scheduling inside it. I think a better name would be \u0027schedule_router\u003d\u0027.","commit_id":"82b037207c5e3f5b52b15db31d8972143ae5073e"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"fe77ebca54fedb2893f8e7ca9cbe946ee14f2be1","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self, router_scheduled\u003dTrue):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_4d508e0a","line":344,"in_reply_to":"da86d52c_7cab6ed6","updated":"2015-02-10 08:26:43.000000000","message":"You are right, i\u0027ll just use assertions in the tests.","commit_id":"82b037207c5e3f5b52b15db31d8972143ae5073e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"9e280f6764b49c5d530f0441312935f8d6df3ade","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self, router_scheduled\u003dTrue):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_bcfcd93f","line":344,"updated":"2015-02-10 10:13:49.000000000","message":"I don\u0027t think you handled the comment from the previous changeset. The idea is to rename router_scheduled\u003d argument into e.g. schedule_router\u003d to show that the method actually schedules one and not just assumes it\u0027s scheduled.","commit_id":"a0b0cb8f82cbf635397d6876d6684b5d5404ac29"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"66d50597ec365a3b737369742b233d0486771746","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self, router_scheduled\u003dTrue):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_9cab951d","line":344,"in_reply_to":"da86d52c_bcfcd93f","updated":"2015-02-10 10:15:21.000000000","message":"I\u0027m sorry, i completely forgot it.","commit_id":"a0b0cb8f82cbf635397d6876d6684b5d5404ac29"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c903612dadd04957e9640236ced43965d1bcb1cb","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                                   tenant_id\u003dstr(uuid.uuid4()),"},{"line_number":349,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":350,"context_line":"        if schedule_router:"},{"line_number":351,"context_line":"            self._test_schedule_bind_router(agent, router)"},{"line_number":352,"context_line":"        with mock.patch.object(self.adminContext.session, \u0027delete\u0027) as delete:"},{"line_number":353,"context_line":"            self._unbind_router(self.adminContext,"},{"line_number":354,"context_line":"                                router[\u0027router\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_6ea52c46","line":351,"updated":"2015-02-10 19:42:39.000000000","message":"Instead of mocking delete you can get the router bindings after unbinding it and assert that there are no bindings.\n\nTo test that removing an unscheduled router doesn\u0027t throw an exception, I would just create a router, unbind it, and assert nothing. The test should be named something like: \"test_remove_router_from_l3_agent_unscheduled_router_doesnt_raise\". Since the test will fail if someone changes this behavior, the test fulfills its purpose even without asserting anything.","commit_id":"cd2874f3a1ede5c6fb3941ceef1e1391e6038644"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"09d1b14ed592b6966ce34203a9e154a5f51dfecd","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                                   tenant_id\u003dstr(uuid.uuid4()),"},{"line_number":349,"context_line":"                                   name\u003d\u0027r1\u0027)"},{"line_number":350,"context_line":"        if schedule_router:"},{"line_number":351,"context_line":"            self._test_schedule_bind_router(agent, router)"},{"line_number":352,"context_line":"        with mock.patch.object(self.adminContext.session, \u0027delete\u0027) as delete:"},{"line_number":353,"context_line":"            self._unbind_router(self.adminContext,"},{"line_number":354,"context_line":"                                router[\u0027router\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_f3700d0a","line":351,"in_reply_to":"da86d52c_6ea52c46","updated":"2015-02-18 09:08:15.000000000","message":"Done","commit_id":"cd2874f3a1ede5c6fb3941ceef1e1391e6038644"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"ec4f7fff308b3eafef177e9120076bd6669c32ce","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_62985a6b","line":344,"updated":"2015-02-26 21:57:47.000000000","message":"I don\u0027t think it\u0027s necessary to check for the case of not raising, since it has nothing to do with the new implementation.  This method should simply be renamed (e.g. test_unbind_router_removes_binding) and the other test additions can be removed.","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"6b4b26a24bf216e3277df87314eea12801fccf98","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def _test_unbind_router(self):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_2818b983","line":344,"in_reply_to":"ba7be1f8_62985a6b","updated":"2015-03-01 09:45:26.000000000","message":"Done","commit_id":"6cafffe33d97e6d101248dfab3030c4e7b2bf954"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"67ebc197f705e70dcbf378bd7674447bf3a89c6d","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def test_unbind_router_removes_binding(self):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_bbaa1f17","line":344,"updated":"2015-03-02 11:00:52.000000000","message":"test_unbind_router_removes_binding -\u003e test__unbind_router_removes_binding","commit_id":"91e0383d1e76a760a3a9b562978ada2ebdc64575"},{"author":{"_account_id":14024,"name":"Yoni Shafrir","email":"yshafrir@redhat.com","username":"yoni"},"change_message_id":"3516c576d580e2e2e4aa2f8575473e819a11037b","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                                        router[\u0027router\u0027][\u0027id\u0027])"},{"line_number":342,"context_line":"            self.assertNotEqual(already_scheduled, auto_s.called)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def test_unbind_router_removes_binding(self):"},{"line_number":345,"context_line":"        agent_id \u003d self.agent_id1"},{"line_number":346,"context_line":"        agent \u003d self.agent1"},{"line_number":347,"context_line":"        router \u003d self._make_router(self.fmt,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_8ce7e03f","line":344,"in_reply_to":"ba7be1f8_bbaa1f17","updated":"2015-03-02 13:07:25.000000000","message":"Done","commit_id":"91e0383d1e76a760a3a9b562978ada2ebdc64575"}]}
