)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15309,"name":"zhaobo","email":"bzhaojyathousandy@gmail.com","username":"ZhaoBo"},"change_message_id":"e7f4b4012ed5f584717ee6bef69543a372b7a46c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"},{"line_number":14,"context_line":"PRECOMMIT_ADD/DEL_ASSOCIATION."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: If20b11f0587f1ed30db72d97c15b20d4c6e87543"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff82abbf_f3018106","line":15,"updated":"2017-11-29 04:06:47.000000000","message":"Is there some bug/bp associated, any thing can describe why introduce these new event types and how to use them?","commit_id":"39c74f4319613af0fe0a8714f935aba9f9246e53"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"48814f2e30f4ee16f5b19145466e63c14dcae319","unresolved":false,"context_lines":[{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"},{"line_number":14,"context_line":"PRECOMMIT_ADD/DEL_ASSOCIATION."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Manjeet Singh Bhatia\u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"df87a7cf_039b2ec9","line":14,"updated":"2017-12-04 03:52:45.000000000","message":"with this approach, what happens if the driver controller started using other events in future?","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2d78ed6e804a713adf03cc7d8f189f5d0b1e127c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_86db7eeb","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"updated":"2017-12-06 14:56:48.000000000","message":"don\u0027t you need UPDATE?","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fd426dd9118adac6cc80076a15bb65c140c605c5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bf8cb3f7_f9cb541b","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"in_reply_to":"bf8cb3f7_4db16c8f","updated":"2017-12-21 23:31:22.000000000","message":"It can be handled by del_association + add_association.\n\nDo you want to add one more callback into _update_router_provider if old dirver \u003d\u003d new driver?\nEither way will works for networking-odl.","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d38e06612a332c14ead50671cdd1b5cea2193d8e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bf8cb3f7_b7186c1d","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"in_reply_to":"bf8cb3f7_f9cb541b","updated":"2017-12-22 12:56:30.000000000","message":"i don\u0027t understand how del_association + add_association can handle it. can you explain a little?","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce3037e3a891b5f5250544e7379c432d4cc705ce","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_f8846360","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"in_reply_to":"df87a7cf_86db7eeb","updated":"2017-12-06 17:51:23.000000000","message":"As i understand or see, it router update if it not provider/flavor would be fine, if it is a provider/Flavor update then PRECOMMIT_ADD/DEL_ASSOCIATION are used within update_router_provider, its looks convoluted but for update we will be first deleting old association and adding new one.","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"72ce23cac0ba1acfd85ac03ebf0675c5b332f562","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"bf8cb3f7_4db16c8f","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"in_reply_to":"df87a7cf_c5a893dc","updated":"2017-12-21 13:02:04.000000000","message":"don\u0027t you need it for eg. extraroute?","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"767f4eb1fec8d3f57df1ef909b3abd79034bdfbb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/UPDATE/DELETE is already used by driver_controller.py."},{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_c5a893dc","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":23},"in_reply_to":"df87a7cf_f8846360","updated":"2017-12-06 20:27:46.000000000","message":"As PRECOMMIT_UPDATE_FOR_DRIVER isn\u0027t defined/used.\nso UPDATE should be dropped and association should be added.","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2d78ed6e804a713adf03cc7d8f189f5d0b1e127c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"},{"line_number":14,"context_line":"PRECOMMIT_ADD/DEL_ASSOCIATION."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Manjeet Singh Bhatia\u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_66e0ba97","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":29},"updated":"2017-12-06 14:56:48.000000000","message":"i don\u0027t understand why these need to be different from others.","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ce3037e3a891b5f5250544e7379c432d4cc705ce","unresolved":false,"context_lines":[{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"},{"line_number":14,"context_line":"PRECOMMIT_ADD/DEL_ASSOCIATION."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Manjeet Singh Bhatia\u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_983c37c0","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":29},"in_reply_to":"df87a7cf_66e0ba97","updated":"2017-12-06 17:51:23.000000000","message":"can we make it PRECOMMIT_ADD/DEL_FOR_DRIVER_ASSOCIATION ?","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"767f4eb1fec8d3f57df1ef909b3abd79034bdfbb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"So introduce more events so that l3 flavor driver can subscribe it."},{"line_number":12,"context_line":"This patch adds more necessary notifications for l3 flavor."},{"line_number":13,"context_line":"BEFORE_CREATE_DRIVER, PRECOMMIT_CREATE/DELETE_DRIVER and"},{"line_number":14,"context_line":"PRECOMMIT_ADD/DEL_ASSOCIATION."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Manjeet Singh Bhatia\u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"df87a7cf_458d6379","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":29},"in_reply_to":"df87a7cf_983c37c0","updated":"2017-12-06 20:27:46.000000000","message":"+1 for FOR_DRIVER.","commit_id":"fe94ee2329de4285fb78de1b83c1c3d30ca65240"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f5ec046141dbbef5a5f08947a2efd31dcaa9f0eb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"l3 flavor: add more events/notifications"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ODL l3 flavor requires precommit callback. but (ROUTER,"},{"line_number":10,"context_line":"PRECOMMIT_CREATE/DELETE) is already used by driver_controller.py. so"},{"line_number":11,"context_line":"introduce new resources and events to avoid conflict."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch adds more necessary notifications for l3 flavor,"},{"line_number":14,"context_line":"resource(ROUTER_CONTROLLER) and events(PRECOMMIT_ADD/DEL_ASSOCIATION) so"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"5f93b717_ad458472","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":53},"updated":"2018-01-25 17:41:50.000000000","message":"This paragraph is outdated. Let\u0027s get rid of it","commit_id":"e50232e29e4fe0ac27f9cc873dbe620bcd56c951"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0da6a2cffb69f5d23eb9a4c0b45bf260279e50a6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"transaction."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"[1] I1e72ee843851004d26410a90da4030ab3b024741"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Co-Authored-By: Manjeet Singh Bhatia\u003cmanjeet.s.bhatia@intel.com\u003e"},{"line_number":19,"context_line":"Change-Id: If20b11f0587f1ed30db72d97c15b20d4c6e87543"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"5f93b717_aa9b0bc7","line":17,"updated":"2018-01-26 16:03:06.000000000","message":"We are going to need a bug here to track this patch for Queens RC1","commit_id":"5550740b0e9b9d458b564159488bdbf084912d3f"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b7953335c7178c1ec562b1b7869cdbe0e7d5d892","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After the addition of a new resource and related events with [1],"},{"line_number":10,"context_line":"this patch adds the necessary notifications for l3 flavor,"},{"line_number":11,"context_line":"resource(ROUTER_CONTROLLER) and events(PRECOMMIT_ADD_ASSOCIATION and"},{"line_number":12,"context_line":"PRECOMMIT_DELETE_ASSOCIATIONS) so that l3 flavor driver can subscribe to"},{"line_number":13,"context_line":"them. extra routes need care because they are updated via update_router,"},{"line_number":14,"context_line":"but within different db transaction."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5f93b717_b3e910b8","line":12,"range":{"start_line":11,"start_character":39,"end_line":12,"end_character":29},"updated":"2018-01-30 03:15:02.000000000","message":"i wonder if these are singular and plural intentionally.","commit_id":"a51083aed2e825ff301d39135e60cf7a40fb4452"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"d2a0d8b8689fdea104853d134d6bc1f6b42c99e9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After the addition of a new resource and related events with [1],"},{"line_number":10,"context_line":"this patch adds the necessary notifications for l3 flavor,"},{"line_number":11,"context_line":"resource(ROUTER_CONTROLLER) and events(PRECOMMIT_ADD_ASSOCIATION and"},{"line_number":12,"context_line":"PRECOMMIT_DELETE_ASSOCIATIONS) so that l3 flavor driver can subscribe to"},{"line_number":13,"context_line":"them. extra routes need care because they are updated via update_router,"},{"line_number":14,"context_line":"but within different db transaction."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5f93b717_d3f13c6d","line":12,"range":{"start_line":11,"start_character":39,"end_line":12,"end_character":29},"in_reply_to":"5f93b717_b3e910b8","updated":"2018-01-30 03:35:33.000000000","message":"This is intentional to follow ServiceTypeManager.add_resource_association and del_resource_associations.","commit_id":"a51083aed2e825ff301d39135e60cf7a40fb4452"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"9a10beaddc5691df6e258840a192022c05cde89d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After the addition of a new resource and related events with [1],"},{"line_number":10,"context_line":"this patch adds the necessary notifications for l3 flavor,"},{"line_number":11,"context_line":"resource(ROUTER_CONTROLLER) and events(PRECOMMIT_ADD_ASSOCIATION and"},{"line_number":12,"context_line":"PRECOMMIT_DELETE_ASSOCIATIONS) so that l3 flavor driver can subscribe to"},{"line_number":13,"context_line":"them. extra routes need care because they are updated via update_router,"},{"line_number":14,"context_line":"but within different db transaction."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5f93b717_5361ac04","line":12,"range":{"start_line":11,"start_character":39,"end_line":12,"end_character":29},"in_reply_to":"5f93b717_d3f13c6d","updated":"2018-01-30 03:43:05.000000000","message":"stm.del_resource_associations can remove multiple associations but here we don\u0027t do that.\nbut ok, i got the intention. thank you for explanation.","commit_id":"a51083aed2e825ff301d39135e60cf7a40fb4452"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b85048bd3edf4014acf8cc5bbf703593f88cf51d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"PRECOMMIT_CREATE/UPDATE) via ExtraAttributesMixin.set_extra_attr_value."},{"line_number":17,"context_line":"The method can\u0027t emit (ROUTER, PRECOMMIT_UPDATE) to avoid cyclic"},{"line_number":18,"context_line":"callback. So it notify (ROUTER_CONTROLLER, PRECOMMIT_UPDATE) instead."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] I1e72ee843851004d26410a90da4030ab3b024741"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1745633"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"3fa0c359_e94fe5ba","line":19,"updated":"2018-02-07 07:21:08.000000000","message":"do you know why set_extra_attr_value has its own transaction? looking at the callers, it\u0027s usually (always?) called in a transaction, it seems.\n\nalso, it seems some of existing event listeners already have ordering issues. for example, l3_dvr_db listens ROUTER/PRECOMMIT_CREATE to update the \"distributed\" attribute. and driver_controller listens the same event and look at the same attribute to infer the flavor. thus they would behave differently depending on the order of them. i suspect we might need to untangle the existing mess a bit before adding more complexity here. how do you think?","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"6b7a7e5fcc6c0c3282954f1a5abde3d3e225a68d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"PRECOMMIT_CREATE/UPDATE) via ExtraAttributesMixin.set_extra_attr_value."},{"line_number":17,"context_line":"The method can\u0027t emit (ROUTER, PRECOMMIT_UPDATE) to avoid cyclic"},{"line_number":18,"context_line":"callback. So it notify (ROUTER_CONTROLLER, PRECOMMIT_UPDATE) instead."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] I1e72ee843851004d26410a90da4030ab3b024741"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1745633"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"3fa0c359_548469b1","line":19,"in_reply_to":"3fa0c359_918683db","updated":"2018-02-07 10:07:52.000000000","message":"i prefer to have more concrete ideas before starting coding.\ni did a little research. (please feel free to make it complete :-)\nhttps://etherpad.openstack.org/p/neutron-l3-events\n\nso, for ROUTER, there seems to be 3 kinds of users of PRECOMMIT hooks:\n\n  1. set_extra_attr_value things\n  2. driver_controller\n  3. l3 flavors\n\nand we want them to be processed in the above order, right?\ni guess we need to have another layer of the events.\n(or, probably add \"priority\" support in the callbacks framework instead. given the complexity we already have, i tend to think it\u0027s cleaner.)","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"125ea3100fa612886018c16ac0518e82d26aaebe","unresolved":false,"context_lines":[{"line_number":16,"context_line":"PRECOMMIT_CREATE/UPDATE) via ExtraAttributesMixin.set_extra_attr_value."},{"line_number":17,"context_line":"The method can\u0027t emit (ROUTER, PRECOMMIT_UPDATE) to avoid cyclic"},{"line_number":18,"context_line":"callback. So it notify (ROUTER_CONTROLLER, PRECOMMIT_UPDATE) instead."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"[1] I1e72ee843851004d26410a90da4030ab3b024741"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1745633"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":34,"id":"3fa0c359_918683db","line":19,"in_reply_to":"3fa0c359_e94fe5ba","updated":"2018-02-07 08:57:39.000000000","message":"Now you are seeing the ordering issue I\u0027ve mentioned.\n\n\nRegarding to first question, it seems the side effect of the patch introducing set_extra_attr_value. a7c633dc8e\nI don\u0027t see any special reason for it based on the changeset.\nI think with-clause can be removed from the method. (transaction_guard can be added to ensure it)\n\n\nall the subscribers of ROUTER/PRECOMMIT_CREATE/UPDATE use set_extra_attr_value() (except driver_controller) to extend attributes. So adding ROUTER_CONTROLLER/PRECOMMIT_UPDATE hook to set_extra_attr_value gives l3 flavor driver a chance to see those extended attributes irrelevant to the order. So it\u0027s okay.\n\n\nAlthough refactoring is desirable as always, I\u0027d like to put callbacks first so that we can find/fix issues. We need to get experiment with it. Actually we didn\u0027t realize this issue until now. We can mark l3 flavors driver experimental for now so that we can break L3 driver.","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"}],"neutron/callbacks/events.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e28ce03b9cf7dfa5ba806de1db64e8d9ad5b9f79","unresolved":false,"context_lines":[{"line_number":22,"context_line":"PRECOMMIT_UPDATE \u003d \u0027precommit_update\u0027"},{"line_number":23,"context_line":"PRECOMMIT_DELETE \u003d \u0027precommit_delete\u0027"},{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_514a6927","line":25,"range":{"start_line":25,"start_character":7,"end_line":25,"end_character":20},"updated":"2017-12-03 09:25:59.000000000","message":"this for me is very confusing. when I originally saw this I felt like it was for creating the driver.\nWhat about something like:\nBEFORE_PLUGIN_CREATE or even BEFORE_DRIVER_CREATE","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"48814f2e30f4ee16f5b19145466e63c14dcae319","unresolved":false,"context_lines":[{"line_number":22,"context_line":"PRECOMMIT_UPDATE \u003d \u0027precommit_update\u0027"},{"line_number":23,"context_line":"PRECOMMIT_DELETE \u003d \u0027precommit_delete\u0027"},{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_63479a4d","line":25,"range":{"start_line":25,"start_character":7,"end_line":25,"end_character":20},"in_reply_to":"df87a7cf_514a6927","updated":"2017-12-04 03:52:45.000000000","message":"+1 it\u0027s confusing\n\nhow about *_FOR_DRIVER?","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a1a5e5bdb83a3c7f30eadfe6e8f4ad6a09f897d6","unresolved":false,"context_lines":[{"line_number":22,"context_line":"PRECOMMIT_UPDATE \u003d \u0027precommit_update\u0027"},{"line_number":23,"context_line":"PRECOMMIT_DELETE \u003d \u0027precommit_delete\u0027"},{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_c54a1826","line":25,"range":{"start_line":25,"start_character":7,"end_line":25,"end_character":20},"in_reply_to":"df87a7cf_63479a4d","updated":"2017-12-04 17:51:35.000000000","message":"Done","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"48814f2e30f4ee16f5b19145466e63c14dcae319","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"},{"line_number":29,"context_line":"PRECOMMIT_ADD_ASSOCIATION \u003d \u0027precommit_add_association\u0027"},{"line_number":30,"context_line":"PRECOMMIT_DEL_ASSOCIATION \u003d \u0027precommit_del_association\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_402e0ca6","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":23},"updated":"2017-12-04 03:52:45.000000000","message":"this seems unused","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a1a5e5bdb83a3c7f30eadfe6e8f4ad6a09f897d6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"},{"line_number":29,"context_line":"PRECOMMIT_ADD_ASSOCIATION \u003d \u0027precommit_add_association\u0027"},{"line_number":30,"context_line":"PRECOMMIT_DEL_ASSOCIATION \u003d \u0027precommit_del_association\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_855410cc","line":27,"range":{"start_line":27,"start_character":0,"end_line":27,"end_character":23},"in_reply_to":"df87a7cf_402e0ca6","updated":"2017-12-04 17:51:35.000000000","message":"Done","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"9a5cb5ce6f52fddd3e133a3a694dd6372f5d35e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"PRECOMMIT_CREATE \u003d \u0027precommit_create\u0027"},{"line_number":22,"context_line":"PRECOMMIT_UPDATE \u003d \u0027precommit_update\u0027"},{"line_number":23,"context_line":"PRECOMMIT_DELETE \u003d \u0027precommit_delete\u0027"},{"line_number":24,"context_line":"# TODO(yamahata): add those to neutron-lib"},{"line_number":25,"context_line":"BEFORE_CREATE_DRIVER \u003d \u0027before_create_driver\u0027"},{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"},{"line_number":29,"context_line":"PRECOMMIT_ADD_ASSOCIATION \u003d \u0027precommit_add_association\u0027"},{"line_number":30,"context_line":"PRECOMMIT_DEL_ASSOCIATION \u003d \u0027precommit_del_association\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"AFTER_CREATE \u003d \u0027after_create\u0027"},{"line_number":33,"context_line":"AFTER_READ \u003d \u0027after_read\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_ad5fd870","line":30,"range":{"start_line":24,"start_character":0,"end_line":30,"end_character":55},"updated":"2017-12-01 03:01:05.000000000","message":"These name would be arguable.\nLet\u0027s hear other\u0027s opinion.","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"48814f2e30f4ee16f5b19145466e63c14dcae319","unresolved":false,"context_lines":[{"line_number":26,"context_line":"PRECOMMIT_CREATE_DRIVER \u003d \u0027precommit_create_driver\u0027"},{"line_number":27,"context_line":"PRECOMMIT_UPDATE_DRIVER \u003d \u0027precommit_update_driver\u0027"},{"line_number":28,"context_line":"PRECOMMIT_DELETE_DRIVER \u003d \u0027precommit_delete_driver\u0027"},{"line_number":29,"context_line":"PRECOMMIT_ADD_ASSOCIATION \u003d \u0027precommit_add_association\u0027"},{"line_number":30,"context_line":"PRECOMMIT_DEL_ASSOCIATION \u003d \u0027precommit_del_association\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"AFTER_CREATE \u003d \u0027after_create\u0027"},{"line_number":33,"context_line":"AFTER_READ \u003d \u0027after_read\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_20366805","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":55},"updated":"2017-12-04 03:52:45.000000000","message":"i guess these need an explanation.","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"}],"neutron/callbacks/resources.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"420ffc196b4cbb6c1046e297a4528e7cf75d41de","unresolved":false,"context_lines":[{"line_number":23,"context_line":"PROCESS \u003d \u0027process\u0027"},{"line_number":24,"context_line":"ROUTER \u003d \u0027router\u0027"},{"line_number":25,"context_line":"ROUTER_CONTROLLER \u003d \u0027router_controller\u0027"},{"line_number":26,"context_line":"ROUTER_EXTRA_ROUTE \u003d \u0027router_extra_route\u0027"},{"line_number":27,"context_line":"ROUTER_GATEWAY \u003d \u0027router_gateway\u0027"},{"line_number":28,"context_line":"ROUTER_INTERFACE \u003d \u0027router_interface\u0027"},{"line_number":29,"context_line":"SECURITY_GROUP \u003d \u0027security_group\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_e5915654","line":26,"updated":"2018-01-12 09:08:55.000000000","message":"are you going to introduce separate resources for each separate transactions?  eg. _update_router_gw_info?\ni\u0027m not sure if it\u0027s viable.\ni guess the current separation of transactions is considered as an implementation detail. (actually it has been changed relatively recently iirc)\nhow about using the same event (ROUTER/PRECOMMIT_UPDATE) for those transactions?  that way backend implementation can be simpler i guess.","commit_id":"d3b2da73c055354c1e9515f75fcf8d055ce10f1c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7452fd3b41c2398a065d964629598afb25572090","unresolved":false,"context_lines":[{"line_number":23,"context_line":"PROCESS \u003d \u0027process\u0027"},{"line_number":24,"context_line":"ROUTER \u003d \u0027router\u0027"},{"line_number":25,"context_line":"ROUTER_CONTROLLER \u003d \u0027router_controller\u0027"},{"line_number":26,"context_line":"ROUTER_EXTRA_ROUTE \u003d \u0027router_extra_route\u0027"},{"line_number":27,"context_line":"ROUTER_GATEWAY \u003d \u0027router_gateway\u0027"},{"line_number":28,"context_line":"ROUTER_INTERFACE \u003d \u0027router_interface\u0027"},{"line_number":29,"context_line":"SECURITY_GROUP \u003d \u0027security_group\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"7f96bb07_dc1c2d6c","line":26,"in_reply_to":"7f96bb07_e5915654","updated":"2018-01-12 15:47:26.000000000","message":"Done","commit_id":"d3b2da73c055354c1e9515f75fcf8d055ce10f1c"}],"neutron/db/extraroute_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"628538f4594f2daf93850ce5ad1c7ff6ed075e28","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":123,"context_line":"                        router\u003ddata, router_db\u003drouter_db,"},{"line_number":124,"context_line":"                        old_router\u003dold_router,"},{"line_number":125,"context_line":"                        routes_added\u003dadded, routes_removed\u003dremoved)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @staticmethod"},{"line_number":128,"context_line":"    def _make_extra_route_list(extra_routes):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_5bad5a86","line":125,"updated":"2018-01-29 08:24:33.000000000","message":"it\u0027s just an suggestion (I\u0027m not an expert in L3 related code). What if You would move this call of \"registry.notify()\" to method \"update_router()\" (just after L57) and here only return added and removed routes?\nThen IMHO it would be easier to read why this PRECOMMIT UPDATE is called and when this update commit will happen because now I had do scroll to top of the file to find when this method is called to check if there is any transaction there or not.","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"491a90de9063f1522dfb94e362230aaccd2291e8","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                        self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":123,"context_line":"                        router\u003ddata, router_db\u003drouter_db,"},{"line_number":124,"context_line":"                        old_router\u003dold_router,"},{"line_number":125,"context_line":"                        routes_added\u003dadded, routes_removed\u003dremoved)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @staticmethod"},{"line_number":128,"context_line":"    def _make_extra_route_list(extra_routes):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_9af3ca0a","line":125,"in_reply_to":"5f93b717_5bad5a86","updated":"2018-01-30 02:59:25.000000000","message":"Sounds reasonable.\nDone","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"d403cc24149b87d1fd5e9647908806c15b5137c9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                events.PRECOMMIT_UPDATE,"},{"line_number":62,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":63,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":64,"context_line":"                                old_router\u003dold_router,"},{"line_number":65,"context_line":"                                routes_added\u003droutes_added,"},{"line_number":66,"context_line":"                                routes_removed\u003droutes_removed)"},{"line_number":67,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_1e4985b5","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":53},"updated":"2018-02-02 07:04:33.000000000","message":"so old_router is in fact \"router_db\" transformed to dict, right?\nIf yes, I think that names here can be little confusing. Why it is not send as \"old_router_db\" or something like that.\nAnd one more question: do we need to send both: old router db object and dict from it?","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b9f9edf9fde4169a4a89a19c01a114e332760264","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                events.PRECOMMIT_UPDATE,"},{"line_number":62,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":63,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":64,"context_line":"                                old_router\u003dold_router,"},{"line_number":65,"context_line":"                                routes_added\u003droutes_added,"},{"line_number":66,"context_line":"                                routes_removed\u003droutes_removed)"},{"line_number":67,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_a82db295","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":53},"in_reply_to":"5f93b717_15b4037f","updated":"2018-02-02 09:09:01.000000000","message":"You misunderstands. router_db is updated value. router_db is ORM object and it\u0027s updated by _update_extra_routes() method.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7aaa4e14d48fdb907a5724115e70a01ad3cf62e9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                events.PRECOMMIT_UPDATE,"},{"line_number":62,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":63,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":64,"context_line":"                                old_router\u003dold_router,"},{"line_number":65,"context_line":"                                routes_added\u003droutes_added,"},{"line_number":66,"context_line":"                                routes_removed\u003droutes_removed)"},{"line_number":67,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_952d73ff","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":53},"in_reply_to":"5f93b717_1e4985b5","updated":"2018-02-02 08:54:29.000000000","message":"first question: Yes. _db means ORM object. odl_router is python dict. ORM object isn\u0027t easily copied. There is no point to manipulate old value.\n\nsecond question: it\u0027s convention to send both old(or original) value and updated value. Please see other PRECOMMIT places.\nThen backend can easily understand what was modified.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"c6c0b45a090556900df4695a7a2c9ef33886ac7f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                events.PRECOMMIT_UPDATE,"},{"line_number":62,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":63,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":64,"context_line":"                                old_router\u003dold_router,"},{"line_number":65,"context_line":"                                routes_added\u003droutes_added,"},{"line_number":66,"context_line":"                                routes_removed\u003droutes_removed)"},{"line_number":67,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_15b4037f","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":53},"in_reply_to":"5f93b717_952d73ff","updated":"2018-02-02 09:01:03.000000000","message":"I agree that both old and new value should be send. My only concern is that \"original\" router is represented by variable called \"router_db\" and also by \"old_router\" - maybe it should be more consistent, like: \"{old,current}_router_db\" and \"{old,current}_router\"","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2a258178e306c772d036d10129ebddba5f5abb0e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                events.PRECOMMIT_UPDATE,"},{"line_number":62,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":63,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":64,"context_line":"                                old_router\u003dold_router,"},{"line_number":65,"context_line":"                                routes_added\u003droutes_added,"},{"line_number":66,"context_line":"                                routes_removed\u003droutes_removed)"},{"line_number":67,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_48dbce4d","line":64,"range":{"start_line":64,"start_character":43,"end_line":64,"end_character":53},"in_reply_to":"5f93b717_a82db295","updated":"2018-02-02 09:27:51.000000000","message":"ah, ok, so in L56 You get old router and assign it to router_db variable which is later modified in self._update_extra_routes() method. Ok, now I understand it :)","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"96c02a52e7aed876a56c32eaca7a462a164dddde","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                old_router \u003d self._make_router_dict(router_db)"},{"line_number":58,"context_line":"                routes_added, routes_removed \u003d self._update_extra_routes("},{"line_number":59,"context_line":"                    context, router_db, r[\u0027routes\u0027])"},{"line_number":60,"context_line":"                registry.notify(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":61,"context_line":"                                self, context\u003dcontext, router_id\u003did,"},{"line_number":62,"context_line":"                                router\u003dr, router_db\u003drouter_db,"},{"line_number":63,"context_line":"                                old_router\u003dold_router,"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa0c359_9b1d2bbf","line":60,"range":{"start_line":60,"start_character":32,"end_line":60,"end_character":48},"updated":"2018-02-08 22:04:08.000000000","message":"shouldn\u0027t this also be ROUTER_CONTROLLER ? otherwise n-odl need to have two callbacks for handling the PRECOMMIT_UPDATE ?","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"c1ec23bd8af8e3982c062e07d77321dbf903c702","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                #check if route exists and have permission to access"},{"line_number":56,"context_line":"                router_db \u003d self._get_router(context, id)"},{"line_number":57,"context_line":"                old_router \u003d self._make_router_dict(router_db)"},{"line_number":58,"context_line":"                routes_added, routes_removed \u003d self._update_extra_routes("},{"line_number":59,"context_line":"                    context, router_db, r[\u0027routes\u0027])"},{"line_number":60,"context_line":"                registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":61,"context_line":"                                 self, payload\u003devents.DBEventPayload("}],"source_content_type":"text/x-python","patch_set":48,"id":"9f6a8fd7_b2172d52","line":58,"range":{"start_line":58,"start_character":16,"end_line":58,"end_character":45},"updated":"2018-04-28 00:51:18.000000000","message":"Those values need to be passed to callbacks.","commit_id":"563bbffb021a5a5e11b49d1e00abb07ce5749d0c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"83b844f10d63e4edac91039c4ae17e5659e26a5c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                #check if route exists and have permission to access"},{"line_number":56,"context_line":"                router_db \u003d self._get_router(context, id)"},{"line_number":57,"context_line":"                old_router \u003d self._make_router_dict(router_db)"},{"line_number":58,"context_line":"                routes_added, routes_removed \u003d self._update_extra_routes("},{"line_number":59,"context_line":"                    context, router_db, r[\u0027routes\u0027])"},{"line_number":60,"context_line":"                registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":61,"context_line":"                                 self, payload\u003devents.DBEventPayload("}],"source_content_type":"text/x-python","patch_set":48,"id":"9f6a8fd7_d3d40c4a","line":58,"range":{"start_line":58,"start_character":16,"end_line":58,"end_character":45},"in_reply_to":"9f6a8fd7_a81327b8","updated":"2018-04-30 18:17:31.000000000","message":"metadata can be used.\nIts usage is discouraged, though.\nAnyway silenlty dropping those arguments are not the way to adapt payload.","commit_id":"563bbffb021a5a5e11b49d1e00abb07ce5749d0c"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"22c2562788636ada41f7cd45e65761cf73948cab","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                #check if route exists and have permission to access"},{"line_number":56,"context_line":"                router_db \u003d self._get_router(context, id)"},{"line_number":57,"context_line":"                old_router \u003d self._make_router_dict(router_db)"},{"line_number":58,"context_line":"                routes_added, routes_removed \u003d self._update_extra_routes("},{"line_number":59,"context_line":"                    context, router_db, r[\u0027routes\u0027])"},{"line_number":60,"context_line":"                registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":61,"context_line":"                                 self, payload\u003devents.DBEventPayload("}],"source_content_type":"text/x-python","patch_set":48,"id":"9f6a8fd7_a81327b8","line":58,"range":{"start_line":58,"start_character":16,"end_line":58,"end_character":45},"in_reply_to":"9f6a8fd7_b2172d52","updated":"2018-04-30 17:37:16.000000000","message":"it can\u0027t be direct arguments as part payload, would it make sense to embed them to request_body or router_db ?","commit_id":"563bbffb021a5a5e11b49d1e00abb07ce5749d0c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"9c0468c3a66e92c6ac9bf02460652edce204c07a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                old_router \u003d self._make_router_dict(router_db)"},{"line_number":58,"context_line":"                routes_added, routes_removed \u003d self._update_extra_routes("},{"line_number":59,"context_line":"                    context, router_db, r[\u0027routes\u0027])"},{"line_number":60,"context_line":"                r[\u0027routes_added\u0027] \u003d routes_added"},{"line_number":61,"context_line":"                r[\u0027routes_removed\u0027] \u003d routes_removed"},{"line_number":62,"context_line":"                registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":63,"context_line":"                                 self, payload\u003devents.DBEventPayload("},{"line_number":64,"context_line":"                                     context, request_body\u003dr,"}],"source_content_type":"text/x-python","patch_set":49,"id":"9f6a8fd7_f35350e1","line":61,"range":{"start_line":60,"start_character":0,"end_line":61,"end_character":52},"updated":"2018-04-30 18:19:58.000000000","message":"This seems one possible way to pass those values.\nbut don\u0027t modify r unconditionally.\ncopy the dict and modify it.","commit_id":"6040e976650557823109f0d7651d7c4359682e67"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"69f47b99bcd4040b18a91991a60868aac07039a6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                router_data \u003d copy.deepcopy(r)"},{"line_number":63,"context_line":"                router_data[\u0027routes_added\u0027] \u003d routes_added"},{"line_number":64,"context_line":"                router_data[\u0027routes_removed\u0027] \u003d routes_removed"},{"line_number":65,"context_line":"                registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":66,"context_line":"                                 self, payload\u003devents.DBEventPayload("},{"line_number":67,"context_line":"                                     context, request_body\u003drouter_data,"},{"line_number":68,"context_line":"                                     states\u003d(old_router,), resource_id\u003did,"},{"line_number":69,"context_line":"                                     desired_state\u003drouter_db))"},{"line_number":70,"context_line":"            # NOTE(yamamoto): expire to ensure the following update_router"},{"line_number":71,"context_line":"            # see the effects of the above _update_extra_routes."},{"line_number":72,"context_line":"            context.session.expire(router_db, attribute_names\u003d[\u0027route_list\u0027])"}],"source_content_type":"text/x-python","patch_set":53,"id":"9f6a8fd7_64e9a1b5","line":69,"range":{"start_line":65,"start_character":16,"end_line":69,"end_character":62},"updated":"2018-05-01 22:06:14.000000000","message":"publish call can be asserted in tests/unit/db/test_extraroute_db.py","commit_id":"55032c8484afa8c46a4f3a86a983293533aef092"}],"neutron/db/l3_attrs_db.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"fc26492b5fb04a8d5f7d6da2ab3108e5f701bd84","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # set a single value explicitly"},{"line_number":62,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":63,"context_line":"            if key in get_attr_info():"},{"line_number":64,"context_line":"                old_router \u003d l3_db.L3_NAT_dbonly_mixin._make_router_dict("},{"line_number":65,"context_line":"                    router_db)"},{"line_number":66,"context_line":"                info \u003d get_attr_info()[key]"},{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_f2f64d5d","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":55},"updated":"2018-02-02 07:59:57.000000000","message":"why not self._make_router_dict?  for unit tests?","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"db57b5a3d4112a6a338f12ba1d86a460afccf9ce","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # set a single value explicitly"},{"line_number":62,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":63,"context_line":"            if key in get_attr_info():"},{"line_number":64,"context_line":"                old_router \u003d l3_db.L3_NAT_dbonly_mixin._make_router_dict("},{"line_number":65,"context_line":"                    router_db)"},{"line_number":66,"context_line":"                info \u003d get_attr_info()[key]"},{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_3afec36a","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":55},"in_reply_to":"5f93b717_a8ccd234","updated":"2018-02-03 14:26:52.000000000","message":"Ah, it\u0027s for unit test as you guessed.\nsome of unit test instantiate ExtraAttributesMixin and call this method.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"8551fbeaaee241f26409387caaa345a42bda5302","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # set a single value explicitly"},{"line_number":62,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":63,"context_line":"            if key in get_attr_info():"},{"line_number":64,"context_line":"                old_router \u003d l3_db.L3_NAT_dbonly_mixin._make_router_dict("},{"line_number":65,"context_line":"                    router_db)"},{"line_number":66,"context_line":"                info \u003d get_attr_info()[key]"},{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_a8ccd234","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":55},"in_reply_to":"5f93b717_f2272dc6","updated":"2018-02-02 09:47:40.000000000","message":"while python doesn\u0027t have explicit self-typing, isn\u0027t it normal for mixins? but ok.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7aaa4e14d48fdb907a5724115e70a01ad3cf62e9","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        # set a single value explicitly"},{"line_number":62,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":63,"context_line":"            if key in get_attr_info():"},{"line_number":64,"context_line":"                old_router \u003d l3_db.L3_NAT_dbonly_mixin._make_router_dict("},{"line_number":65,"context_line":"                    router_db)"},{"line_number":66,"context_line":"                info \u003d get_attr_info()[key]"},{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_f2272dc6","line":64,"range":{"start_line":64,"start_character":29,"end_line":64,"end_character":55},"in_reply_to":"5f93b717_f2f64d5d","updated":"2018-02-02 08:54:29.000000000","message":"This class isn\u0027t a subclass of L3_NAT_dbonly_mixin.\nThis class doesn\u0027t have the method.\nplease see line 41.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"fc26492b5fb04a8d5f7d6da2ab3108e5f701bd84","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"},{"line_number":68,"context_line":"                self._ensure_extra_attr_model(context, router_db)"},{"line_number":69,"context_line":"                router_db[\u0027extra_attributes\u0027].update({key: to_db(value)})"},{"line_number":70,"context_line":"                registry.notify(resources.ROUTER_CONTROLLER,"},{"line_number":71,"context_line":"                    events.PRECOMMIT_UPDATE,"},{"line_number":72,"context_line":"                    self, context\u003dcontext, router_id\u003drouter_db[\u0027id\u0027],"},{"line_number":73,"context_line":"                    router\u003d{l3_apidef.ROUTER: {key: value}},"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_72d23dd3","line":70,"range":{"start_line":70,"start_character":42,"end_line":70,"end_character":59},"updated":"2018-02-02 07:59:57.000000000","message":"i prefer to use ROUTER/PRECOMMIT_UPDATE here and make driver_controller generate ROUTER_CONTROLLER/PRECOMMIT_UPDATE.\nditto for other l3_xxx_db.py\nthat way these mixins have less knowledge about consumers of events.\nhow do you think?","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7aaa4e14d48fdb907a5724115e70a01ad3cf62e9","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"},{"line_number":68,"context_line":"                self._ensure_extra_attr_model(context, router_db)"},{"line_number":69,"context_line":"                router_db[\u0027extra_attributes\u0027].update({key: to_db(value)})"},{"line_number":70,"context_line":"                registry.notify(resources.ROUTER_CONTROLLER,"},{"line_number":71,"context_line":"                    events.PRECOMMIT_UPDATE,"},{"line_number":72,"context_line":"                    self, context\u003dcontext, router_id\u003drouter_db[\u0027id\u0027],"},{"line_number":73,"context_line":"                    router\u003d{l3_apidef.ROUTER: {key: value}},"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_b5e2efd3","line":70,"range":{"start_line":70,"start_character":42,"end_line":70,"end_character":59},"in_reply_to":"5f93b717_72d23dd3","updated":"2018-02-02 08:54:29.000000000","message":"That\u0027s the previous patch does. You suggested to use (ROUTER_DRIVER, PRECOMMIT_UPDATE) to avoid callback order issue.\n\nAfter looking at both patch, I prefer ROUTER_CONTROLLER to avoid convoluted execution path.\n\nl3_dvr_db l3_hamode_db also subscribe (ROUTER, PRECOMMIT_UPDATE) and call this method, set_extra_attr_value().\nSo if (ROUTER, PRECOMMIT_UPDATE) is used, we hit avoid such callback order issue.\nIn long term dvr, ha, gwmode need to be more refactored to avoid convoluted execution path, though.","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"8551fbeaaee241f26409387caaa345a42bda5302","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"},{"line_number":68,"context_line":"                self._ensure_extra_attr_model(context, router_db)"},{"line_number":69,"context_line":"                router_db[\u0027extra_attributes\u0027].update({key: to_db(value)})"},{"line_number":70,"context_line":"                registry.notify(resources.ROUTER_CONTROLLER,"},{"line_number":71,"context_line":"                    events.PRECOMMIT_UPDATE,"},{"line_number":72,"context_line":"                    self, context\u003dcontext, router_id\u003drouter_db[\u0027id\u0027],"},{"line_number":73,"context_line":"                    router\u003d{l3_apidef.ROUTER: {key: value}},"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f93b717_489d0e08","line":70,"range":{"start_line":70,"start_character":42,"end_line":70,"end_character":59},"in_reply_to":"5f93b717_b5e2efd3","updated":"2018-02-02 09:47:40.000000000","message":"my suggestion was to make driver_controller generate ROUTER_CONTROLLER/PRECOMMIT_UPDATE events.\nthe previous patch didn\u0027t have it, did it?","commit_id":"4f4ddc3d5dbad0615bf9143a2e8d9e431b3412ac"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"96c02a52e7aed876a56c32eaca7a462a164dddde","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                to_db \u003d info.get(\u0027transform_to_db\u0027, lambda x: x)"},{"line_number":68,"context_line":"                self._ensure_extra_attr_model(context, router_db)"},{"line_number":69,"context_line":"                router_db[\u0027extra_attributes\u0027].update({key: to_db(value)})"},{"line_number":70,"context_line":"                # NOTE(yamahata): this method is called by callbacks"},{"line_number":71,"context_line":"                # of (ROUTER, PRECOMMIT_UPDATE) l3_*_db.py and"},{"line_number":72,"context_line":"                # availability_zone/router.py. To avoid cyclic callback,"},{"line_number":73,"context_line":"                # ROUTER_CONTROLLER is used for l3 flavor."},{"line_number":74,"context_line":"                registry.notify(resources.ROUTER_CONTROLLER,"},{"line_number":75,"context_line":"                    events.PRECOMMIT_UPDATE,"},{"line_number":76,"context_line":"                    self, context\u003dcontext, router_id\u003drouter_db[\u0027id\u0027],"},{"line_number":77,"context_line":"                    router\u003d{l3_apidef.ROUTER: {key: value}},"},{"line_number":78,"context_line":"                    router_db\u003drouter_db, old_router\u003dold_router)"},{"line_number":79,"context_line":"                return"},{"line_number":80,"context_line":"            raise RuntimeError(_(\"Tried to set a key \u0027%s\u0027 that doesn\u0027t exist \""},{"line_number":81,"context_line":"                                 \"in the extra attributes table.\") % key)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa0c359_35e1622b","line":78,"range":{"start_line":70,"start_character":14,"end_line":78,"end_character":63},"updated":"2018-02-08 22:04:08.000000000","message":"is this the right place to have it ? this will called for create as well to set each attribute and value like ha and distributed to the router ? idk why there is separate transaction for each key value which is very inefficient set each parameter value in a different transaction but that\u0027s not the part of problem atm, with this update_precommit callback will be called before create_precommit and can crash the whole router create operation.","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"69f47b99bcd4040b18a91991a60868aac07039a6","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                    router_body \u003d {l3_apidef.ROUTER:"},{"line_number":149,"context_line":"                            {l3_ext_ha_apidef.HA_INFO: True,"},{"line_number":150,"context_line":"                             \u0027ha_vr_id\u0027: allocation.vr_id}}"},{"line_number":151,"context_line":"                    registry.publish(resources.ROUTER, events.PRECOMMIT_UPDATE,"},{"line_number":152,"context_line":"                                     self, payload\u003devents.DBEventPayload("},{"line_number":153,"context_line":"                                         context, request_body\u003drouter_body,"},{"line_number":154,"context_line":"                                         states\u003d(old_router,),"},{"line_number":155,"context_line":"                                         resource_id\u003drouter_id,"},{"line_number":156,"context_line":"                                         desired_state\u003drouter_db))"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"                    return allocation.vr_id"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"9f6a8fd7_c4c42d43","line":156,"range":{"start_line":151,"start_character":19,"end_line":156,"end_character":66},"updated":"2018-05-01 22:06:14.000000000","message":"a test in unit/db/test_l3_hamode.py can be modified to assert that publish is being called on update case","commit_id":"55032c8484afa8c46a4f3a86a983293533aef092"}],"neutron/services/l3_router/service_providers/driver_controller.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"628538f4594f2daf93850ce5ad1c7ff6ed075e28","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":156,"context_line":"                    trigger, context\u003dcontext, router_ids\u003d[router_id],"},{"line_number":157,"context_line":"                    old_router\u003dold_router, router_db\u003drouter_db,"},{"line_number":158,"context_line":"                    old_driver\u003ddrv, new_driver\u003dnew_drv, **kwargs)"},{"line_number":159,"context_line":"                self._stm.del_resource_associations(context, [router_id])"},{"line_number":160,"context_line":"                self._stm.add_resource_association("},{"line_number":161,"context_line":"                    context, plugin_constants.L3, new_drv.name, router_id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_fb38e63d","line":158,"updated":"2018-01-29 08:24:33.000000000","message":"is this good here? why it\u0027s called at the \"beginning\" of block code for delete precommit and at the end for add precommit?","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"491a90de9063f1522dfb94e362230aaccd2291e8","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":156,"context_line":"                    trigger, context\u003dcontext, router_ids\u003d[router_id],"},{"line_number":157,"context_line":"                    old_router\u003dold_router, router_db\u003drouter_db,"},{"line_number":158,"context_line":"                    old_driver\u003ddrv, new_driver\u003dnew_drv, **kwargs)"},{"line_number":159,"context_line":"                self._stm.del_resource_associations(context, [router_id])"},{"line_number":160,"context_line":"                self._stm.add_resource_association("},{"line_number":161,"context_line":"                    context, plugin_constants.L3, new_drv.name, router_id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_7a46fe23","line":158,"in_reply_to":"5f93b717_fb38e63d","updated":"2018-01-30 02:59:25.000000000","message":"Yes, this is as intentional.\nfor add/update, db update, then callback(precommit).\nfor delete, callback(precommit) then db update.","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"628538f4594f2daf93850ce5ad1c7ff6ed075e28","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                resources.ROUTER_CONTROLLER,"},{"line_number":183,"context_line":"                events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":184,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":185,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":186,"context_line":"        return self.drivers[driver_name]"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_bb3a5e31","line":185,"updated":"2018-01-29 08:24:33.000000000","message":"hmm, where this commit is called then?","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"491a90de9063f1522dfb94e362230aaccd2291e8","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                resources.ROUTER_CONTROLLER,"},{"line_number":183,"context_line":"                events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":184,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":185,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":186,"context_line":"        return self.drivers[driver_name]"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_1a6eda94","line":185,"in_reply_to":"5f93b717_bb3a5e31","updated":"2018-01-30 02:59:25.000000000","message":"ths case is a tricky case.\nThis is for default flavor case. \nservices/l3_router/service_provider/driver_controller.py calls this under db transaction.\nWhen default flavor isn\u0027t assigned and flavor is needed, this is get called to assign default flavor.","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"876b2296a5b6614a5dc08c10456e1329047115d1","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self._stm.add_provider_configuration("},{"line_number":51,"context_line":"                plugin_constants.L3, _LegacyPlusProviderConfiguration())"},{"line_number":52,"context_line":"        self._load_drivers()"},{"line_number":53,"context_line":"        # NOTE(yamahata): (ROUTER, PRECOMMIT_CREATE/UPDATEA) are also"},{"line_number":54,"context_line":"        # subscribed by other l3_*_db.py, availability_zone/router.py"},{"line_number":55,"context_line":"        # to update their own extended attributes."},{"line_number":56,"context_line":"        # Resort sqlalchemy event to guarantee that our callbacks be"},{"line_number":57,"context_line":"        # called at last so that l3 flavor driver can see all those"},{"line_number":58,"context_line":"        # extended attributes."},{"line_number":59,"context_line":"        db_api.sqla_listen(orm.Session, \u0027after_soft_rollback\u0027,"},{"line_number":60,"context_line":"                           self._after_soft_rollback)"},{"line_number":61,"context_line":"        db_api.sqla_listen(orm.Session, \u0027before_commit\u0027, self._before_commit)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    _SQLA_LISTENER \u003d \u0027_l3_driver_controller_listener\u0027"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _after_soft_rollback(self, session, previous_transaction):"},{"line_number":66,"context_line":"        session.info.pop(self._SQLA_LISTENER, None)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def _before_commit(self, session):"},{"line_number":69,"context_line":"        fn \u003d session.info.pop(self._SQLA_LISTENER, None)"},{"line_number":70,"context_line":"        if fn:"},{"line_number":71,"context_line":"            fn(session)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _set_listener(self, context, fn):"},{"line_number":74,"context_line":"        context.session.info.setdefault(self._SQLA_LISTENER, fn)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _load_drivers(self):"},{"line_number":77,"context_line":"        self.drivers, self.default_provider \u003d ("}],"source_content_type":"text/x-python","patch_set":33,"id":"3fa0c359_631c5b6a","line":74,"range":{"start_line":53,"start_character":0,"end_line":74,"end_character":64},"updated":"2018-02-06 22:49:15.000000000","message":"Isn\u0027t there a way we can avoid this? I had a chat with Michael Bayer and this was his feedback: http://eavesdrop.openstack.org/irclogs/%23openstack-neutron/%23openstack-neutron.2018-02-06.log.html#t2018-02-06T21:49:15","commit_id":"9ff4d82d6efd8b8d165581f2d7eee0e29ee9f544"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"e5f62b955ca111301ff5c9eb599527fae0628927","unresolved":false,"context_lines":[{"line_number":161,"context_line":"                    context, plugin_constants.L3, new_drv.name, router_id)"},{"line_number":162,"context_line":"                registry.notify("},{"line_number":163,"context_line":"                    resources.ROUTER_CONTROLLER,"},{"line_number":164,"context_line":"                    events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":165,"context_line":"                    trigger, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":166,"context_line":"                    old_router\u003dold_router, router_db\u003drouter_db,"},{"line_number":167,"context_line":"                    old_driver\u003ddrv, new_driver\u003dnew_drv, **kwargs)"}],"source_content_type":"text/x-python","patch_set":34,"id":"3fa0c359_34f2ab71","line":164,"range":{"start_line":164,"start_character":27,"end_line":164,"end_character":52},"updated":"2018-03-06 19:17:43.000000000","message":"PRECOMMIT","commit_id":"667b76a5cd8a2186d8dee8df143c48c85b91e004"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"1892aac34079d16a67353f87d68038edb297a8dc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        drv \u003d self.get_provider_for_router(context, router_id)"},{"line_number":102,"context_line":"        registry.notify("},{"line_number":103,"context_line":"            resources.ROUTER_CONTROLLER, events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":104,"context_line":"            trigger, context\u003dcontext, router_ids\u003d[router_id],"},{"line_number":105,"context_line":"            old_driver\u003ddrv, new_driver\u003dNone, **kwargs)"},{"line_number":106,"context_line":"        self._stm.del_resource_associations(context, [router_id])"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"5f7c97a3_f91273b4","line":104,"range":{"start_line":104,"start_character":38,"end_line":104,"end_character":60},"updated":"2018-05-18 00:06:26.000000000","message":"this should not be list, actually, callback is called for each router separately so it doesn\u0027t make sense to send router_id as list","commit_id":"bfccd714768ac65659c6fadd8f39945775099f35"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2462b8a400c2c5b0cb9de840648bb287f406407a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                registry.publish("},{"line_number":160,"context_line":"                    resources.ROUTER_CONTROLLER,"},{"line_number":161,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":162,"context_line":"                    trigger, payload\u003dpayload)"},{"line_number":163,"context_line":"                self._stm.del_resource_associations("},{"line_number":164,"context_line":"                    payload.context, [payload.resource_id])"},{"line_number":165,"context_line":"                self._stm.add_resource_association("}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_d01e580c","line":162,"updated":"2018-06-18 08:28:00.000000000","message":"in fact this will be send before del_resource_association AND add_resource_association will be committed, right?\nShouldn\u0027t we have some PRECOMMIT_UPDATE_ASSOCIATION event then?","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"8feece162f76dbfb45f607914e96686887418d1c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                registry.publish("},{"line_number":160,"context_line":"                    resources.ROUTER_CONTROLLER,"},{"line_number":161,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":162,"context_line":"                    trigger, payload\u003dpayload)"},{"line_number":163,"context_line":"                self._stm.del_resource_associations("},{"line_number":164,"context_line":"                    payload.context, [payload.resource_id])"},{"line_number":165,"context_line":"                self._stm.add_resource_association("}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_f9aa0182","line":162,"in_reply_to":"5f7c97a3_b1bb9073","updated":"2018-06-21 15:19:37.000000000","message":"and also I think the other reason of having transaction is because there two operations involved delete router for a old flavor and create one for new those might need to happen within same transaction, where as in method L173 there\u0027s only one create operation.","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7e45ccd345f8d99aaacd8287e474947b58026e21","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                registry.publish("},{"line_number":160,"context_line":"                    resources.ROUTER_CONTROLLER,"},{"line_number":161,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":162,"context_line":"                    trigger, payload\u003dpayload)"},{"line_number":163,"context_line":"                self._stm.del_resource_associations("},{"line_number":164,"context_line":"                    payload.context, [payload.resource_id])"},{"line_number":165,"context_line":"                self._stm.add_resource_association("}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_b1bb9073","line":162,"in_reply_to":"5f7c97a3_d01e580c","updated":"2018-06-18 20:49:56.000000000","message":"this is the case where router provider is being updated, this event will be subscribed by drivers, It has two publish calls, first is to delete the router associated to old driver nad L168 is for creation of new driver, it will only happen if the associated flavor is changed.\n\nIMO, PRECOMMIT_UPDATE_ASSOCIATION is not needed at all, it will be an extra event. as this code will be triggered only when associated flavors (mean router backend is changed). for router update within same flavor (PRECOMMIT_UPDATE) will take care of it.","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"53636a7135ccc2a1b867e5d14363a6a8f32e198c","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                registry.publish("},{"line_number":160,"context_line":"                    resources.ROUTER_CONTROLLER,"},{"line_number":161,"context_line":"                    events.PRECOMMIT_DELETE_ASSOCIATIONS,"},{"line_number":162,"context_line":"                    trigger, payload\u003dpayload)"},{"line_number":163,"context_line":"                self._stm.del_resource_associations("},{"line_number":164,"context_line":"                    payload.context, [payload.resource_id])"},{"line_number":165,"context_line":"                self._stm.add_resource_association("}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_4729cc99","line":162,"in_reply_to":"5f7c97a3_f9aa0182","updated":"2018-06-21 17:24:03.000000000","message":"single PRECOMMIT_UPDATE_ASSOCIATION causes subtle ordering issue.\n\nwith PRECOMMIT_DELETE_ASSOCIATIONS, the associated l3 flavor driver disassociates it.\nand then with PRECOMMIT_ADD_ASSOCIATIONS, the new l3 flavor driver will be associated.\nThe order makes sense here. delete and then add.\n\nHowever, single PRECOMMIT_UPDATE_ASSOCIATION doesn\u0027t make a guaranteed order between old and new flavor driver.\nFor that reason, intentionally two callbacks are added.\nIf you like, we can add PRECOMMIT_UPDATE_ASSOCIATION in addition to two callback.","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"2462b8a400c2c5b0cb9de840648bb287f406407a","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_50d0082c","line":188,"updated":"2018-06-18 08:28:00.000000000","message":"is it really precommit? Where this commit is done then?","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6a8e2c9088897f40fadefb14bd3169a5c67d8705","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_dc728ee3","line":188,"in_reply_to":"5f7c97a3_27c290ea","updated":"2018-06-21 20:28:54.000000000","message":"ok, that is fine for me :)","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"fb68dc460f864c0d545e4d8756c4117750cc0a46","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_59df75d6","line":188,"in_reply_to":"5f7c97a3_41ba4ee1","updated":"2018-06-21 15:30:23.000000000","message":"it is just a bit confusing for me as You send even PRECOMMIT_SOMETHING and I don\u0027t see any commit after that :)","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"7e45ccd345f8d99aaacd8287e474947b58026e21","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_f17d88b2","line":188,"in_reply_to":"5f7c97a3_50d0082c","updated":"2018-06-18 20:49:56.000000000","message":"idk, if I understand your comment, it is just an event name,\n\nAFTER_CREATE events for router is also subscribed. which will be a post_commit equivalent.\n\nhttps://review.openstack.org/#/c/504182/35/networking_odl/l3/l3_flavor.py@180","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"53636a7135ccc2a1b867e5d14363a6a8f32e198c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_27c290ea","line":188,"in_reply_to":"5f7c97a3_59df75d6","updated":"2018-06-21 17:24:03.000000000","message":"Given that we call l3 plugin at the line of 180, we can assume that this method is called out side of db transaction.\nSo we should start db transaction in this method. But it\u0027s already existing bug. So let\u0027s address it with follow up patch.\n\nUntil now due to autocommit, this wasn\u0027t an issue, I think.","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"ec1020e9fc0b1e8074eb32b888bbc3a097507c4a","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_41ba4ee1","line":188,"in_reply_to":"5f7c97a3_ceb77921","updated":"2018-06-19 18:04:52.000000000","message":"this add if you look at sequence of events, for add \n self._stm.add_resource_association is done before publish,\n\nbut the case you referred is delete where backend is notified first before deleting it from neutron db.\n\nlogically it make sense to have transaction before L183, but it was like that before and missing notification. so adding it under transaction is a separate issue and not in scope of this patch.","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"65744ac6b828c4e44719e96433211881027a783c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            registry.notify("},{"line_number":186,"context_line":"                resources.ROUTER_CONTROLLER, events.PRECOMMIT_ADD_ASSOCIATION,"},{"line_number":187,"context_line":"                self, context\u003dcontext, router_id\u003drouter_id,"},{"line_number":188,"context_line":"                router\u003drouter, old_driver\u003dNone, new_driver\u003ddriver)"},{"line_number":189,"context_line":"        return self.drivers[driver_name]"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _get_provider_for_create(self, context, router):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5f7c97a3_ceb77921","line":188,"in_reply_to":"5f7c97a3_f17d88b2","updated":"2018-06-19 08:09:59.000000000","message":"Here I just don\u0027t know where this \"commit\" action happens. E.g in L158 You have \"with context.session.begin():\" so it\u0027s clear that when You are \"going out\" from this context, it will commit transaction from session, right? Here I don\u0027t see anything like that.\nIt looks for me even more like POSTCOMMIT_ADD_ASSOCIATION event if association is done in fact in self._stm.add_resource_association() above","commit_id":"b9fabd82675e2b74dd4afd3b7d1f8fbda6951ecd"}],"neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"48814f2e30f4ee16f5b19145466e63c14dcae319","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.assertFalse(self.dc.drivers[\u0027dvr\u0027].owns_router(self.ctx, None))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @mock.patch(\u0027neutron_lib.callbacks.registry.notify\u0027)"},{"line_number":77,"context_line":"    def test__set_router_provider_flavor_specified(self, mock_ab):"},{"line_number":78,"context_line":"        self._return_provider_for_flavor(\u0027dvrha\u0027)"},{"line_number":79,"context_line":"        router_db \u003d mock.Mock()"},{"line_number":80,"context_line":"        flavor_id \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_03848e5d","line":77,"range":{"start_line":77,"start_character":62,"end_line":77,"end_character":64},"updated":"2017-12-04 03:52:45.000000000","message":"what \"ab\" stands for?","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a1a5e5bdb83a3c7f30eadfe6e8f4ad6a09f897d6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.assertFalse(self.dc.drivers[\u0027dvr\u0027].owns_router(self.ctx, None))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @mock.patch(\u0027neutron_lib.callbacks.registry.notify\u0027)"},{"line_number":77,"context_line":"    def test__set_router_provider_flavor_specified(self, mock_ab):"},{"line_number":78,"context_line":"        self._return_provider_for_flavor(\u0027dvrha\u0027)"},{"line_number":79,"context_line":"        router_db \u003d mock.Mock()"},{"line_number":80,"context_line":"        flavor_id \u003d uuidutils.generate_uuid()"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_65654cb5","line":77,"range":{"start_line":77,"start_character":62,"end_line":77,"end_character":64},"in_reply_to":"df87a7cf_03848e5d","updated":"2017-12-04 17:51:35.000000000","message":"just an argument name other than mock, i\u0027ll rename it to mock_cb (mock_callback)","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"9a5cb5ce6f52fddd3e133a3a694dd6372f5d35e3","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        router \u003d dict(id\u003drouter_id, flavor_id\u003dflavor_id)"},{"line_number":83,"context_line":"        self.dc._set_router_provider(\u0027router\u0027, \u0027PRECOMMIT_CREATE\u0027, self,"},{"line_number":84,"context_line":"                                     self.ctx, router, router_db)"},{"line_number":85,"context_line":"        self.assertTrue(mock_ab.called)"},{"line_number":86,"context_line":"        self.assertEqual(flavor_id, router_db.flavor_id)"},{"line_number":87,"context_line":"        self.assertEqual(self.dc.drivers[\u0027dvrha\u0027],"},{"line_number":88,"context_line":"                         self.dc.get_provider_for_router(self.ctx,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff82abbf_8d81b4c6","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":39},"updated":"2017-12-01 03:01:05.000000000","message":"mock_ab.assert_called()","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"a1a5e5bdb83a3c7f30eadfe6e8f4ad6a09f897d6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        router \u003d dict(id\u003drouter_id, flavor_id\u003dflavor_id)"},{"line_number":83,"context_line":"        self.dc._set_router_provider(\u0027router\u0027, \u0027PRECOMMIT_CREATE\u0027, self,"},{"line_number":84,"context_line":"                                     self.ctx, router, router_db)"},{"line_number":85,"context_line":"        self.assertTrue(mock_ab.called)"},{"line_number":86,"context_line":"        self.assertEqual(flavor_id, router_db.flavor_id)"},{"line_number":87,"context_line":"        self.assertEqual(self.dc.drivers[\u0027dvrha\u0027],"},{"line_number":88,"context_line":"                         self.dc.get_provider_for_router(self.ctx,"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_055a40f2","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":39},"in_reply_to":"ff82abbf_8d81b4c6","updated":"2017-12-04 17:51:35.000000000","message":"Done","commit_id":"1eef222228f427d93da7628dd55f5381fb10a964"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"628538f4594f2daf93850ce5ad1c7ff6ed075e28","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                         self.dc.get_provider_for_router(self.ctx,"},{"line_number":89,"context_line":"                                                         router_id))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch(\u0027neutron_lib.callbacks.registry.notify\u0027)"},{"line_number":92,"context_line":"    def test__update_router_provider_invalid(self, mock_cb):"},{"line_number":93,"context_line":"        test_dc \u003d driver_controller.DriverController(self.fake_l3)"},{"line_number":94,"context_line":"        with mock.patch.object(test_dc, \"get_provider_for_router\"):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_fb11c6ad","line":91,"updated":"2018-01-29 08:24:33.000000000","message":"Maybe it\u0027s only me but why You are mixing mocking via decorators with mocking in context manager? Can\u0027t You add Your mock to \"with\" block in L95?","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"491a90de9063f1522dfb94e362230aaccd2291e8","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                         self.dc.get_provider_for_router(self.ctx,"},{"line_number":89,"context_line":"                                                         router_id))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch(\u0027neutron_lib.callbacks.registry.notify\u0027)"},{"line_number":92,"context_line":"    def test__update_router_provider_invalid(self, mock_cb):"},{"line_number":93,"context_line":"        test_dc \u003d driver_controller.DriverController(self.fake_l3)"},{"line_number":94,"context_line":"        with mock.patch.object(test_dc, \"get_provider_for_router\"):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_75461124","line":91,"in_reply_to":"5f93b717_fb11c6ad","updated":"2018-01-30 02:59:25.000000000","message":"Done","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"94757764754d224133adc46de373408e99dfcd14","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                         self.dc.get_provider_for_router(self.ctx,"},{"line_number":89,"context_line":"                                                         router_id))"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch(\u0027neutron_lib.callbacks.registry.notify\u0027)"},{"line_number":92,"context_line":"    def test__update_router_provider_invalid(self, mock_cb):"},{"line_number":93,"context_line":"        test_dc \u003d driver_controller.DriverController(self.fake_l3)"},{"line_number":94,"context_line":"        with mock.patch.object(test_dc, \"get_provider_for_router\"):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f93b717_706dc730","line":91,"in_reply_to":"5f93b717_fb11c6ad","updated":"2018-02-01 19:42:41.000000000","message":"it is same as doing other way, I see mocks done both ways","commit_id":"37bae37f00b9f1d61995d3e0d09038ef85c6fd96"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"387488d7256a7dfc8dfa7bcc0b9387da9b9c49e4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"DB_PLUGIN_KLASS \u003d \u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class TestDriverController(testlib_api.SqlTestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(TestDriverController, self).setUp()"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_38555efb","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":52},"updated":"2018-04-04 22:59:15.000000000","message":"need more test cases for PRECOMMIT_DEL_ASSOCIATIONS, PRECOMMIT_ADD_ASSOCIATION.","commit_id":"2ea55475285a0193f69341b604c8248d602c1e2a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"b7191b0a5b99bb79b4bd6c4f74271a6cd2e40880","unresolved":false,"context_lines":[{"line_number":32,"context_line":"DB_PLUGIN_KLASS \u003d \u0027neutron.db.db_base_plugin_v2.NeutronDbPluginV2\u0027"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class TestDriverController(testlib_api.SqlTestCase):"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(TestDriverController, self).setUp()"}],"source_content_type":"text/x-python","patch_set":38,"id":"bf659307_40d929f2","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":52},"in_reply_to":"bf659307_38555efb","updated":"2018-04-05 18:12:59.000000000","message":"Done","commit_id":"2ea55475285a0193f69341b604c8248d602c1e2a"}],"requirements.txt":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7d8c3ed8eea4518cc80dac020c076d8b7f506207","unresolved":false,"context_lines":[{"line_number":14,"context_line":"keystonemiddleware\u003e\u003d4.17.0 # Apache-2.0"},{"line_number":15,"context_line":"netaddr\u003e\u003d0.7.18 # BSD"},{"line_number":16,"context_line":"netifaces\u003e\u003d0.10.4 # MIT"},{"line_number":17,"context_line":"neutron-lib\u003e\u003d1.13.0 # Apache-2.0"},{"line_number":18,"context_line":"python-neutronclient\u003e\u003d6.7.0 # Apache-2.0"},{"line_number":19,"context_line":"tenacity\u003e\u003d3.2.1 # Apache-2.0"},{"line_number":20,"context_line":"ryu\u003e\u003d4.14 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":42,"id":"bf659307_fc59568d","line":17,"range":{"start_line":17,"start_character":13,"end_line":17,"end_character":20},"updated":"2018-04-13 07:47:15.000000000","message":"1.14.0\nonce new neutron-lib is released.","commit_id":"49b4fa807a9bf057920c4e3dacb6aa3b6f555bef"}],"upper.txt":[{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c1c20d57958054359ff28d283c57fb0c7da087c5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":47,"id":"9f6a8fd7_f2e045cf","updated":"2018-04-28 00:02:43.000000000","message":"Note: this is just for testing against neutron-lib master, that\u0027s why patch has DNM in commit message. will be removed once confirmed all the tests are passing.","commit_id":"e2d0dba976138329bec82c538b1ad02f1c81fb81"}]}
