)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fa24d85c3ac313b23d4997e452979a4f7bba7475","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Also, add some relevant unit tests."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closed-Bug: #1490917"},{"line_number":19,"context_line":"Change-Id: I1cef944115c1911d4b7e60fb4dff389b1911ddbb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3aaa91ec_4074a566","line":18,"range":{"start_line":18,"start_character":5,"end_line":18,"end_character":6},"updated":"2016-07-01 12:13:48.000000000","message":"Needs to be \u0027Closes-Bug\u0027 for tracking.","commit_id":"da32ad2dc10472950b5a0a80feeba233cba8084f"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"12700557954c30a43e74d70be12eca43a4d73684","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Also, add some relevant unit tests."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closed-Bug: #1490917"},{"line_number":19,"context_line":"Change-Id: I1cef944115c1911d4b7e60fb4dff389b1911ddbb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3aaa91ec_f6f0f7fe","line":18,"range":{"start_line":18,"start_character":5,"end_line":18,"end_character":6},"in_reply_to":"3aaa91ec_4074a566","updated":"2016-07-01 12:46:41.000000000","message":"oops, thanks","commit_id":"da32ad2dc10472950b5a0a80feeba233cba8084f"}],"neutron/db/l3_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6cc3da11339bc68bb722e448ffb00989dcd7caa3","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                  \"the router: %s\"), router)"},{"line_number":187,"context_line":"                try:"},{"line_number":188,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":189,"context_line":"                except db_exc.InvalidRequestError:"},{"line_number":190,"context_line":"                    # NOTE(yamamoto): Some of plugins call us within"},{"line_number":191,"context_line":"                    # a transaction.  If _update_router_gw_info breaks"},{"line_number":192,"context_line":"                    # the transaction, and delete_router attempted to"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_bec45c5f","line":189,"updated":"2015-09-02 05:51:37.000000000","message":"Usually errors like [1] can be dealt by removing the extra level of nesting or using savepoints. I don\u0027t think this is a viable approach: it\u0027s a masking an underlying programmatic error in the code implementing \u0027delete_router\u0027.\n\n[1] \u0027InvalidRequestError: This Session\u0027s transaction has been rolled back by a nested rollback() call.  To begin a new transaction, issue Session.rollback() first.\u0027","commit_id":"b7c2501fc7c2b8f8e6027afd00a396cfc97d782d"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"fb52e8ac31152b4e92a3fb2c0bcad24dc7ff7efd","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                                  \"the router: %s\"), router)"},{"line_number":187,"context_line":"                try:"},{"line_number":188,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":189,"context_line":"                except db_exc.InvalidRequestError:"},{"line_number":190,"context_line":"                    # NOTE(yamamoto): Some of plugins call us within"},{"line_number":191,"context_line":"                    # a transaction.  If _update_router_gw_info breaks"},{"line_number":192,"context_line":"                    # the transaction, and delete_router attempted to"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_94193925","line":189,"in_reply_to":"da20952f_bec45c5f","updated":"2015-09-02 06:57:22.000000000","message":"Done","commit_id":"b7c2501fc7c2b8f8e6027afd00a396cfc97d782d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9dba5b2efde3ede05fe0ed6918619c8200554903","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        router_db \u003d self._create_router_db(context, r, tenant_id)"},{"line_number":179,"context_line":"        try:"},{"line_number":180,"context_line":"            if gw_info:"},{"line_number":181,"context_line":"                # NOTE(yamamoto): Use a nested transaction to avoid breaking"},{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_150f4c89","line":181,"updated":"2015-09-02 16:29:25.000000000","message":"this isn\u0027t what I meant and it\u0027s actually worse. I meant for you to revisit the midonet code and leave this one alone.","commit_id":"994a2a6bf87d161545f59aa1c1b3d958b0985298"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6bbf2785099f216f34855c47b1c4c539415744d5","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        router_db \u003d self._create_router_db(context, r, tenant_id)"},{"line_number":179,"context_line":"        try:"},{"line_number":180,"context_line":"            if gw_info:"},{"line_number":181,"context_line":"                # NOTE(yamamoto): Use a nested transaction to avoid breaking"},{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_84bf9afb","line":181,"in_reply_to":"da20952f_150f4c89","updated":"2015-09-03 00:17:15.000000000","message":"i\u0027m not sure what\u0027s you meant.  can you explain a little?\n\nyou provided a pointer to plugin\u0027s delete_router\nbut when delete_router is called it\u0027s too late as the surrounding transaction is already broken.\n\nplugin\u0027s create_router\u0027s use of a surrounding transaction\nis a legitimate (well, or at least common) pattern.\nso i think it\u0027s ok.\n\nit can be workarounded in plugin\u0027s create_port (and whatever _update_router_gw_info calls) but i don\u0027t think\nit\u0027s a good idea because it puts too much knowledge of caller (l3_db) to plugins.","commit_id":"994a2a6bf87d161545f59aa1c1b3d958b0985298"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"34093b1c8c2be4536ddfab9685e3737279bcaf72","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_b067bbb6","line":185,"updated":"2015-09-08 17:34:04.000000000","message":"I was suggesting to use autonested_transaction in the midonet code that wrapped the super version of create_router and leave this code untouched. Did you attempt that?","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"74ca1956019600447e7c5d1836161dda8abd70c2","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_c3537138","line":185,"in_reply_to":"da20952f_52a891db","updated":"2015-09-09 07:50:42.000000000","message":"if we take the route, what do you think should be done for other methods?","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a1f0731f83e74ccfb4dcc60a2f613a70110a919c","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_d7cfb355","line":185,"in_reply_to":"da20952f_776107a8","updated":"2015-09-09 04:32:57.000000000","message":"All I am trying to saying is that you\u0027re nesting transactions in the midonet code to handle partial failures.\n\nTo prevent you from being affected by changes that caused you to do this, you\u0027d be a lot better off using savepoints directly in your code.","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"dc5aef891494f2e0cc2239b2d08d1b7ceb205e85","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_52a891db","line":185,"in_reply_to":"da20952f_777ca7eb","updated":"2015-09-09 05:19:48.000000000","message":"I think that is not a workaround and that [1] is really what you want\n\nThe hierarchy made by db and controller classes has given us problems since the start, and it\u0027s incredibly flawed, but that\u0027s besides the point.\n\n[1] https://review.openstack.org/#/c/221591/","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a38d640363769f306b822f7f443cd9390256fdc6","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_776107a8","line":185,"in_reply_to":"da20952f_b067bbb6","updated":"2015-09-09 04:27:18.000000000","message":"i don\u0027t understand how it can change the situation.\ndo you mean create_port?\n\ni can workaround the problem by using autonested_transaction in midonet\u0027s create_port.\nas i said in PS2, i feel it\u0027s too kludge, though.","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"ee8409220b7711701196cb15e34cbb84a612451a","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                # the surrounding transaction in case we are called within"},{"line_number":183,"context_line":"                # a transaction.  Otherwise the following delete_router"},{"line_number":184,"context_line":"                # would end up with InvalidRequestError."},{"line_number":185,"context_line":"                with db_api.autonested_transaction(context.session):"},{"line_number":186,"context_line":"                    self._update_router_gw_info(context, router_db[\u0027id\u0027],"},{"line_number":187,"context_line":"                                                gw_info, router\u003drouter_db)"},{"line_number":188,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_777ca7eb","line":185,"in_reply_to":"da20952f_d7cfb355","updated":"2015-09-09 04:56:56.000000000","message":"it\u0027s surely easier for us.  but i\u0027m not sure it\u0027s better,\nin the POV of plugin api design.\n\nanyway i submitted an alternative patch.  does it look better to you?  https://review.openstack.org/#/c/221591/","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"c4f913010de53a25418358878702e2e0dd8114a5","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                try:"},{"line_number":193,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":194,"context_line":"                except Exception:"},{"line_number":195,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":196,"context_line":"                    # rather than the one from delete_router."},{"line_number":197,"context_line":"                    pass"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_8c3dca2e","line":195,"updated":"2015-09-08 14:49:05.000000000","message":"not sure what you mean here. Do you plan to log different message?","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"9d745190842624fe630a4d5321a2cda04192ecd3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                try:"},{"line_number":193,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":194,"context_line":"                except Exception:"},{"line_number":195,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":196,"context_line":"                    # rather than the one from delete_router."},{"line_number":197,"context_line":"                    pass"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_cdc5fb3d","line":195,"in_reply_to":"da20952f_4a50f10a","updated":"2015-09-08 15:26:35.000000000","message":"Why not do it as part of the patch?","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b9dad1df2342812f4e842aeaf267164002cfe294","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                try:"},{"line_number":193,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":194,"context_line":"                except Exception:"},{"line_number":195,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":196,"context_line":"                    # rather than the one from delete_router."},{"line_number":197,"context_line":"                    pass"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_4a50f10a","line":195,"in_reply_to":"da20952f_8c3dca2e","updated":"2015-09-08 15:03:17.000000000","message":"i meant to throw the right exception.\nthe exception from delete_router is less interesting.","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"35131d3a20f53d4841f9af12d78bf185ebb129e1","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                try:"},{"line_number":193,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":194,"context_line":"                except Exception:"},{"line_number":195,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":196,"context_line":"                    # rather than the one from delete_router."},{"line_number":197,"context_line":"                    pass"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_e1b57cd0","line":195,"in_reply_to":"da20952f_cdc5fb3d","updated":"2015-09-12 06:02:18.000000000","message":"He is doing it with excutils.save_and_reraise_exception():\n\nso the original exception that was caught should be thrown.","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"a38d640363769f306b822f7f443cd9390256fdc6","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                try:"},{"line_number":193,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":194,"context_line":"                except Exception:"},{"line_number":195,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":196,"context_line":"                    # rather than the one from delete_router."},{"line_number":197,"context_line":"                    pass"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_773a679a","line":195,"in_reply_to":"da20952f_cdc5fb3d","updated":"2015-09-09 04:27:18.000000000","message":"i did this in this patch just because i was too lazy to make a separate patch.","commit_id":"ed49c84913a1f2d2961fe3ae03c1fb73aeabf691"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"931e6754f1f61c8a051bcd7fa9b97e83613b7976","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    LOG.debug(\"Could not update gateway info, \""},{"line_number":187,"context_line":"                              \"deleting router.\")"},{"line_number":188,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":189,"context_line":"                except Exception:"},{"line_number":190,"context_line":"                    # NOTE(yamamoto): Report the original exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_6e7bd27b","line":187,"updated":"2015-09-30 10:35:21.000000000","message":"do we need to wrap the text?","commit_id":"f92b40cc3c64da966cf2a85cd88c406b3c0a818c"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"80a9886e7e9c707f70bc8c6f46c9d5c5446e7e1f","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    LOG.debug(\"Could not update gateway info, \""},{"line_number":187,"context_line":"                              \"deleting router.\")"},{"line_number":188,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":189,"context_line":"                except Exception:"},{"line_number":190,"context_line":"                    # NOTE(yamamoto): Report the original exception"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_e705c045","line":187,"in_reply_to":"9a1a9d01_6e7bd27b","updated":"2015-09-30 14:53:58.000000000","message":"yes, otherwise the line is too long.\nor do you mean something else?","commit_id":"f92b40cc3c64da966cf2a85cd88c406b3c0a818c"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3d32d7868b726352eba48a4d02e778e746a0731a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                try:"},{"line_number":185,"context_line":"                    LOG.debug(\"Could not update gateway info, \""},{"line_number":186,"context_line":"                              \"deleting router.\")"},{"line_number":187,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_3102f2b4","line":186,"updated":"2015-10-01 06:15:40.000000000","message":"nit: Do you need to include this debug in try-statement?","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"498e1d40e70a1881ec35d63c9600eb0781ff54cd","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                try:"},{"line_number":185,"context_line":"                    LOG.debug(\"Could not update gateway info, \""},{"line_number":186,"context_line":"                              \"deleting router.\")"},{"line_number":187,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_31ac328b","line":186,"in_reply_to":"9a1a9d01_3102f2b4","updated":"2015-10-01 06:22:13.000000000","message":"probably not.","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"0c7ee11c9ef9f449245f27dd4b615d0b64d704d5","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                try:"},{"line_number":185,"context_line":"                    LOG.debug(\"Could not update gateway info, \""},{"line_number":186,"context_line":"                              \"deleting router.\")"},{"line_number":187,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_5c70d60a","line":186,"in_reply_to":"9a1a9d01_31ac328b","updated":"2015-10-01 09:24:01.000000000","message":"Done","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3d32d7868b726352eba48a4d02e778e746a0731a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":190,"context_line":"                    # rather than the one from delete_router."},{"line_number":191,"context_line":"                    pass"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_11c00e4f","line":191,"updated":"2015-10-01 06:15:40.000000000","message":"This patch just deletes Exception from delete_router. Therefore, if you want to merge this patch, you should prepare original exception in this patch.","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"498e1d40e70a1881ec35d63c9600eb0781ff54cd","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":190,"context_line":"                    # rather than the one from delete_router."},{"line_number":191,"context_line":"                    pass"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_91a17e96","line":191,"in_reply_to":"9a1a9d01_11c00e4f","updated":"2015-10-01 06:22:13.000000000","message":"i guess you are missing the save_and_reraise_exception block?","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6e85ed6163e0ee094e9d1833e85cdb5bd7e03e27","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":190,"context_line":"                    # rather than the one from delete_router."},{"line_number":191,"context_line":"                    pass"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_9c42ee66","line":191,"in_reply_to":"9a1a9d01_913dfe2c","updated":"2015-10-01 09:33:50.000000000","message":"Done","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"03779953e36e0b037e120d1681618a22390c3c7a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":190,"context_line":"                    # rather than the one from delete_router."},{"line_number":191,"context_line":"                    pass"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_ff043c15","line":191,"in_reply_to":"9a1a9d01_913dfe2c","updated":"2015-10-01 09:30:45.000000000","message":"I guess that the save_and_reraise_exception saves exception of _update_router_gw_info but doesn\u0027t save exception of delete_router if my understanding is right... but I may misunderstand.","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"91d2cdb0db5f3aa87bb1826ff688744386cc3dd2","unresolved":false,"context_lines":[{"line_number":188,"context_line":"                except Exception:"},{"line_number":189,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":190,"context_line":"                    # rather than the one from delete_router."},{"line_number":191,"context_line":"                    pass"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a1a9d01_913dfe2c","line":191,"in_reply_to":"9a1a9d01_91a17e96","updated":"2015-10-01 06:30:59.000000000","message":"We should at least log the reason why the delete operation failed for debugging purposes.","commit_id":"85066fa19cd8618d9305b44f78668156db1d9a37"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"6acefbfebf77495332f168431545d64224498ec6","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception as exc:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router: %s\" % exc)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_2fe82f16","line":187,"updated":"2015-10-01 17:44:31.000000000","message":"pep complains about redefining \u0027exc\u0027 variable","commit_id":"51516735f71c1a857c16a21744c34f285ef4f8bf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f2b9c5342cddfab32adaba519694c4d80ac71e3d","unresolved":false,"context_lines":[{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception as exc:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router: %s\" % exc)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_a4a894dc","line":187,"in_reply_to":"9a1a9d01_2fe82f16","updated":"2015-10-05 04:55:55.000000000","message":"Done","commit_id":"51516735f71c1a857c16a21744c34f285ef4f8bf"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"0bd4e9702220dd540a9b67ed24d14ab96a1493c7","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                except Exception as exc:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router: %s\" % exc)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_25901095","line":190,"updated":"2015-10-03 09:23:47.000000000","message":"you can use LOG.debug(\"...\", exc_info\u003d1)","commit_id":"51516735f71c1a857c16a21744c34f285ef4f8bf"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"f2b9c5342cddfab32adaba519694c4d80ac71e3d","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                except Exception as exc:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router: %s\" % exc)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a1a9d01_44b09843","line":190,"in_reply_to":"9a1a9d01_25901095","updated":"2015-10-05 04:55:55.000000000","message":"Done","commit_id":"51516735f71c1a857c16a21744c34f285ef4f8bf"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"1fcb1aa231ef36f5e973158bdc44cce68d0e9cd1","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                            gw_info, router\u003drouter_db)"},{"line_number":182,"context_line":"        except Exception:"},{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_cf95a1e4","line":184,"updated":"2015-10-05 07:02:57.000000000","message":"how about rephrasing the information: \"Could not update gateway info. reason \u003d router %(router_name)s under deletion\".","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"60375e78a92db602481629162eae36f8742ba224","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                                            gw_info, router\u003drouter_db)"},{"line_number":182,"context_line":"        except Exception:"},{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_9d827a51","line":184,"in_reply_to":"9a1a9d01_cf95a1e4","updated":"2015-10-05 10:53:03.000000000","message":"sorry, your suggested text seems rather confusing to me.","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"913d6518280ec74f343ab45ff802a1ec78fefaa1","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_f9be93d3","line":186,"range":{"start_line":186,"start_character":19,"end_line":186,"end_character":61},"updated":"2015-10-05 14:21:15.000000000","message":"Actually I filed a bug about something like this https://bugs.launchpad.net/neutron/+bug/1501686 Here is the same situation. Router cannot be deleted as session has been rollback, so I such change shows the original exception, but hides the one from delete_router()","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"54fed097f463d55e9928bf79c49ca4df4a3317ea","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":184,"context_line":"                LOG.debug(\"Could not update gateway info, deleting router.\")"},{"line_number":185,"context_line":"                try:"},{"line_number":186,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":187,"context_line":"                except Exception:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_7119e721","line":186,"range":{"start_line":186,"start_character":19,"end_line":186,"end_character":61},"in_reply_to":"7a2fa921_f9be93d3","updated":"2016-06-14 10:51:01.000000000","message":"Done","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"1fcb1aa231ef36f5e973158bdc44cce68d0e9cd1","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                except Exception:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router\", exc_info\u003d1)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_0f94f9df","line":190,"updated":"2015-10-05 07:02:57.000000000","message":"How about adding router name / id for more info?","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"60375e78a92db602481629162eae36f8742ba224","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                except Exception:"},{"line_number":188,"context_line":"                    # NOTE(yamamoto): Report the original exception"},{"line_number":189,"context_line":"                    # rather than the one from delete_router."},{"line_number":190,"context_line":"                    LOG.debug(\"Failed to delete router\", exc_info\u003d1)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":193,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_5df3820a","line":190,"in_reply_to":"9a1a9d01_0f94f9df","updated":"2015-10-05 10:53:03.000000000","message":"i think it\u0027s often obvious when looking at the log.","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cc9966b7e0fb08ffd1039a777e59c094a8eb43d8","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        create \u003d functools.partial(self._create_router_db, context, r,"},{"line_number":235,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":236,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":237,"context_line":"        def update_gw(router_id):"},{"line_number":238,"context_line":"            if gw_info:"},{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_07c2cce8","line":237,"updated":"2016-06-26 09:31:55.000000000","message":"please do not use nested methods. why is this not part a local method?","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"cd5292007e111f34ac64f87c1e1582d26f0fb27d","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        create \u003d functools.partial(self._create_router_db, context, r,"},{"line_number":235,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":236,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":237,"context_line":"        def update_gw(router_id):"},{"line_number":238,"context_line":"            if gw_info:"},{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_8da37342","line":237,"in_reply_to":"3aaa91ec_07c2cce8","updated":"2016-07-01 09:15:27.000000000","message":"Done","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"352d55cfac93b9e118c7da1ecb3359010b718b8f","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        create \u003d functools.partial(self._create_router_db, context, r,"},{"line_number":235,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":236,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":237,"context_line":"        def update_gw(router_id):"},{"line_number":238,"context_line":"            if gw_info:"},{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_b22974e8","line":237,"in_reply_to":"3aaa91ec_07c2cce8","updated":"2016-06-26 11:53:54.000000000","message":"i\u0027m not sure what\u0027s wrong with nested methods.","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"0f6f9c9a3837efaaa3c0304fefecd60aa1721ab4","unresolved":false,"context_lines":[{"line_number":234,"context_line":"        create \u003d functools.partial(self._create_router_db, context, r,"},{"line_number":235,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":236,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":237,"context_line":"        def update_gw(router_id):"},{"line_number":238,"context_line":"            if gw_info:"},{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_3949dd31","line":237,"in_reply_to":"3aaa91ec_b22974e8","updated":"2016-06-27 08:39:40.000000000","message":"This is just the way how we can use safe_creation method here. Please, see http://docs.openstack.org/developer/neutron/devref/effective_neutron.html#database-interaction","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"70d6bfcad9107c9b2a588fa8bce95f2b75d5d32b","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"},{"line_number":241,"context_line":"                                            gw_info, router\u003drouter_db)"},{"line_number":242,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":243,"context_line":"                                                           delete, update_gw,"},{"line_number":244,"context_line":"                                                           transaction\u003dFalse)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_52352df5","line":242,"range":{"start_line":242,"start_character":19,"end_line":242,"end_character":26},"updated":"2016-06-23 08:57:47.000000000","message":"Just \"_\" is better than _unused.","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"3d381a73e98d25ba08c682a42a73ef3e9e2b2589","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"},{"line_number":241,"context_line":"                                            gw_info, router\u003drouter_db)"},{"line_number":242,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":243,"context_line":"                                                           delete, update_gw,"},{"line_number":244,"context_line":"                                                           transaction\u003dFalse)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_fdb50531","line":242,"range":{"start_line":242,"start_character":19,"end_line":242,"end_character":26},"in_reply_to":"3aaa91ec_48baa0c1","updated":"2016-06-23 11:01:52.000000000","message":"Well, we can use \"__\" but I don\u0027t complain and I\u0027m OK about current style.","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"50acf05a60cde5cbd6316d305ca2c4e2ab2c688f","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                router_db \u003d self._get_router(context, router_id)"},{"line_number":240,"context_line":"                self._update_router_gw_info(context, router_id,"},{"line_number":241,"context_line":"                                            gw_info, router\u003drouter_db)"},{"line_number":242,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":243,"context_line":"                                                           delete, update_gw,"},{"line_number":244,"context_line":"                                                           transaction\u003dFalse)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3aaa91ec_48baa0c1","line":242,"range":{"start_line":242,"start_character":19,"end_line":242,"end_character":26},"in_reply_to":"3aaa91ec_52352df5","updated":"2016-06-23 09:18:09.000000000","message":"i prefer to avoid \"_\" as it can confuse i18n.","commit_id":"0d3dd5931c335dadb021a723684ad2f87f729e8b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4ec69c9c61b46dd5adfb73a2984987a3a4f99abd","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":242,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":243,"context_line":"        update_gw \u003d functools.partial(self._update_gw_for_create_router,"},{"line_number":244,"context_line":"                                      context, gw_info)"},{"line_number":245,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":246,"context_line":"                                                           delete, update_gw,"},{"line_number":247,"context_line":"                                                           transaction\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3aaa91ec_1b77a73c","line":244,"updated":"2016-07-01 14:52:10.000000000","message":"You\u0027re missing the \u0027router_id\u0027 argument here.  And you should add a test that verifies these methods are called with the correct arguments based on input to create_router().","commit_id":"e25151be3d71abc9b51cfc85b92b42b3e1162354"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8a98220df8e18f03e30ef972e2264b940bbe565e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":242,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":243,"context_line":"        update_gw \u003d functools.partial(self._update_gw_for_create_router,"},{"line_number":244,"context_line":"                                      context, gw_info)"},{"line_number":245,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":246,"context_line":"                                                           delete, update_gw,"},{"line_number":247,"context_line":"                                                           transaction\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aa78d24_d35ac34f","line":244,"in_reply_to":"1aa78d24_6e038fb9","updated":"2016-07-05 15:03:17.000000000","message":"Yes, sorry, should have looked at safe_creation() closer, it was my confusion.\n\nMy only nit now if you re-spin is that the other callers of safe_creation() all do:\n\ncreation \u003d ...\ncontent \u003d ...\ndeletion \u003d ...\n\nWould be nice to keep them all the same to avoid confusion.","commit_id":"e25151be3d71abc9b51cfc85b92b42b3e1162354"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"dc7f7d3eaac3d05f8c2ab6e53b6c8f7e19a1c722","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                                   r[\u0027tenant_id\u0027])"},{"line_number":242,"context_line":"        delete \u003d functools.partial(self.delete_router, context)"},{"line_number":243,"context_line":"        update_gw \u003d functools.partial(self._update_gw_for_create_router,"},{"line_number":244,"context_line":"                                      context, gw_info)"},{"line_number":245,"context_line":"        router_db, _unused \u003d common_db_mixin.safe_creation(context, create,"},{"line_number":246,"context_line":"                                                           delete, update_gw,"},{"line_number":247,"context_line":"                                                           transaction\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aa78d24_6e038fb9","line":244,"in_reply_to":"3aaa91ec_1b77a73c","updated":"2016-07-01 22:58:32.000000000","message":"the argument is provided by safe_creation.\nthere are existing cases which cover it.  eg. test_router_create_with_gwinfo_ext_ip","commit_id":"e25151be3d71abc9b51cfc85b92b42b3e1162354"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"931e6754f1f61c8a051bcd7fa9b97e83613b7976","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2511,"context_line":"                raise n_exc.NeutronException"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"        plugin._update_router_gw_info \u003d _update_router_gw_info"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        def create_router_with_transaction(ctx, data):"},{"line_number":2516,"context_line":"            # Emulates what many plugins do"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_eebda202","line":2513,"updated":"2015-09-30 10:35:21.000000000","message":"we should use mock","commit_id":"f92b40cc3c64da966cf2a85cd88c406b3c0a818c"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e0e9fac454148f888fe21ca5d21f9eac369c240b","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2511,"context_line":"                raise n_exc.NeutronException"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"        plugin._update_router_gw_info \u003d _update_router_gw_info"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        def create_router_with_transaction(ctx, data):"},{"line_number":2516,"context_line":"            # Emulates what many plugins do"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_dc62a63d","line":2513,"in_reply_to":"9a1a9d01_7bf4e559","updated":"2015-10-01 09:24:19.000000000","message":"Done","commit_id":"f92b40cc3c64da966cf2a85cd88c406b3c0a818c"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"80a9886e7e9c707f70bc8c6f46c9d5c5446e7e1f","unresolved":false,"context_lines":[{"line_number":2510,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2511,"context_line":"                raise n_exc.NeutronException"},{"line_number":2512,"context_line":""},{"line_number":2513,"context_line":"        plugin._update_router_gw_info \u003d _update_router_gw_info"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        def create_router_with_transaction(ctx, data):"},{"line_number":2516,"context_line":"            # Emulates what many plugins do"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a1a9d01_7bf4e559","line":2513,"in_reply_to":"9a1a9d01_eebda202","updated":"2015-09-30 14:53:58.000000000","message":"i followed the above test case (test_create_router_gateway_fails)\nbut probably you\u0027re right.","commit_id":"f92b40cc3c64da966cf2a85cd88c406b3c0a818c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"de101bb5d03be9f2452c1e5f5c4020d92d478bdc","unresolved":false,"context_lines":[{"line_number":2507,"context_line":"            \u0027name\u0027: \u0027router1\u0027, \u0027admin_state_up\u0027: True,"},{"line_number":2508,"context_line":"            \u0027external_gateway_info\u0027: {\u0027network_id\u0027: \u0027some_uuid\u0027}}}"},{"line_number":2509,"context_line":""},{"line_number":2510,"context_line":"        def _update_router_gw_info(ctx, router_id, info, router\u003dNone):"},{"line_number":2511,"context_line":"            # Fail with breaking transaction"},{"line_number":2512,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2513,"context_line":"                raise n_exc.NeutronException"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_0e47124c","line":2510,"updated":"2015-10-05 12:21:12.000000000","message":"nit: could name method to indicate that it fails: mock_fail_update_router_gw_info","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"54fed097f463d55e9928bf79c49ca4df4a3317ea","unresolved":false,"context_lines":[{"line_number":2507,"context_line":"            \u0027name\u0027: \u0027router1\u0027, \u0027admin_state_up\u0027: True,"},{"line_number":2508,"context_line":"            \u0027external_gateway_info\u0027: {\u0027network_id\u0027: \u0027some_uuid\u0027}}}"},{"line_number":2509,"context_line":""},{"line_number":2510,"context_line":"        def _update_router_gw_info(ctx, router_id, info, router\u003dNone):"},{"line_number":2511,"context_line":"            # Fail with breaking transaction"},{"line_number":2512,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2513,"context_line":"                raise n_exc.NeutronException"}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_d127fb60","line":2510,"in_reply_to":"9a1a9d01_0e47124c","updated":"2016-06-14 10:51:01.000000000","message":"Done","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"de101bb5d03be9f2452c1e5f5c4020d92d478bdc","unresolved":false,"context_lines":[{"line_number":2542,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2543,"context_line":"                raise n_exc.NeutronException"},{"line_number":2544,"context_line":""},{"line_number":2545,"context_line":"        def delete_router(ctx, router_id):"},{"line_number":2546,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2547,"context_line":"                raise Exception()"},{"line_number":2548,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a1a9d01_0eb5d22f","line":2545,"updated":"2015-10-05 12:21:12.000000000","message":"mock_fail_delete_router","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"54fed097f463d55e9928bf79c49ca4df4a3317ea","unresolved":false,"context_lines":[{"line_number":2542,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2543,"context_line":"                raise n_exc.NeutronException"},{"line_number":2544,"context_line":""},{"line_number":2545,"context_line":"        def delete_router(ctx, router_id):"},{"line_number":2546,"context_line":"            with ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":2547,"context_line":"                raise Exception()"},{"line_number":2548,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7aa08908_3123df57","line":2545,"in_reply_to":"9a1a9d01_0eb5d22f","updated":"2016-06-14 10:51:01.000000000","message":"Done","commit_id":"b0565b7a877fff7895e24cfd27d6f8910edc6d33"}]}
