)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"4880b8c4eecd819bc56276f156d687e9b6389ae6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1. if a l3 agent in one compute node has not bind to a DVR"},{"line_number":17,"context_line":"   router, when we create a VM in this compute node, we just"},{"line_number":18,"context_line":"   schedule the router for this l3 agent, and just send"},{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":20,"context_line":"2. if a l3 agent in one compute node has bind to a DVR router,"},{"line_number":21,"context_line":"   when we create a VM in this compute node, we just need to send"},{"line_number":22,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_a7e17bfe","line":19,"updated":"2015-09-10 05:46:36.000000000","message":"this l3 agent.","commit_id":"d4db69327ba35fda194291edca26a6e3e8ed01c2"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9bbc998096a224a11697b01521cfe0cde225bb53","unresolved":false,"context_lines":[{"line_number":16,"context_line":"1. if a l3 agent in one compute node has not bind to a DVR"},{"line_number":17,"context_line":"   router, when we create a VM in this compute node, we just"},{"line_number":18,"context_line":"   schedule the router for this l3 agent, and just send"},{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":20,"context_line":"2. if a l3 agent in one compute node has bind to a DVR router,"},{"line_number":21,"context_line":"   when we create a VM in this compute node, we just need to send"},{"line_number":22,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_6217d145","line":19,"in_reply_to":"da20952f_a7e17bfe","updated":"2015-09-10 06:20:39.000000000","message":"thx for your review :)","commit_id":"d4db69327ba35fda194291edca26a6e3e8ed01c2"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"4880b8c4eecd819bc56276f156d687e9b6389ae6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":20,"context_line":"2. if a l3 agent in one compute node has bind to a DVR router,"},{"line_number":21,"context_line":"   when we create a VM in this compute node, we just need to send"},{"line_number":22,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Idc7f3b9537d12a232c02d48a18f010506bb0b52e"},{"line_number":25,"context_line":"Closes-bug: #1486795"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_07b947ec","line":22,"updated":"2015-09-10 05:46:36.000000000","message":"this l3 agent.","commit_id":"d4db69327ba35fda194291edca26a6e3e8ed01c2"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"9bbc998096a224a11697b01521cfe0cde225bb53","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":20,"context_line":"2. if a l3 agent in one compute node has bind to a DVR router,"},{"line_number":21,"context_line":"   when we create a VM in this compute node, we just need to send"},{"line_number":22,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agents."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Idc7f3b9537d12a232c02d48a18f010506bb0b52e"},{"line_number":25,"context_line":"Closes-bug: #1486795"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da20952f_0225b5ac","line":22,"in_reply_to":"da20952f_07b947ec","updated":"2015-09-10 06:20:39.000000000","message":"Done","commit_id":"d4db69327ba35fda194291edca26a6e3e8ed01c2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ba21e8d9c7d58eb9c961b1e4bc430e52b311b111","unresolved":false,"context_lines":[{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has not bind to a DVR"},{"line_number":17,"context_line":"   router, when we create a VM in this compute node, we just"},{"line_number":18,"context_line":"   schedule the router for this l3 agent, and just send"},{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_40406e07","line":16,"updated":"2015-09-10 17:38:05.000000000","message":"could you please change the wording here.\ninstead of \"not bind\" it makes sense to say \"unbinded\" from the existing DVR router\", when we delete a VM.\n\nI am not sure what you mean by \"not bind to a DVR router\u0027 when a VM is created. And then why should you inform that agent.","commit_id":"a331214aec2e6aaf699a96a285079fcdab6e0980"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b9e07d67e21167c4fe85c65deb84a59a8cbdba35","unresolved":false,"context_lines":[{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has not bind to a DVR"},{"line_number":17,"context_line":"   router, when we create a VM in this compute node, we just"},{"line_number":18,"context_line":"   schedule the router for this l3 agent, and just send"},{"line_number":19,"context_line":"   \u0027routers_updated\u0027 RPC message to this l3 agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_95a0f7f5","line":16,"in_reply_to":"da20952f_40406e07","updated":"2015-09-11 02:41:07.000000000","message":"sorry for my poor English, my mean is before creating this VM, no other VMs on this compute node, the l3 agent running on this compute node has not bind to this router","commit_id":"a331214aec2e6aaf699a96a285079fcdab6e0980"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"which has added to a DVR router, neutron-server will"},{"line_number":11,"context_line":"firstly schedule this router to all related l3 agents,"},{"line_number":12,"context_line":"then send \u0027routers_updated\u0027 RPC message to these l3"},{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has unbinded to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ba15a1d1_5a62cdae","line":13,"updated":"2015-09-15 08:25:26.000000000","message":"consider replacing the comma after agents with a period","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":10,"context_line":"which has added to a DVR router, neutron-server will"},{"line_number":11,"context_line":"firstly schedule this router to all related l3 agents,"},{"line_number":12,"context_line":"then send \u0027routers_updated\u0027 RPC message to these l3"},{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has unbinded to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ba15a1d1_5567fe24","line":13,"in_reply_to":"ba15a1d1_5a62cdae","updated":"2015-09-15 08:56:07.000000000","message":"agree","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has unbinded to"},{"line_number":17,"context_line":"   the existing DVR router, when we create first VM in this"},{"line_number":18,"context_line":"   compute node, we just need to schedule the router for this"},{"line_number":19,"context_line":"   l3 agent, and send \u0027routers_updated\u0027 RPC message to this l3 agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ba15a1d1_1a5c55ec","line":16,"updated":"2015-09-15 08:25:26.000000000","message":"nit: unbound","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":13,"context_line":"agents, in large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."},{"line_number":15,"context_line":"This patch makes two changes in DVR:"},{"line_number":16,"context_line":"1. if a l3 agent in one compute node has unbinded to"},{"line_number":17,"context_line":"   the existing DVR router, when we create first VM in this"},{"line_number":18,"context_line":"   compute node, we just need to schedule the router for this"},{"line_number":19,"context_line":"   l3 agent, and send \u0027routers_updated\u0027 RPC message to this l3 agent."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"ba15a1d1_d5ac6e37","line":16,"in_reply_to":"ba15a1d1_1a5c55ec","updated":"2015-09-15 08:56:07.000000000","message":"Done","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Now in DVR scenario, if we create a VM in one subnet"},{"line_number":10,"context_line":"which has added to a DVR router, neutron-server will"},{"line_number":11,"context_line":"firstly schedule this router to all related l3 agents,"},{"line_number":12,"context_line":"then send \u0027routers_updated\u0027 RPC message to these l3"},{"line_number":13,"context_line":"agents. In large scale, there is a serious performance"},{"line_number":14,"context_line":"problem."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"9a1a9d01_bc76aed6","line":11,"updated":"2015-10-01 23:46:24.000000000","message":"What does all related mean here?  \"Schedule this router to all related ...\" seems not quite right.  It sounds like the scheduler schedules to a bunch of agents.  Rather, it schedules to one using all of them as candidates, I think.  Maybe a rewording of this would be good if you spin the patch again.","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14c576327e6770d76ced77ae299c2eb57915b42","unresolved":false,"context_lines":[{"line_number":19,"context_line":"   l3 agent, and send \u0027routers_updated\u0027 RPC message to this l3 agent."},{"line_number":20,"context_line":"2. if a l3 agent in one compute node has bind to a existing DVR router,"},{"line_number":21,"context_line":"   when we create a VM in this compute node, we will not send"},{"line_number":22,"context_line":"   \u0027routers_updated\u0027 RPC message to any l3 agent, just send add_arp_entry"},{"line_number":23,"context_line":"   message."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Change-Id: Idc7f3b9537d12a232c02d48a18f010506bb0b52e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7a2fa921_bd63f119","line":22,"updated":"2015-10-06 15:51:48.000000000","message":"not sure I see where \u0027send add_arp_entry message\u0027 is in this patch","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"}],"neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ba21e8d9c7d58eb9c961b1e4bc430e52b311b111","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                            context or context.elevated())"},{"line_number":118,"context_line":"            if schedule_routers:"},{"line_number":119,"context_line":"                l3_agent \u003d (data.get(\u0027dvr_need_binding_agent\u0027, None)"},{"line_number":120,"context_line":"                            if data else None)"},{"line_number":121,"context_line":"                if l3_agent:"},{"line_number":122,"context_line":"                    if not plugin.check_l3_agent_router_binding("},{"line_number":123,"context_line":"                            context, router_ids, l3_agent[\u0027id\u0027]):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_c019de23","line":120,"updated":"2015-09-10 17:38:05.000000000","message":"I am a little bit confused here.\nOnly in the schedule_routers the routers are scheduled and so the binding or undbinding happens based on the scenario.\nBut you are checking for existing binding before you \u0027schedule_router\" in this case.\nIs this valid?","commit_id":"a331214aec2e6aaf699a96a285079fcdab6e0980"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"b9e07d67e21167c4fe85c65deb84a59a8cbdba35","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                            context or context.elevated())"},{"line_number":118,"context_line":"            if schedule_routers:"},{"line_number":119,"context_line":"                l3_agent \u003d (data.get(\u0027dvr_need_binding_agent\u0027, None)"},{"line_number":120,"context_line":"                            if data else None)"},{"line_number":121,"context_line":"                if l3_agent:"},{"line_number":122,"context_line":"                    if not plugin.check_l3_agent_router_binding("},{"line_number":123,"context_line":"                            context, router_ids, l3_agent[\u0027id\u0027]):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_35532b18","line":120,"in_reply_to":"da20952f_c019de23","updated":"2015-09-11 02:41:07.000000000","message":"hi Swaminathan Vasudevan, thx very much for your review, your understanding is right, \"in the schedule_routers the routers are scheduled and so the binding or undbinding happens based on the scenario\", there is a big performance issue in DVR, because if a router has bind to many compute nodes which run l3 agent with dvr mode, every time we create a VM, neutron-server will do schedule_routers, in method schedule_routers, neutron server need to get new l3 agents by checking all active l3 agents and the l3 agents which have bind the this router, then neutron-server bind the new l3 agents and send RPC message to all bound l3 agents. When we create a port, we just need to check whether the l3 agent which the port host_id  belong to has bind to this router, if this l3 agent has not bind, we should pass the candidate parameter to method schedule_router, then the schedule_router will not do complicated check","commit_id":"a331214aec2e6aaf699a96a285079fcdab6e0980"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"b39c525c338f61b69d52b36760234b09d1513c14","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _notification(self, context, method, router_ids, operation,"},{"line_number":106,"context_line":"                      shuffle_agents, schedule_routers\u003dTrue, data\u003dNone):"},{"line_number":107,"context_line":"        \"\"\"Notify all the agents that are hosting the routers.\"\"\""},{"line_number":108,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":109,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":110,"context_line":"        if not plugin:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_165c5724","line":107,"updated":"2015-09-14 12:48:41.000000000","message":"if you are going to change what this method does, you really should change the docstring to reflect that fact","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"d46aacbf99ce301919926eb08e70a1ecbf4bfff1","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _notification(self, context, method, router_ids, operation,"},{"line_number":106,"context_line":"                      shuffle_agents, schedule_routers\u003dTrue, data\u003dNone):"},{"line_number":107,"context_line":"        \"\"\"Notify all the agents that are hosting the routers.\"\"\""},{"line_number":108,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins().get("},{"line_number":109,"context_line":"            service_constants.L3_ROUTER_NAT)"},{"line_number":110,"context_line":"        if not plugin:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_7d048f7d","line":107,"in_reply_to":"ba15a1d1_165c5724","updated":"2015-09-15 06:54:09.000000000","message":"agree","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"b39c525c338f61b69d52b36760234b09d1513c14","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":128,"context_line":"                                                  [l3_agent])"},{"line_number":129,"context_line":"                    return"},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"},{"line_number":132,"context_line":"            self._agent_notification("},{"line_number":133,"context_line":"                context, method, router_ids, operation, shuffle_agents)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_3605dbc1","line":130,"updated":"2015-09-14 12:48:41.000000000","message":"I think I would prefer this logic to be part of the schedule_routers method - that way it\u0027s all in one place...","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"d46aacbf99ce301919926eb08e70a1ecbf4bfff1","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":128,"context_line":"                                                  [l3_agent])"},{"line_number":129,"context_line":"                    return"},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"},{"line_number":132,"context_line":"            self._agent_notification("},{"line_number":133,"context_line":"                context, method, router_ids, operation, shuffle_agents)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_dd1d9bbe","line":130,"in_reply_to":"ba15a1d1_3605dbc1","updated":"2015-09-15 06:54:09.000000000","message":"method schedule_routers return None, so I think this logic can\u0027t be part of  schedule_routers","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"f5b8b06c7355681da3d600d5d8a581b04ad416f5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":128,"context_line":"                                                  [l3_agent])"},{"line_number":129,"context_line":"                    return"},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"},{"line_number":132,"context_line":"            self._agent_notification("},{"line_number":133,"context_line":"                context, method, router_ids, operation, shuffle_agents)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_958cb680","line":130,"in_reply_to":"ba15a1d1_af264dcc","updated":"2015-09-15 08:54:19.000000000","message":"Putting check_l3_agent_router_binding into schedule_routers seems make more sense, but I\u0027m not sure how worth it is to do.","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"36162eb75037390e430fcf5e43eb9f8c92d7e37b","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":128,"context_line":"                                                  [l3_agent])"},{"line_number":129,"context_line":"                    return"},{"line_number":130,"context_line":"                else:"},{"line_number":131,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"},{"line_number":132,"context_line":"            self._agent_notification("},{"line_number":133,"context_line":"                context, method, router_ids, operation, shuffle_agents)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba15a1d1_af264dcc","line":130,"in_reply_to":"ba15a1d1_dd1d9bbe","updated":"2015-09-15 08:19:14.000000000","message":"@Ryan Moats\nDoes the logic you mentioned contains all code in this method? If it is, I don\u0027t think it\u0027s a good idea, the notification part should stay at here.","commit_id":"effeb2703d7c9edbc35aaffab0e326358d14d6f5"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                            context or context.elevated())"},{"line_number":121,"context_line":"            if schedule_routers:"},{"line_number":122,"context_line":"                l3_agent \u003d (data.get(\u0027dvr_need_binding_agent\u0027, None)"},{"line_number":123,"context_line":"                            if data else None)"},{"line_number":124,"context_line":"                if l3_agent:"},{"line_number":125,"context_line":"                    if not plugin.check_l3_agent_router_binding("},{"line_number":126,"context_line":"                            context, router_ids, l3_agent[\u0027id\u0027]):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_faa5e103","line":123,"updated":"2015-09-15 08:25:26.000000000","message":"if data is None then the above can be simplified as:\n\ndata and data.get(\u0027dvr_need_binding_agent\u0027)\n\nIf data can also be {} then you can write:\n\ndata and data.get(\u0027dvr_need_binding_agent\u0027) or None","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"e913fd2489b34f27c369fddb48c3bf61e4709952","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                            context or context.elevated())"},{"line_number":121,"context_line":"            if schedule_routers:"},{"line_number":122,"context_line":"                l3_agent \u003d (data.get(\u0027dvr_need_binding_agent\u0027, None)"},{"line_number":123,"context_line":"                            if data else None)"},{"line_number":124,"context_line":"                if l3_agent:"},{"line_number":125,"context_line":"                    if not plugin.check_l3_agent_router_binding("},{"line_number":126,"context_line":"                            context, router_ids, l3_agent[\u0027id\u0027]):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_b5a45aa6","line":123,"in_reply_to":"ba15a1d1_faa5e103","updated":"2015-09-15 08:54:40.000000000","message":"Yes, \"l3_agent \u003d data and data.get(\u0027dvr_need_binding_agent\u0027)\" will be simpler, \"or None\" is unnecessary.","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                            context or context.elevated())"},{"line_number":121,"context_line":"            if schedule_routers:"},{"line_number":122,"context_line":"                l3_agent \u003d (data.get(\u0027dvr_need_binding_agent\u0027, None)"},{"line_number":123,"context_line":"                            if data else None)"},{"line_number":124,"context_line":"                if l3_agent:"},{"line_number":125,"context_line":"                    if not plugin.check_l3_agent_router_binding("},{"line_number":126,"context_line":"                            context, router_ids, l3_agent[\u0027id\u0027]):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_b5977a8f","line":123,"in_reply_to":"ba15a1d1_faa5e103","updated":"2015-09-15 08:56:07.000000000","message":"data can be None, so \u0027data and data.get(\u0027dvr_need_binding_agent\u0027)\u0027 is good, thx very much","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                                [l3_agent])"},{"line_number":129,"context_line":"                    for router_id in router_ids:"},{"line_number":130,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":131,"context_line":"                                                  [l3_agent])"},{"line_number":132,"context_line":"                    return"},{"line_number":133,"context_line":"                else:"},{"line_number":134,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_fa41610c","line":131,"updated":"2015-09-15 08:25:26.000000000","message":"Related to the comment in the scheduler module: you are assuming that all routers are to be scheduled on the same agent.\n\nThis might not be true, but changing the logic here is not worth, mostly because I don\u0027t think this code path could possibly be hit when a routers_update is sent for multiple routers.\n\nA #NOTE will be however welcome","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                                [l3_agent])"},{"line_number":129,"context_line":"                    for router_id in router_ids:"},{"line_number":130,"context_line":"                        self._notification_agents(context, method, router_id,"},{"line_number":131,"context_line":"                                                  [l3_agent])"},{"line_number":132,"context_line":"                    return"},{"line_number":133,"context_line":"                else:"},{"line_number":134,"context_line":"                    plugin.schedule_routers(adminContext, router_ids)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_b5553a51","line":131,"in_reply_to":"ba15a1d1_fa41610c","updated":"2015-09-15 08:56:07.000000000","message":"you are right, as your comment on l3_dvrscheduler_db.py #116, the data should be {\u0027router_id\u0027: {\u0027subnet_id\u0027: \u0027xxxx\u0027, \u0027l3_agent\u0027: \u0027yyyy\u0027}}","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost)"},{"line_number":47,"context_line":"        cctxt.cast(context, method, payload\u003dpayload)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _notification_agents(self, context, method, router_id, l3_agents):"},{"line_number":50,"context_line":"        for l3_agent in l3_agents:"},{"line_number":51,"context_line":"            LOG.debug(\u0027Notify agent at %(topic)s.%(host)s the message \u0027"},{"line_number":52,"context_line":"                      \u0027%(method)s\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_4008a6d9","line":49,"updated":"2015-09-21 21:01:24.000000000","message":"This would make a little more sense if it were called _notify_agents","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        cctxt \u003d self.client.prepare(server\u003dhost)"},{"line_number":47,"context_line":"        cctxt.cast(context, method, payload\u003dpayload)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _notification_agents(self, context, method, router_id, l3_agents):"},{"line_number":50,"context_line":"        for l3_agent in l3_agents:"},{"line_number":51,"context_line":"            LOG.debug(\u0027Notify agent at %(topic)s.%(host)s the message \u0027"},{"line_number":52,"context_line":"                      \u0027%(method)s\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_0be15bd0","line":49,"in_reply_to":"ba15a1d1_4008a6d9","updated":"2015-09-28 02:03:35.000000000","message":"Done","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                active\u003dTrue)"},{"line_number":73,"context_line":"            if shuffle_agents:"},{"line_number":74,"context_line":"                random.shuffle(l3_agents)"},{"line_number":75,"context_line":"            self._notification_agents(context, method, router_id, l3_agents)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _agent_notification_arp(self, context, method, router_id,"},{"line_number":78,"context_line":"                                operation, data):"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_007f0e67","line":75,"updated":"2015-09-21 21:01:24.000000000","message":"A method named _agent_notification calling a method named _notification_agents is confusing to me.  Maybe call this _notify_agents?","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                active\u003dTrue)"},{"line_number":73,"context_line":"            if shuffle_agents:"},{"line_number":74,"context_line":"                random.shuffle(l3_agents)"},{"line_number":75,"context_line":"            self._notification_agents(context, method, router_id, l3_agents)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _agent_notification_arp(self, context, method, router_id,"},{"line_number":78,"context_line":"                                operation, data):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_ebdd0715","line":75,"in_reply_to":"ba15a1d1_007f0e67","updated":"2015-09-28 02:03:35.000000000","message":"agree","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d14c576327e6770d76ced77ae299c2eb57915b42","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            cctxt.cast(context, method, payload\u003ddvr_arptable)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _notification(self, context, method, router_ids, operation,"},{"line_number":106,"context_line":"                      shuffle_agents, schedule_routers\u003dTrue, data\u003dNone):"},{"line_number":107,"context_line":"        \"\"\"Notify the agents that are hosting the routers."},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        For DVR router, it will only notify the l3 agents which include"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a2fa921_cb04eb7f","line":106,"updated":"2015-10-06 15:51:48.000000000","message":"not really happy with more logic introduced here with \u0027data\u0027 parameter, it becomes really hard to read and understand the method","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                        direct_notify[router_id] \u003d [l3_agent]"},{"line_number":131,"context_line":"                    else:"},{"line_number":132,"context_line":"                        plugin.schedule_routers(adminContext, [router_id])"},{"line_number":133,"context_line":"            if direct_notify:"},{"line_number":134,"context_line":"                for router_id, l3_agents in direct_notify.items():"},{"line_number":135,"context_line":"                    self._notify_agents(context, method, router_id, l3_agents)"},{"line_number":136,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_971625f0","line":133,"updated":"2015-10-01 23:46:24.000000000","message":"This method doesn\u0027t seem to work for a mix of direct_notify and non-direct_notify routers.  Not that it\u0027ll happen but it is up to the caller to know not to mix them.  I think this makes the method a little bit hard to understand.\n\nI think we should split the method in to two:  the original method and a new method geared specifically for direct notify.  This could be done by adding a new method to the dvr class for dvr to call instead of calling routers_updated.","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":135,"context_line":"                    self._notify_agents(context, method, router_id, l3_agents)"},{"line_number":136,"context_line":"            else:"},{"line_number":137,"context_line":"                self._agent_notification("},{"line_number":138,"context_line":"                    context, method, router_ids, operation, shuffle_agents)"},{"line_number":139,"context_line":"        else:"},{"line_number":140,"context_line":"            cctxt \u003d self.client.prepare(fanout\u003dTrue)"},{"line_number":141,"context_line":"            cctxt.cast(context, method, routers\u003drouter_ids)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_c1afff29","line":138,"updated":"2015-10-01 23:46:24.000000000","message":"I\u0027m noticing here that \"operation\" is passed to this method but not to _notify_agents.  Is it not important in a direct notify?","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"7e12129c7940264a3ddea91cb38bc4b3f739dc15","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            for binding in bindings:"},{"line_number":190,"context_line":"                if binding.l3_agent_id \u003d\u003d agent_id:"},{"line_number":191,"context_line":"                    return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def check_agent_router_scheduling_needed(self, context, agent, router):"},{"line_number":195,"context_line":"        \"\"\"Check if the router scheduling is needed."}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_41b29d97","line":192,"updated":"2015-09-11 07:33:11.000000000","message":"I checked this method again, and I find it\u0027s so similar to the next one, check_agent_router_scheduling_needed. So any special reason do we must create a new method here, but not modify previous one?\n\nThis patch is dealing with DVR router, so maybe it\u0027s possible to add router.get(\u0027distributed\u0027) checking to return True before raise legacy router exception.","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"79faa62f9f630640619e081719dc9c054c8056d0","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            for binding in bindings:"},{"line_number":190,"context_line":"                if binding.l3_agent_id \u003d\u003d agent_id:"},{"line_number":191,"context_line":"                    return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def check_agent_router_scheduling_needed(self, context, agent, router):"},{"line_number":195,"context_line":"        \"\"\"Check if the router scheduling is needed."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_b30ca843","line":192,"in_reply_to":"ba15a1d1_b089fecc","updated":"2015-09-14 07:29:27.000000000","message":"Yes, you\u0027re right. Sorry for not noticed that before.","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"5f7d36c9e1ab44376e0ec2a20d0d3ea1aa24d028","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            for binding in bindings:"},{"line_number":190,"context_line":"                if binding.l3_agent_id \u003d\u003d agent_id:"},{"line_number":191,"context_line":"                    return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def check_agent_router_scheduling_needed(self, context, agent, router):"},{"line_number":195,"context_line":"        \"\"\"Check if the router scheduling is needed."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_b089fecc","line":192,"in_reply_to":"da20952f_41b29d97","updated":"2015-09-14 06:35:20.000000000","message":"I check the codes, check_agent_router_scheduling_needed has be overwrite by subclass L3_DVRsch_db_mixin, in subclass, it a router is DVR, \u0027check_agent_router_scheduling_needed \u0027 will return false, so I think we can\u0027t use this method, you can help to recheck the codes","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f9487a289276b2393489bc5e5e57c478af78dbf4","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            for binding in bindings:"},{"line_number":190,"context_line":"                if binding.l3_agent_id \u003d\u003d agent_id:"},{"line_number":191,"context_line":"                    return True"},{"line_number":192,"context_line":"        return False"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def check_agent_router_scheduling_needed(self, context, agent, router):"},{"line_number":195,"context_line":"        \"\"\"Check if the router scheduling is needed."}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_3d0a2927","line":192,"in_reply_to":"da20952f_41b29d97","updated":"2015-09-11 09:27:56.000000000","message":"agree, thx for your seggestion","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    def check_l3_agent_router_binding(self, context, router_ids, agent_id):"},{"line_number":185,"context_line":"        for router_id in router_ids:"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":187,"context_line":"            bindings \u003d query.filter_by(router_id\u003drouter_id).all()"},{"line_number":188,"context_line":"            if not bindings:"},{"line_number":189,"context_line":"                return False"},{"line_number":190,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_af272d11","line":187,"updated":"2015-09-15 08:25:26.000000000","message":"You don\u0027t need to call .all()","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"e913fd2489b34f27c369fddb48c3bf61e4709952","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    def check_l3_agent_router_binding(self, context, router_ids, agent_id):"},{"line_number":185,"context_line":"        for router_id in router_ids:"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":187,"context_line":"            bindings \u003d query.filter_by(router_id\u003drouter_id).all()"},{"line_number":188,"context_line":"            if not bindings:"},{"line_number":189,"context_line":"                return False"},{"line_number":190,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_f55ad282","line":187,"in_reply_to":"ba15a1d1_af272d11","updated":"2015-09-15 08:54:40.000000000","message":"+1","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    def check_l3_agent_router_binding(self, context, router_ids, agent_id):"},{"line_number":185,"context_line":"        for router_id in router_ids:"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":187,"context_line":"            bindings \u003d query.filter_by(router_id\u003drouter_id).all()"},{"line_number":188,"context_line":"            if not bindings:"},{"line_number":189,"context_line":"                return False"},{"line_number":190,"context_line":"            for binding in bindings:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_35bdaa68","line":187,"in_reply_to":"ba15a1d1_af272d11","updated":"2015-09-15 08:56:07.000000000","message":"I am not familiar with db operation, we will use the bindings in line #190, do you mean I don\u0027t need to call .all()? thx","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        if not is_suitable_agent:"},{"line_number":182,"context_line":"            raise l3agentscheduler.InvalidL3Agent(id\u003dagent[\u0027id\u0027])"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def check_l3_agent_router_binding(self, context, router_ids, agent_id):"},{"line_number":185,"context_line":"        for router_id in router_ids:"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":187,"context_line":"            bindings \u003d query.filter_by(router_id\u003drouter_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_4366702a","line":184,"updated":"2015-09-21 21:01:24.000000000","message":"Why does it take a list of router ids?  The semantics of this method seem funny to me.  The semantics seem to be this:\n\n  For each router:\n      If this one doesn\u0027t have any agent bindings\n          return False (don\u0027t check any of the remaining routers)\n      If this one has bindings and any of them matches the given agent:\n          return True (don\u0027t check any of the remaining routers)\n\n  Return False if we didn\u0027t return otherwise.\n\nWouldn\u0027t it be better written something like this (I didn\u0027t test this code, just putting up for illustration):\n\n    def check_l3_agent_router_binding(self, context, router_id, agent_id):\n        query \u003d context.session.query(RouterL3AgentBinding)\n        bindings \u003d query.filter_by(router_id\u003drouter_id, l3_agent_id\u003dagent_id)\n        return bool(bindings)","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        if not is_suitable_agent:"},{"line_number":182,"context_line":"            raise l3agentscheduler.InvalidL3Agent(id\u003dagent[\u0027id\u0027])"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def check_l3_agent_router_binding(self, context, router_ids, agent_id):"},{"line_number":185,"context_line":"        for router_id in router_ids:"},{"line_number":186,"context_line":"            query \u003d context.session.query(RouterL3AgentBinding)"},{"line_number":187,"context_line":"            bindings \u003d query.filter_by(router_id\u003drouter_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_2bae9f85","line":184,"in_reply_to":"ba15a1d1_4366702a","updated":"2015-09-28 02:03:35.000000000","message":"good suggestion","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":14562,"name":"Zhi Chang","email":"changzhi2@lenovo.com","username":"changzhi"},"change_message_id":"a9cc160cbcdf64952e2ddf127d5feda4a4f08c2d","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                        l3_agents \u003d self.get_l3_agents(context,"},{"line_number":121,"context_line":"                                                       filters\u003dagent_filters)"},{"line_number":122,"context_line":"                        if l3_agents:"},{"line_number":123,"context_line":"                            payload[\u0027dvr_need_binding_agent\u0027] \u003d l3_agents[0]"},{"line_number":124,"context_line":"                    self.l3_rpc_notifier.routers_updated("},{"line_number":125,"context_line":"                        context, [router_id], None, payload)"},{"line_number":126,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":2,"id":"da20952f_ec8566cf","line":123,"updated":"2015-09-08 14:30:28.000000000","message":"why l3_agents[0]? rather than l3_agents?","commit_id":"605822110317d2d79f7068682a8bed4417b46bc6"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"7e12129c7940264a3ddea91cb38bc4b3f739dc15","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":117,"context_line":"                    if fixed_port_host_id:"},{"line_number":118,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents(context,"},{"line_number":120,"context_line":"                                                       filters\u003dagent_filters)"},{"line_number":121,"context_line":"                        if l3_agents:"},{"line_number":122,"context_line":"                            payload[\u0027dvr_need_binding_agent\u0027] \u003d l3_agents[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_3cb0f0fc","line":119,"updated":"2015-09-11 07:33:11.000000000","message":"I think we can use get_l3_agents(context, active\u003dTrue, filters\u003dagent_filters) here, if l3_agent on the port binding host is inactive, the specification may make less sense.","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f9487a289276b2393489bc5e5e57c478af78dbf4","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                    payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":117,"context_line":"                    if fixed_port_host_id:"},{"line_number":118,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents(context,"},{"line_number":120,"context_line":"                                                       filters\u003dagent_filters)"},{"line_number":121,"context_line":"                        if l3_agents:"},{"line_number":122,"context_line":"                            payload[\u0027dvr_need_binding_agent\u0027] \u003d l3_agents[0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_1d03a543","line":119,"in_reply_to":"da20952f_3cb0f0fc","updated":"2015-09-11 09:27:56.000000000","message":"agree","commit_id":"a9b90a83ef2bb1b0505c119fa7bb7e0179b6b4d8"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":114,"context_line":"                router_dict \u003d self.get_router(context, router_id)"},{"line_number":115,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"},{"line_number":116,"context_line":"                    payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":117,"context_line":"                    if fixed_port_host_id:"},{"line_number":118,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_2f19dd88","line":116,"updated":"2015-09-15 08:25:26.000000000","message":"in theory you could send notifications for multiple routers, at least routers_updated allows you to do so.\n\nI think payload should also have a router_id key.\n\n\u0027router_id\u0027: {\u0027subnet_id\u0027: \u0027xxxx\u0027, \u0027l3_agent\u0027: \u0027yyyy\u0027}\n\nHowever you are building up on something which was already done before your patch. It\u0027s maybe better to not address it here as there might be unexpected side effects.","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":114,"context_line":"                router_dict \u003d self.get_router(context, router_id)"},{"line_number":115,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"},{"line_number":116,"context_line":"                    payload \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":117,"context_line":"                    if fixed_port_host_id:"},{"line_number":118,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_3aefd988","line":116,"in_reply_to":"ba15a1d1_2f19dd88","updated":"2015-09-15 08:56:07.000000000","message":"your suggestion is very good, if a subnet has added to two routers, it is better to use :\u0027router_id\u0027: {\u0027subnet_id\u0027: \u0027xxxx\u0027, \u0027l3_agent\u0027: \u0027yyyy\u0027}","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"21531444be9d488f6c7ecd081eae99430e62bae9","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents("},{"line_number":120,"context_line":"                            context, active\u003dTrue, filters\u003dagent_filters)"},{"line_number":121,"context_line":"                        if l3_agents:"},{"line_number":122,"context_line":"                            payload[\u0027dvr_need_binding_agent\u0027] \u003d l3_agents[0]"},{"line_number":123,"context_line":"                    self.l3_rpc_notifier.routers_updated("},{"line_number":124,"context_line":"                        context, [router_id], None, payload)"},{"line_number":125,"context_line":"                    LOG.debug(\u0027DVR: dvr_update_router_addvm %s \u0027, router_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_0f165955","line":122,"updated":"2015-09-15 08:25:26.000000000","message":"this attribute name is unfortunate. I think router_port_l3_agent might be better.","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"f12c53411ec610668ac4a35312528ee28d51d354","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                        l3_agents \u003d self.get_l3_agents("},{"line_number":120,"context_line":"                            context, active\u003dTrue, filters\u003dagent_filters)"},{"line_number":121,"context_line":"                        if l3_agents:"},{"line_number":122,"context_line":"                            payload[\u0027dvr_need_binding_agent\u0027] \u003d l3_agents[0]"},{"line_number":123,"context_line":"                    self.l3_rpc_notifier.routers_updated("},{"line_number":124,"context_line":"                        context, [router_id], None, payload)"},{"line_number":125,"context_line":"                    LOG.debug(\u0027DVR: dvr_update_router_addvm %s \u0027, router_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_fa35e145","line":122,"in_reply_to":"ba15a1d1_0f165955","updated":"2015-09-15 08:56:07.000000000","message":"agree","commit_id":"34eb443f9f9a68f64d0821582930ce190ddb7451"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def dvr_update_router_addvm(self, context, port):"},{"line_number":103,"context_line":"        ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":104,"context_line":"        fixed_port \u003d self._core_plugin.get_port(context, port[\u0027id\u0027])"},{"line_number":105,"context_line":"        fixed_port_host_id \u003d fixed_port.get(\u0027binding:host_id\u0027, None)"},{"line_number":106,"context_line":"        for ip in ips:"},{"line_number":107,"context_line":"            subnet \u003d ip[\u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_60e5aaa6","line":104,"updated":"2015-09-21 21:01:24.000000000","message":"Do we really need to go back to the plugin to get the port?  Don\u0027t we already have it?  Does it not have the host binding for some reason in this context?","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def dvr_update_router_addvm(self, context, port):"},{"line_number":103,"context_line":"        ips \u003d port[\u0027fixed_ips\u0027]"},{"line_number":104,"context_line":"        fixed_port \u003d self._core_plugin.get_port(context, port[\u0027id\u0027])"},{"line_number":105,"context_line":"        fixed_port_host_id \u003d fixed_port.get(\u0027binding:host_id\u0027, None)"},{"line_number":106,"context_line":"        for ip in ips:"},{"line_number":107,"context_line":"            subnet \u003d ip[\u0027subnet_id\u0027]"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_5b63ac1a","line":104,"in_reply_to":"ba15a1d1_60e5aaa6","updated":"2015-09-28 02:03:35.000000000","message":"now \u0027port\u0027 just include core attribute, not include binding info, what do you mean \"this context\"?","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                          \u0027device_owner\u0027:"},{"line_number":110,"context_line":"                          [n_const.DEVICE_OWNER_DVR_INTERFACE]}"},{"line_number":111,"context_line":"            ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":112,"context_line":"            payload \u003d {}"},{"line_number":113,"context_line":"            for port in ports:"},{"line_number":114,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":115,"context_line":"                router_dict \u003d self.get_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_c36da09a","line":112,"updated":"2015-09-21 21:01:24.000000000","message":"It seems this patch completely repurposes the \"payload\" local variable.  Why not call it payload_map, router_payloads, or something instead to indicate what it is used for?","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                          \u0027device_owner\u0027:"},{"line_number":110,"context_line":"                          [n_const.DEVICE_OWNER_DVR_INTERFACE]}"},{"line_number":111,"context_line":"            ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":112,"context_line":"            payload \u003d {}"},{"line_number":113,"context_line":"            for port in ports:"},{"line_number":114,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":115,"context_line":"                router_dict \u003d self.get_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_fb72c0e2","line":112,"in_reply_to":"ba15a1d1_c36da09a","updated":"2015-09-28 02:03:35.000000000","message":"agree, router_payloads is better","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                router_dict \u003d self.get_router(context, router_id)"},{"line_number":116,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"},{"line_number":117,"context_line":"                    if router_id not in payload:"},{"line_number":118,"context_line":"                        payload[router_id] \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":119,"context_line":"                    if fixed_port_host_id:"},{"line_number":120,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":121,"context_line":"                        l3_agents \u003d self.get_l3_agents("}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_0015ce47","line":118,"updated":"2015-09-21 21:01:24.000000000","message":"This seems to only allow one subnet per router.  Is that sufficient for this case?","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                router_dict \u003d self.get_router(context, router_id)"},{"line_number":116,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"},{"line_number":117,"context_line":"                    if router_id not in payload:"},{"line_number":118,"context_line":"                        payload[router_id] \u003d {\u0027subnet_id\u0027: subnet}"},{"line_number":119,"context_line":"                    if fixed_port_host_id:"},{"line_number":120,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":121,"context_line":"                        l3_agents \u003d self.get_l3_agents("}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_0bbabbc0","line":118,"in_reply_to":"ba15a1d1_0015ce47","updated":"2015-09-28 02:03:35.000000000","message":"now the parameter payload not used in function routers_updated, but I think your suggestion is good, because a router may have more than one subnet","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    if fixed_port_host_id:"},{"line_number":120,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":121,"context_line":"                        l3_agents \u003d self.get_l3_agents("},{"line_number":122,"context_line":"                            context, active\u003dTrue, filters\u003dagent_filters)"},{"line_number":123,"context_line":"                        if (l3_agents"},{"line_number":124,"context_line":"                            and not self.check_l3_agent_router_binding("},{"line_number":125,"context_line":"                                context, [router_id], l3_agents[0][\u0027id\u0027])):"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_03eb9879","line":122,"updated":"2015-09-21 21:01:24.000000000","message":"Could you alias l3_agents[0] up front rather than use it multiple times below.  To me, it helps readability by making the leap of faith to the hard-coded index (0) once.\n\n  l3_agent \u003d l3_agents[0] if l3_agents else None\n  if l3_agent and not self.check_l3_agent_router_binding(\n       context, [router_id], l3_agent[\u0027id\u0027]\n  ...","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    if fixed_port_host_id:"},{"line_number":120,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":121,"context_line":"                        l3_agents \u003d self.get_l3_agents("},{"line_number":122,"context_line":"                            context, active\u003dTrue, filters\u003dagent_filters)"},{"line_number":123,"context_line":"                        if (l3_agents"},{"line_number":124,"context_line":"                            and not self.check_l3_agent_router_binding("},{"line_number":125,"context_line":"                                context, [router_id], l3_agents[0][\u0027id\u0027])):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_abb06fde","line":122,"in_reply_to":"ba15a1d1_03eb9879","updated":"2015-09-28 02:03:35.000000000","message":"good suggestion","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                            and not self.check_l3_agent_router_binding("},{"line_number":125,"context_line":"                                context, [router_id], l3_agents[0][\u0027id\u0027])):"},{"line_number":126,"context_line":"                            payload[router_id]["},{"line_number":127,"context_line":"                                \u0027router_port_l3_agent\u0027] \u003d l3_agents[0]"},{"line_number":128,"context_line":"            for rt_id, data in payload.items():"},{"line_number":129,"context_line":"                if data.get(\u0027router_port_l3_agent\u0027):"},{"line_number":130,"context_line":"                    self.l3_rpc_notifier.routers_updated("}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_834488b7","line":127,"updated":"2015-09-21 21:01:24.000000000","message":"This method handles the addition of a single dvr serviced port.  I think there should only ever be one l3 agent involved.  It seems we should be able to get away with a single call to routers_updated at the end of the method and (maybe) a list of router ids.","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"0cab81dbea35ae2758d22da00c1fa381eb2d23b7","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                context, [router_id], l3_agents[0][\u0027id\u0027])):"},{"line_number":126,"context_line":"                            payload[router_id]["},{"line_number":127,"context_line":"                                \u0027router_port_l3_agent\u0027] \u003d l3_agents[0]"},{"line_number":128,"context_line":"            for rt_id, data in payload.items():"},{"line_number":129,"context_line":"                if data.get(\u0027router_port_l3_agent\u0027):"},{"line_number":130,"context_line":"                    self.l3_rpc_notifier.routers_updated("},{"line_number":131,"context_line":"                        context, [rt_id], None, data)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba15a1d1_438bd01e","line":128,"updated":"2015-09-21 21:01:24.000000000","message":"I\u0027d prefer you continue to call this \"payload\" instead of \"data\".  It isn\u0027t that either variable name is better, it is just that this patch shouldn\u0027t arbitrarily rename things.\n\nAlso, rt_id is just too terse to be useful.  Any reason you don\u0027t want to use \"router_id\"?\n\n  for router_id, payload in payload_map.items():","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"6480c7f6e74e2d6767325de6232fba149f6b0c5b","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                                context, [router_id], l3_agents[0][\u0027id\u0027])):"},{"line_number":126,"context_line":"                            payload[router_id]["},{"line_number":127,"context_line":"                                \u0027router_port_l3_agent\u0027] \u003d l3_agents[0]"},{"line_number":128,"context_line":"            for rt_id, data in payload.items():"},{"line_number":129,"context_line":"                if data.get(\u0027router_port_l3_agent\u0027):"},{"line_number":130,"context_line":"                    self.l3_rpc_notifier.routers_updated("},{"line_number":131,"context_line":"                        context, [rt_id], None, data)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a1a9d01_cbb363e8","line":128,"in_reply_to":"ba15a1d1_438bd01e","updated":"2015-09-28 02:03:35.000000000","message":"agree","commit_id":"f75aa18cc2cae02ccd0e75db9658babf9e4eb6c4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                          [n_const.DEVICE_OWNER_DVR_INTERFACE]}"},{"line_number":110,"context_line":"            ports \u003d self._core_plugin.get_ports(context, filters\u003dfilter_sub)"},{"line_number":111,"context_line":"            router_payloads \u003d {}"},{"line_number":112,"context_line":"            for port in ports:"},{"line_number":113,"context_line":"                router_id \u003d port[\u0027device_id\u0027]"},{"line_number":114,"context_line":"                router_dict \u003d self.get_router(context, router_id)"},{"line_number":115,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_d7925d9f","line":112,"updated":"2015-10-01 23:46:24.000000000","message":"For each router port on the subnet....","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                if router_dict.get(\u0027distributed\u0027, False):"},{"line_number":116,"context_line":"                    if router_id not in router_payloads:"},{"line_number":117,"context_line":"                        router_payloads[router_id] \u003d {\u0027subnet_ids\u0027: set()}"},{"line_number":118,"context_line":"                    router_payloads[router_id][\u0027subnet_ids\u0027].add(subnet)"},{"line_number":119,"context_line":"                    if fixed_port_host_id:"},{"line_number":120,"context_line":"                        agent_filters \u003d {\u0027host\u0027: [fixed_port_host_id]}"},{"line_number":121,"context_line":"                        l3_agents \u003d self.get_l3_agents("}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_7c1fb6b7","line":118,"updated":"2015-10-01 23:46:24.000000000","message":"Note: Collect the subnets that this router has ports on.","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e80bcb94e845f4c2c6a2b7c35fd107f269d39895","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                        l3_agent \u003d l3_agents[0] if l3_agents else None"},{"line_number":124,"context_line":"                        if (l3_agent"},{"line_number":125,"context_line":"                            and not self.check_l3_agent_router_binding("},{"line_number":126,"context_line":"                                context, router_id, l3_agent[\u0027id\u0027])):"},{"line_number":127,"context_line":"                            router_payloads[router_id]["},{"line_number":128,"context_line":"                                \u0027router_port_l3_agent\u0027] \u003d l3_agent"},{"line_number":129,"context_line":"            for router_id, payload in router_payloads.items():"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a1a9d01_f7c8c1aa","line":126,"updated":"2015-10-01 23:46:24.000000000","message":"if the L3 agent is not bound to the compute host already put router_port_l3_agent in the payload.","commit_id":"a2821e519a1ea89d6993c74223dd7708ad4cf186"}]}
