)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"40ca423759556354b4c5ec63ac82e2ab8510d52a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"TODO:"},{"line_number":16,"context_line":"There are other potentially dangerous logic in L3 plugin that directly"},{"line_number":17,"context_line":"uses db entry. For future safety, it should be fixed in similar way"},{"line_number":18,"context_line":"to use returned dictionary object instead of ORM db object."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_48b477f1","line":15,"updated":"2015-08-04 05:21:28.000000000","message":"+1, suggest to move it the code context and submit it to launchpad to discuss.","commit_id":"8986f08fcbf8d1c8090a403e94bac916e533f802"},{"author":{"_account_id":704,"name":"Edgar Magana","email":"emagana@gmail.com","username":"emagana"},"change_message_id":"9c2f9dd266fec4b82d5056a158cb704b6e2a2fc8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"TODO:"},{"line_number":16,"context_line":"There are other potentially dangerous logic in L3 plugin that directly"},{"line_number":17,"context_line":"uses db entry. For future safety, it should be fixed in similar way"},{"line_number":18,"context_line":"to use returned dictionary object instead of ORM db object."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a50d1a3_09714a44","line":15,"updated":"2015-08-03 16:07:48.000000000","message":"remove this from the commit message, if needed better to have in the right section of the code and also create a proper bug for it.","commit_id":"8986f08fcbf8d1c8090a403e94bac916e533f802"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"99e22592601c149df62b156f6c833e2938083ad5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"TODO:"},{"line_number":16,"context_line":"There are other potentially dangerous logic in L3 plugin that directly"},{"line_number":17,"context_line":"uses db entry. For future safety, it should be fixed in similar way"},{"line_number":18,"context_line":"to use returned dictionary object instead of ORM db object."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_53cae8a2","line":15,"in_reply_to":"1a4dcd0f_48b477f1","updated":"2015-08-04 05:55:59.000000000","message":"+1\n\nyamahata, you already have a few following patches.\nwill there be more?","commit_id":"8986f08fcbf8d1c8090a403e94bac916e533f802"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"370b87d64ed114db0fa222134faad494ba8a616b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"TODO:"},{"line_number":16,"context_line":"There are other potentially dangerous logic in L3 plugin that directly"},{"line_number":17,"context_line":"uses db entry. For future safety, it should be fixed in similar way"},{"line_number":18,"context_line":"to use returned dictionary object instead of ORM db object."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a4dcd0f_21a9dddf","line":15,"in_reply_to":"1a4dcd0f_53cae8a2","updated":"2015-08-04 17:27:08.000000000","message":"Done","commit_id":"8986f08fcbf8d1c8090a403e94bac916e533f802"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"71009e544885835ac85db1f773d222be4bd8bbc5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3_db: it updates port attribute without L2 plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"L3_NAT_dbonly_mixin._add_interface_by_port update Port.owner"},{"line_number":10,"context_line":"db entry directly wihtout notifying l2 plugin."},{"line_number":11,"context_line":"Thus L2 plugin/ML2 mechanism driver will be confused when"},{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_a7547ffd","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":25},"updated":"2015-09-08 05:26:12.000000000","message":"typo: without","commit_id":"d2bb3b0b3dce316b22f59e5bfa973e72c8f67d8d"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"930d6679408e813fae9b839974e3c24ebb1fbbc9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3_db: it updates port attribute without L2 plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"L3_NAT_dbonly_mixin._add_interface_by_port update Port.owner"},{"line_number":10,"context_line":"db entry directly wihtout notifying l2 plugin."},{"line_number":11,"context_line":"Thus L2 plugin/ML2 mechanism driver will be confused when"},{"line_number":12,"context_line":"interface is attached to router by port because port owner is different."},{"line_number":13,"context_line":"Use L2 plugin update_port method to update port:owner."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba15a1d1_493326f7","line":10,"in_reply_to":"da20952f_a7547ffd","updated":"2015-09-19 17:31:35.000000000","message":"Done","commit_id":"d2bb3b0b3dce316b22f59e5bfa973e72c8f67d8d"}],"neutron/db/l3_db.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"63508f775be4b9a6d2eb15a04d4e3facdba364aa","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027id\u0027: port_id,"},{"line_number":553,"context_line":"                      \u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":554,"context_line":"        return port, subnets"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_8c9c6c10","line":552,"updated":"2015-07-22 04:07:39.000000000","message":"is \u0027id\u0027 in \u0027port\u0027 dict necessary?\nit seems to mean updating id to me.","commit_id":"d32ea3c1fd22727afe093cf490cb572f82953070"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"ca47be71e8ea895340766b78eb0cbc35bc7f55d6","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027id\u0027: port_id,"},{"line_number":553,"context_line":"                      \u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":554,"context_line":"        return port, subnets"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_fa8d3031","line":552,"in_reply_to":"3a50d1a3_8c9c6c10","updated":"2015-07-23 18:02:52.000000000","message":"Done","commit_id":"d32ea3c1fd22727afe093cf490cb572f82953070"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"6f9b3da5d289efab05017075f2f7fd2663fd8231","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_766c0908","line":550,"updated":"2015-08-06 20:05:18.000000000","message":"This was moved out from under the context.session, why?","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e876f3e864866f75fb786a57c3ef32896a318e8d","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_8a5289dc","line":550,"updated":"2015-08-26 21:50:20.000000000","message":"To avoid the case where a port might get attached to a router without the owner successfully updating due to an unavailable backend, can you move the device owner change to the top before the transaction? I would rather have the half-failure mode be a device_owner field being incorrect since a user can modify those anyway.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"e33995dec1557df646ad73a1efc8321c6f57a46a","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_211fc15c","line":550,"in_reply_to":"1a4dcd0f_1f2227ba","updated":"2015-08-10 03:53:33.000000000","message":"Yes, your pointing out is correct. But it\u0027s acceptable because it\u0027s already heavily broken in your sense.\nThis patch doesn\u0027t make things worse.\n\nDid you audit other logic in l3 code?\nIf we want to really address those issues,  additional independent effort is necessary.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"22089ede44417692d57b7b816a7a25503f4978e9","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_bdd3bb37","line":550,"in_reply_to":"1a4dcd0f_211fc15c","updated":"2015-08-11 04:02:02.000000000","message":"In a previous bug, we separate notification from database transaction. I suggest you do it in this way. Add a \u0027do_notify\u003dTrue\u0027 parameter into update_port method and then notify it outside this transaction.\n\njust as:\n\n    with context.session.begin(subtransactions\u003dTrue):\n        self._core_plugin.update_port(..., do_notify\u003dFalse)\n\n    call notify-to-l2-agent method directly.\n\nI know mixing of nested transactions and notifications makes it worse. :-(","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"d4c7610b71972843c05318b1203f498fc1e64200","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_1f2227ba","line":550,"in_reply_to":"1a4dcd0f_6392fb4d","updated":"2015-08-09 12:59:29.000000000","message":"So, as a result, it is divided into two different transactions. I don\u0027t think considering the network condition and operation to external controller is meaningful.\n\nIs it logically right? I doubt. If something bad happens, the transaction won\u0027t rollback properly due to the separation.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4c364315e775d63e437186dc625131404fe4ca7c","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_6392fb4d","line":550,"in_reply_to":"1a4dcd0f_766c0908","updated":"2015-08-07 06:20:03.000000000","message":"This is intentional to avoid blocking long time during db transaction.\n\nL2 plugin may take long time to process this request.\nFor example, some L2 plugins or ML2 mechanism drivers issue operations in addition to db updates like sending requests to  SDN controller. \nIt may take long time depending on load of SDN controller or network condition to SDN controller. At worst case talking to SDN controller may result in time out error. It can be more than minutes.\n\nblocking long time during db transaction causes troubles for various reasons.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"e7f8d00ebe71d70dbdb4d73ee13ccbfcca7ebdab","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_d50d0090","line":550,"in_reply_to":"1a4dcd0f_a91b737f","updated":"2015-08-12 03:21:12.000000000","message":"Thanks for your explanation. I noticed another problem which is not closely related with this patch. I messed them up.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"92f126706ff61c67bcfeca7cbc352bca6739b0b4","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_a91b737f","line":550,"in_reply_to":"1a4dcd0f_bdd3bb37","updated":"2015-08-11 09:46:11.000000000","message":"Your suggested option doesn\u0027t work because ML2 plugin doesn\u0027t use notification, but post_commit method.\nNot all of plugins or ML2 mechanism driver are agent-based, but agent-less. so notification-to-l2-agent doesn\u0027t make sense.\n\nAlso we don\u0027t have control l2 plugins nor ML2 mechanism drivers so common code shouldn\u0027t assume that they are all agent based or do_notify argument is supported. Maybe l2 plugin can send request to backend sdn controller asynchronously so that the l2 plugin can avoid potentially long blocking operation. But again the common code shouldn\u0027t enforce l2 plugin to do so.\nIf we would like to go for that road, we should revise L2 plugin interface and rewrite all L2 plugins.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"03e0da1a57642db1e7aaa6b19c5b9a766ceb9e96","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_b8017508","line":550,"in_reply_to":"da20952f_8a5289dc","updated":"2015-08-28 19:01:07.000000000","message":"Done","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4440cf18a6b500497b5f14886461ca68405fd8f7","unresolved":false,"context_lines":[{"line_number":547,"context_line":"                          \"IPv4 subnets on router port\")"},{"line_number":548,"context_line":"                raise n_exc.BadRequest(resource\u003d\u0027router\u0027, msg\u003dmsg)"},{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        port \u003d self._core_plugin.update_port("},{"line_number":551,"context_line":"            context, port_id,"},{"line_number":552,"context_line":"            {\u0027port\u0027: {\u0027device_id\u0027: router.id, \u0027device_owner\u0027: owner}})"},{"line_number":553,"context_line":"        return port, subnets"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_87f61bd5","line":550,"in_reply_to":"da20952f_8a5289dc","updated":"2015-09-08 05:25:33.000000000","message":"Kevin,\n\ni don\u0027t understand your concern.  can you explain a bit?\n\nRouterPort is created by the caller, only when this\nmethod succeeds.  this update_port updates both of\ndevice_id and device_owner.  the rest of this method seems like merely bad-request checks.  i don\u0027t see how reordering in this method improves the situation.","commit_id":"ab22c983911791e5dc919afd0229eaf1702530f0"},{"author":{"_account_id":16053,"name":"Pengtao Huang","email":"huangpengtao@huawei.com","username":"huangpengtao"},"change_message_id":"db59fe1a127fc2f43df09d5d40022737ef70e4ef","unresolved":false,"context_lines":[{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":534,"context_line":"            # check again within transaction to mitigate race"},{"line_number":535,"context_line":"            port \u003d self._check_router_port(context, port_id, router.id)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"            # Only allow one router port with IPv6 subnets per network id"},{"line_number":538,"context_line":"            if self._port_has_ipv6_address(port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_2501073a","line":535,"updated":"2015-09-09 12:44:38.000000000","message":"do you want to check if \"self._core_plugin.update_port\" is success in this line? you can catch Exception","commit_id":"d2bb3b0b3dce316b22f59e5bfa973e72c8f67d8d"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"930d6679408e813fae9b839974e3c24ebb1fbbc9","unresolved":false,"context_lines":[{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":534,"context_line":"            # check again within transaction to mitigate race"},{"line_number":535,"context_line":"            port \u003d self._check_router_port(context, port_id, router.id)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"            # Only allow one router port with IPv6 subnets per network id"},{"line_number":538,"context_line":"            if self._port_has_ipv6_address(port):"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_5ede8cdd","line":535,"in_reply_to":"da20952f_2501073a","updated":"2015-09-19 17:31:35.000000000","message":"The exception is intended to be thrown up so that rest request will be responded as bad request.","commit_id":"d2bb3b0b3dce316b22f59e5bfa973e72c8f67d8d"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3f514c882d990fe58940978d9a47aac5c4554c8d","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"            self.assertEqual(body[\u0027port_id\u0027], p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1181,"context_line":"            expected_port_update \u003d {"},{"line_number":1182,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1183,"context_line":"                \u0027id\u0027: p[\u0027port\u0027][\u0027id\u0027],"},{"line_number":1184,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"},{"line_number":1185,"context_line":"            update_port.assert_called_with("},{"line_number":1186,"context_line":"                mock.ANY, p[\u0027port\u0027][\u0027id\u0027], {\u0027port\u0027: expected_port_update})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_88f7f48b","line":1183,"updated":"2015-07-24 03:42:08.000000000","message":"this needs to be synced with tested code.","commit_id":"6a43a8b2774a2c3da7ebf35e20496c865e6ce8e3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a3265b44026dec4d4e8b8188341cee45ea3683e2","unresolved":false,"context_lines":[{"line_number":1180,"context_line":"            self.assertEqual(body[\u0027port_id\u0027], p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1181,"context_line":"            expected_port_update \u003d {"},{"line_number":1182,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1183,"context_line":"                \u0027id\u0027: p[\u0027port\u0027][\u0027id\u0027],"},{"line_number":1184,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"},{"line_number":1185,"context_line":"            update_port.assert_called_with("},{"line_number":1186,"context_line":"                mock.ANY, p[\u0027port\u0027][\u0027id\u0027], {\u0027port\u0027: expected_port_update})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_ec7d45e8","line":1183,"in_reply_to":"3a50d1a3_88f7f48b","updated":"2015-07-24 18:29:01.000000000","message":"Done","commit_id":"6a43a8b2774a2c3da7ebf35e20496c865e6ce8e3"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"85727fb31b1966187662cf0a54e6cff714b7dd04","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        orig_update_port \u003d self.plugin.update_port"},{"line_number":1176,"context_line":"        with self.router() as r, ("},{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"             mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d ("},{"line_number":1180,"context_line":"                lambda context, id, port: orig_update_port(context, id, port))"},{"line_number":1181,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_51499ccf","line":1178,"updated":"2015-11-16 15:53:40.000000000","message":"Indention....","commit_id":"e6051dcbceb6baebb3987c975593345a5380e1ed"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"374ca8bcd4f85f7e058c173f08af597ea8e136d4","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        orig_update_port \u003d self.plugin.update_port"},{"line_number":1176,"context_line":"        with self.router() as r, ("},{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"             mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d ("},{"line_number":1180,"context_line":"                lambda context, id, port: orig_update_port(context, id, port))"},{"line_number":1181,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_b3751e99","line":1178,"in_reply_to":"ba8a016a_51499ccf","updated":"2015-11-17 20:41:20.000000000","message":"Done","commit_id":"e6051dcbceb6baebb3987c975593345a5380e1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"85727fb31b1966187662cf0a54e6cff714b7dd04","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"             mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d ("},{"line_number":1180,"context_line":"                lambda context, id, port: orig_update_port(context, id, port))"},{"line_number":1181,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"},{"line_number":1182,"context_line":"                                                 r[\u0027router\u0027][\u0027id\u0027],"},{"line_number":1183,"context_line":"                                                 None,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_1179d4fc","line":1180,"updated":"2015-11-16 15:53:40.000000000","message":"You could just use \"update_port.side_effect \u003d orig_update_port\" here.","commit_id":"e6051dcbceb6baebb3987c975593345a5380e1ed"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"374ca8bcd4f85f7e058c173f08af597ea8e136d4","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"             mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d ("},{"line_number":1180,"context_line":"                lambda context, id, port: orig_update_port(context, id, port))"},{"line_number":1181,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"},{"line_number":1182,"context_line":"                                                 r[\u0027router\u0027][\u0027id\u0027],"},{"line_number":1183,"context_line":"                                                 None,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_736fb6c5","line":1180,"in_reply_to":"ba8a016a_1179d4fc","updated":"2015-11-17 20:41:20.000000000","message":"Done","commit_id":"e6051dcbceb6baebb3987c975593345a5380e1ed"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"08e82b9f90e2207b7c2a36c9ece8cea2bbb0ce4d","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        orig_update_port \u003d self.plugin.update_port"},{"line_number":1176,"context_line":"        with self.router() as r, ("},{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"                 mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d orig_update_port"},{"line_number":1180,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"},{"line_number":1181,"context_line":"                                                 r[\u0027router\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_bf07151b","line":1178,"updated":"2015-11-18 03:36:58.000000000","message":"It is trivial, but I can\u0027t help to point it out. Line 1177 has an extra space there.","commit_id":"82f5665c47d80ac753e9a522ab761cb96516ec88"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"2e361fb131dd7d70e84408b37d7add5555fbd63c","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"        orig_update_port \u003d self.plugin.update_port"},{"line_number":1176,"context_line":"        with self.router() as r, ("},{"line_number":1177,"context_line":"             self.port()) as p, ("},{"line_number":1178,"context_line":"                 mock.patch.object(self.plugin, \u0027update_port\u0027)) as update_port:"},{"line_number":1179,"context_line":"            update_port.side_effect \u003d orig_update_port"},{"line_number":1180,"context_line":"            body \u003d self._router_interface_action(\u0027add\u0027,"},{"line_number":1181,"context_line":"                                                 r[\u0027router\u0027][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba8a016a_3256c12a","line":1178,"in_reply_to":"ba8a016a_bf07151b","updated":"2015-11-19 01:30:37.000000000","message":"Done","commit_id":"82f5665c47d80ac753e9a522ab761cb96516ec88"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"03b8ef14e52972edbbd505314343fd18ea5848d0","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                                                 None,"},{"line_number":1183,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1184,"context_line":"            self.assertIn(\u0027port_id\u0027, body)"},{"line_number":1185,"context_line":"            self.assertEqual(body[\u0027port_id\u0027], p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1186,"context_line":"            expected_port_update \u003d {"},{"line_number":1187,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1188,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_11e618b0","line":1185,"updated":"2015-11-19 04:17:39.000000000","message":"We should use the pattern \"self.assertEqual(expected, observed)\" according with https://github.com/openstack/neutron/blob/master/doc/source/devref/effective_neutron.rst#mocking-and-testing","commit_id":"0bddc8eb6c4a737fd24990a9337f42f667f2b577"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"373ce312efefda1f1ae2fcb66090feb026e50775","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                                                 None,"},{"line_number":1183,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1184,"context_line":"            self.assertIn(\u0027port_id\u0027, body)"},{"line_number":1185,"context_line":"            self.assertEqual(body[\u0027port_id\u0027], p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1186,"context_line":"            expected_port_update \u003d {"},{"line_number":1187,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1188,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_620b148f","line":1185,"in_reply_to":"ba8a016a_11e618b0","updated":"2015-11-19 06:16:12.000000000","message":"Agree, it should be (expected, observed)","commit_id":"0bddc8eb6c4a737fd24990a9337f42f667f2b577"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"e6178b3848a5f2b0e2c01ce76677f7aadff825a6","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                                                 None,"},{"line_number":1183,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1184,"context_line":"            self.assertIn(\u0027port_id\u0027, body)"},{"line_number":1185,"context_line":"            self.assertEqual(body[\u0027port_id\u0027], p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1186,"context_line":"            expected_port_update \u003d {"},{"line_number":1187,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1188,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_db6312db","line":1185,"in_reply_to":"ba8a016a_620b148f","updated":"2015-11-26 00:13:48.000000000","message":"Done","commit_id":"0bddc8eb6c4a737fd24990a9337f42f667f2b577"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"03b8ef14e52972edbbd505314343fd18ea5848d0","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                mock.ANY, p[\u0027port\u0027][\u0027id\u0027], {\u0027port\u0027: expected_port_update})"},{"line_number":1191,"context_line":"            # fetch port and confirm device_id"},{"line_number":1192,"context_line":"            body \u003d self._show(\u0027ports\u0027, p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1193,"context_line":"            self.assertEqual(body[\u0027port\u0027][\u0027device_id\u0027], r[\u0027router\u0027][\u0027id\u0027])"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"            # clean-up"},{"line_number":1196,"context_line":"            self._router_interface_action(\u0027remove\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba8a016a_d104104b","line":1193,"updated":"2015-11-19 04:17:39.000000000","message":"ditto","commit_id":"0bddc8eb6c4a737fd24990a9337f42f667f2b577"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"e6178b3848a5f2b0e2c01ce76677f7aadff825a6","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                mock.ANY, p[\u0027port\u0027][\u0027id\u0027], {\u0027port\u0027: expected_port_update})"},{"line_number":1191,"context_line":"            # fetch port and confirm device_id"},{"line_number":1192,"context_line":"            body \u003d self._show(\u0027ports\u0027, p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1193,"context_line":"            self.assertEqual(body[\u0027port\u0027][\u0027device_id\u0027], r[\u0027router\u0027][\u0027id\u0027])"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"            # clean-up"},{"line_number":1196,"context_line":"            self._router_interface_action(\u0027remove\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_fb5e1611","line":1193,"in_reply_to":"ba8a016a_d104104b","updated":"2015-11-26 00:13:48.000000000","message":"Done","commit_id":"0bddc8eb6c4a737fd24990a9337f42f667f2b577"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"ced8c23301e6727582a55741e2e6b78f9155cd1e","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                                                 None,"},{"line_number":1186,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1187,"context_line":"            self.assertIn(\u0027port_id\u0027, self)"},{"line_number":1188,"context_line":"            body.assertEqual(p[\u0027port\u0027][\u0027id\u0027], body[\u0027port_id\u0027])"},{"line_number":1189,"context_line":"            expected_port_update \u003d {"},{"line_number":1190,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1191,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_555cceec","line":1188,"updated":"2015-11-26 02:11:25.000000000","message":"Maybe, replacement mistake?\n\n self.assertIn(\u0027port_id\u0027, body)\n self.assertEqual(p[\u0027port\u0027][\u0027id\u0027], body[\u0027port_id\u0027])","commit_id":"52befb04effafeda5946d99592165fba5d6b99a3"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"bd4a510cd99dc9ad38b94ed5e0870d188ef781ac","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                                                 None,"},{"line_number":1186,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1187,"context_line":"            self.assertIn(\u0027port_id\u0027, self)"},{"line_number":1188,"context_line":"            body.assertEqual(p[\u0027port\u0027][\u0027id\u0027], body[\u0027port_id\u0027])"},{"line_number":1189,"context_line":"            expected_port_update \u003d {"},{"line_number":1190,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1191,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_7ed1af56","line":1188,"in_reply_to":"9a8ffd7b_555cceec","updated":"2015-11-26 03:47:43.000000000","message":"Agree with Hirofumi, this break the UT","commit_id":"52befb04effafeda5946d99592165fba5d6b99a3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d018932b6465def88240c2a3a4821fa488eeaa56","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                                                 None,"},{"line_number":1186,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1187,"context_line":"            self.assertIn(\u0027port_id\u0027, self)"},{"line_number":1188,"context_line":"            body.assertEqual(p[\u0027port\u0027][\u0027id\u0027], body[\u0027port_id\u0027])"},{"line_number":1189,"context_line":"            expected_port_update \u003d {"},{"line_number":1190,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1191,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_d102600b","line":1188,"in_reply_to":"9a8ffd7b_6fd1fb56","updated":"2015-12-01 00:58:26.000000000","message":"Done","commit_id":"52befb04effafeda5946d99592165fba5d6b99a3"},{"author":{"_account_id":16788,"name":"Ramanjaneya Reddy Palleti","email":"ramanjaneya.palleti@huawei.com","username":"Ramanjaneya"},"change_message_id":"80aa1c3429fc417cbb60fd8f83eb4bf4b4d9dd0a","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"                                                 None,"},{"line_number":1186,"context_line":"                                                 p[\u0027port\u0027][\u0027id\u0027])"},{"line_number":1187,"context_line":"            self.assertIn(\u0027port_id\u0027, self)"},{"line_number":1188,"context_line":"            body.assertEqual(p[\u0027port\u0027][\u0027id\u0027], body[\u0027port_id\u0027])"},{"line_number":1189,"context_line":"            expected_port_update \u003d {"},{"line_number":1190,"context_line":"                \u0027device_owner\u0027: l3_constants.DEVICE_OWNER_ROUTER_INTF,"},{"line_number":1191,"context_line":"                \u0027device_id\u0027: r[\u0027router\u0027][\u0027id\u0027]}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a8ffd7b_6fd1fb56","line":1188,"in_reply_to":"9a8ffd7b_7ed1af56","updated":"2015-11-26 05:45:02.000000000","message":"+1","commit_id":"52befb04effafeda5946d99592165fba5d6b99a3"}]}
