)]}'
{"neutron/plugins/ml2/drivers/type_tunnel.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"949055bcf31a377eed59ee45792f8b17a907aa79","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                         \u0027new_host\u0027: host})"},{"line_number":371,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("},{"line_number":372,"context_line":"                        host, ip_endpoint.ip_address)"},{"line_number":373,"context_line":"                elif (ip_endpoint and ip_endpoint.host \u003d\u003d host):"},{"line_number":374,"context_line":"                    tunnel \u003d ip_endpoint"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    # Notify all other listening agents to delete stale tunnels"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_8436eb01","line":373,"updated":"2015-10-06 13:11:07.000000000","message":"instead of having 2 separate conditions here and in line 380, would it make sense to have only one? I mean if ip_endpoint.host \u003d\u003d host then it must be host_endpoint.ip_address \u003d\u003d tunnel_ip","commit_id":"8ddc7abcd97abec69bc15a15b671cfcee19ed948"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"c8992fbb9e1751c8b188d5b88fa5fd0a90c79b91","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                         \u0027new_host\u0027: host})"},{"line_number":371,"context_line":"                    driver.obj.delete_endpoint_by_host_or_ip("},{"line_number":372,"context_line":"                        host, ip_endpoint.ip_address)"},{"line_number":373,"context_line":"                elif (ip_endpoint and ip_endpoint.host \u003d\u003d host):"},{"line_number":374,"context_line":"                    tunnel \u003d ip_endpoint"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address !\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    # Notify all other listening agents to delete stale tunnels"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_6b1f010a","line":373,"in_reply_to":"7a2fa921_8436eb01","updated":"2015-10-12 07:40:48.000000000","message":"Yes, for case new added here, both ip_endpoint and host_endpoint will exist, and the two equivalent conditions will match. So it make sense to keep only one condition here. Thanks.\n\nDone.","commit_id":"8ddc7abcd97abec69bc15a15b671cfcee19ed948"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c30df18ec736b0be524462b950ad8134330fb343","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            #    the stale endpoints)."},{"line_number":352,"context_line":"            #    Finally create a new endpoint for the (tunnel_ip, host)."},{"line_number":353,"context_line":"            # 6. If both passed host and tunnel ip can be found in DB, the"},{"line_number":354,"context_line":"            #    endpoint with (tunnel_ip, host) must already exist. Restart"},{"line_number":355,"context_line":"            #    OVS and ovs-agent will cause this case."},{"line_number":356,"context_line":"            tunnel \u003d None"},{"line_number":357,"context_line":"            if host:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa80f949_6955904e","line":354,"updated":"2015-11-05 10:23:33.000000000","message":"Not sure why you changed the last line, it was more clear before","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"94d3bdbedab1fa6f81b8b3a533293d6702eb65ea","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            #    the stale endpoints)."},{"line_number":352,"context_line":"            #    Finally create a new endpoint for the (tunnel_ip, host)."},{"line_number":353,"context_line":"            # 6. If both passed host and tunnel ip can be found in DB, the"},{"line_number":354,"context_line":"            #    endpoint with (tunnel_ip, host) must already exist. Restart"},{"line_number":355,"context_line":"            #    OVS and ovs-agent will cause this case."},{"line_number":356,"context_line":"            tunnel \u003d None"},{"line_number":357,"context_line":"            if host:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_6063491b","line":354,"in_reply_to":"ba8a016a_1dd186cd","updated":"2015-11-24 03:40:30.000000000","message":"Done","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"74f7730f02c7b4a608184e477f2c9d62a7036731","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            #    the stale endpoints)."},{"line_number":352,"context_line":"            #    Finally create a new endpoint for the (tunnel_ip, host)."},{"line_number":353,"context_line":"            # 6. If both passed host and tunnel ip can be found in DB, the"},{"line_number":354,"context_line":"            #    endpoint with (tunnel_ip, host) must already exist. Restart"},{"line_number":355,"context_line":"            #    OVS and ovs-agent will cause this case."},{"line_number":356,"context_line":"            tunnel \u003d None"},{"line_number":357,"context_line":"            if host:"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_1dd186cd","line":354,"in_reply_to":"fa80f949_6955904e","updated":"2015-11-24 02:46:56.000000000","message":"Well, I just want to update comments here, since L333-352 tell what to verify, so I think maybe I also need to update for verify tunnel endpoint not changed case.\n\nOk, I will remove my changing my comments here.","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"c30df18ec736b0be524462b950ad8134330fb343","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            tunnels \u003d driver.obj.get_endpoints()"},{"line_number":384,"context_line":"            entry \u003d {\u0027tunnels\u0027: tunnels}"},{"line_number":385,"context_line":"            # Notify all other listening agents"},{"line_number":386,"context_line":"            self._notifier.tunnel_update(rpc_context, tunnel.ip_address,"},{"line_number":387,"context_line":"                                         tunnel_type)"},{"line_number":388,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":389,"context_line":"            return entry"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa80f949_44ed11ee","line":386,"updated":"2015-11-05 10:23:33.000000000","message":"we don\u0027t need to send the tunnel_update if ip_endpoint.host \u003d\u003d host, right?","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"94d3bdbedab1fa6f81b8b3a533293d6702eb65ea","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            tunnels \u003d driver.obj.get_endpoints()"},{"line_number":384,"context_line":"            entry \u003d {\u0027tunnels\u0027: tunnels}"},{"line_number":385,"context_line":"            # Notify all other listening agents"},{"line_number":386,"context_line":"            self._notifier.tunnel_update(rpc_context, tunnel.ip_address,"},{"line_number":387,"context_line":"                                         tunnel_type)"},{"line_number":388,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":389,"context_line":"            return entry"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_80666d27","line":386,"in_reply_to":"ba8a016a_3d0faa89","updated":"2015-11-24 03:40:30.000000000","message":"Done","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"74f7730f02c7b4a608184e477f2c9d62a7036731","unresolved":false,"context_lines":[{"line_number":383,"context_line":"            tunnels \u003d driver.obj.get_endpoints()"},{"line_number":384,"context_line":"            entry \u003d {\u0027tunnels\u0027: tunnels}"},{"line_number":385,"context_line":"            # Notify all other listening agents"},{"line_number":386,"context_line":"            self._notifier.tunnel_update(rpc_context, tunnel.ip_address,"},{"line_number":387,"context_line":"                                         tunnel_type)"},{"line_number":388,"context_line":"            # Return the list of tunnels IP\u0027s to the agent"},{"line_number":389,"context_line":"            return entry"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_3d0faa89","line":386,"in_reply_to":"fa80f949_44ed11ee","updated":"2015-11-24 02:46:56.000000000","message":"Yes, you\u0027re right, if tunnel endpoint doesn\u0027t change, we needn\u0027t do that.","commit_id":"cd787ac3e16a021e1337618deb4cc41de79617d6"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cf5749179b410e59f9179f2cf3c96df3d6ceba55","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":373,"context_line":"                        host_endpoint.ip_address, tunnel_type)"},{"line_number":374,"context_line":"                    driver.obj.delete_endpoint(host_endpoint.ip_address)"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address \u003d\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    tunnel \u003d host_endpoint"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            if tunnel is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_ccceee82","line":375,"updated":"2015-11-24 06:25:44.000000000","message":"what if ip_endpoint don\u0027t exist?  Can you still assume that the host_endpoint is the tunnel?\n\nI think the check here should be \n\n\nelif (host_endpoint and ip_endpoint)\n\nbecause after all the checks above, if the 2 endpoint exist, they must be the existing tunnel for tunnel_ip and host.","commit_id":"132a10000e7605e537ecb0c26e5648ef88005b51"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"2768aa0ee1512c86eb4273084f3873d972fe7fe7","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":373,"context_line":"                        host_endpoint.ip_address, tunnel_type)"},{"line_number":374,"context_line":"                    driver.obj.delete_endpoint(host_endpoint.ip_address)"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address \u003d\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    tunnel \u003d host_endpoint"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            if tunnel is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_20c26a34","line":375,"in_reply_to":"9a8ffd7b_fdbe49fe","updated":"2015-11-25 03:47:30.000000000","message":"OK, I will make things explicit. And yes, you\u0027re right, after checking all logic branch here again, I find \"host_endpoint.ip_address \u003d\u003d tunnel_ip\" is not necessary. I will remove it.","commit_id":"132a10000e7605e537ecb0c26e5648ef88005b51"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"603c1429efcff91ada62c5b2116c025688d8e95d","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":373,"context_line":"                        host_endpoint.ip_address, tunnel_type)"},{"line_number":374,"context_line":"                    driver.obj.delete_endpoint(host_endpoint.ip_address)"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address \u003d\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    tunnel \u003d host_endpoint"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            if tunnel is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a8ffd7b_fdbe49fe","line":375,"in_reply_to":"ba8a016a_8262edd6","updated":"2015-11-25 02:45:12.000000000","message":"yeah... it won\u0027t contain the case that ip_endpoint don\u0027t exist. But it is not implicit condition for \"host_endpoint.ip_address \u003d\u003d tunnel_ip\".\n\nin line 375, \"host_endpoint.ip_address \u003d\u003d tunnel_ip\" is not necessary, with line 370 and host_endpoint, host_endpoint.ip_address must be equal with tunnel_ip.\n\nAnd, quoted from [1] \"Explicit is better than implicit.\" Implication should be avoid. \n\nMy original point is that after all the if..elif.. check for the abnormal case, finally we goto the normal case. The normal case will be  host_endpoint  has the same content as ip_endpoint and they are not None. So, either \"elif host_endpoint\" or \"elif ip_endpoint\" will be fine. But when I go back here, I may be wondering,  why host_endpoint(or ip_endpoint), what is its the special characteristic comparing to the other one?\n\nSo, I would recommend to use \"elif (host_endpoint and ip_endpoint)\". But that is just me. If you don\u0027t like it, just remove the unnecessary check at line 375 would be fine. \n\n[1] https://www.python.org/dev/peps/pep-0020/","commit_id":"132a10000e7605e537ecb0c26e5648ef88005b51"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"64b8d05d71d05038b1193545e93e90cd86e6bdba","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                    self._notifier.tunnel_delete(rpc_context,"},{"line_number":373,"context_line":"                        host_endpoint.ip_address, tunnel_type)"},{"line_number":374,"context_line":"                    driver.obj.delete_endpoint(host_endpoint.ip_address)"},{"line_number":375,"context_line":"                elif (host_endpoint and host_endpoint.ip_address \u003d\u003d tunnel_ip):"},{"line_number":376,"context_line":"                    tunnel \u003d host_endpoint"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"            if tunnel is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba8a016a_8262edd6","line":375,"in_reply_to":"ba8a016a_ccceee82","updated":"2015-11-24 07:13:53.000000000","message":"Well, after checking get_endpoint_by_host and get_endpoint_by_ip again, I think L375 will not contain case that ip_endpoint don\u0027t exist, for ip_endpoint exist will be implicit condition for \"host_endpoint.ip_address \u003d\u003d tunnel_ip\".","commit_id":"132a10000e7605e537ecb0c26e5648ef88005b51"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"3a52a7eaf8ea66b5d05b7021d3cecb4f6c520276","unresolved":false,"context_lines":[{"line_number":349,"context_line":"            #    old IP since that one could have been taken by a different"},{"line_number":350,"context_line":"            #    agent host-id (neutron-ovs-cleanup should be used to clean up"},{"line_number":351,"context_line":"            #    the stale endpoints)."},{"line_number":352,"context_line":"            #    Finally create a new endpoint for the (tunnel_ip, host)."},{"line_number":353,"context_line":"            tunnel_endpoint_changed \u003d True"},{"line_number":354,"context_line":"            if host:"},{"line_number":355,"context_line":"                host_endpoint \u003d driver.obj.get_endpoint_by_host(host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_ae110006","line":352,"updated":"2015-12-02 18:16:05.000000000","message":"sorry I was not clear in my previous review, I didn\u0027t mean that you should have  removed the comment but to leave it the way it was in PS3 that was more clear for me","commit_id":"5f7eb9fddabc2a86952b45520c1a63a906639067"}],"neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"949055bcf31a377eed59ee45792f8b17a907aa79","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_ONE}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, driver_add_endpoint\u003dFalse)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_with_host_passed(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_a681a791","line":356,"updated":"2015-10-06 13:11:07.000000000","message":"add endpoint should be called in this case I think","commit_id":"8ddc7abcd97abec69bc15a15b671cfcee19ed948"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"c8992fbb9e1751c8b188d5b88fa5fd0a90c79b91","unresolved":false,"context_lines":[{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"},{"line_number":355,"context_line":"                  \u0027host\u0027: HOST_ONE}"},{"line_number":356,"context_line":"        self._test_tunnel_sync(kwargs, driver_add_endpoint\u003dFalse)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def test_tunnel_sync_called_with_host_passed(self):"},{"line_number":359,"context_line":"        kwargs \u003d {\u0027tunnel_ip\u0027: TUNNEL_IP_ONE, \u0027tunnel_type\u0027: self.TYPE,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a2fa921_1d03340f","line":356,"in_reply_to":"7a2fa921_a681a791","updated":"2015-10-12 07:40:48.000000000","message":"Yes, you\u0027re right, test driver doesn\u0027t add HOST_ONE for fake endpoint. So it doesn\u0027t match case this patch try to fix. I will fix this later.\n\nDone.","commit_id":"8ddc7abcd97abec69bc15a15b671cfcee19ed948"}]}
