)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"70d7cb872ca2b95bbc37a66f927aceed79bde05f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"And it use method get_ports_on_host_by_subnet(will be renamed to"},{"line_number":14,"context_line":"get_dvr_serviced_ports_on_host_by_subnet in depends-on patch) to get ports"},{"line_number":15,"context_line":"to do its own check. But indeed, current get_ports_on_host_by_subnet will"},{"line_number":16,"context_line":"only return dvr serviced ports on given host and subnet, so it is not"},{"line_number":17,"context_line":"duplicated and unnecessary to check whether those ports are dvr serviced"},{"line_number":18,"context_line":"or not again."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a7e1126_7854c653","line":16,"range":{"start_line":16,"start_character":66,"end_line":16,"end_character":69},"updated":"2015-12-17 04:53:35.000000000","message":"\"not\"?","commit_id":"ecc2b8e149e10555a1c7703cb27b5d5bfee68118"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"28821e2ce82a8bc771db4fda0f87ddac2bafe482","unresolved":false,"context_lines":[{"line_number":13,"context_line":"And it use method get_ports_on_host_by_subnet(will be renamed to"},{"line_number":14,"context_line":"get_dvr_serviced_ports_on_host_by_subnet in depends-on patch) to get ports"},{"line_number":15,"context_line":"to do its own check. But indeed, current get_ports_on_host_by_subnet will"},{"line_number":16,"context_line":"only return dvr serviced ports on given host and subnet, so it is not"},{"line_number":17,"context_line":"duplicated and unnecessary to check whether those ports are dvr serviced"},{"line_number":18,"context_line":"or not again."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a7e1126_046e6a2f","line":16,"range":{"start_line":16,"start_character":66,"end_line":16,"end_character":69},"in_reply_to":"3a7e1126_7854c653","updated":"2015-12-17 08:48:09.000000000","message":"Done","commit_id":"ecc2b8e149e10555a1c7703cb27b5d5bfee68118"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"c0b85542e24eff3940c17f7e3951d83acfe14a47","unresolved":false,"context_lines":[{"line_number":13,"context_line":"And it use method get_ports_on_host_by_subnet(will be renamed to"},{"line_number":14,"context_line":"get_dvr_serviced_ports_on_host_by_subnet in depends-on patch) to get ports"},{"line_number":15,"context_line":"to do its own check. But indeed, current get_ports_on_host_by_subnet will"},{"line_number":16,"context_line":"only return dvr serviced ports on given host and subnet, so it is not"},{"line_number":17,"context_line":"duplicated and unnecessary to check whether those ports are dvr serviced"},{"line_number":18,"context_line":"or not again."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a7e1126_122c7a49","line":16,"range":{"start_line":16,"start_character":66,"end_line":16,"end_character":69},"in_reply_to":"3a7e1126_7854c653","updated":"2015-12-17 05:34:02.000000000","message":"Oops, I just make a stupid mistake.","commit_id":"ecc2b8e149e10555a1c7703cb27b5d5bfee68118"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"7e83fc653525daeadb5ff149a3101d624b88de3b","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def unbind_router_servicenode(self, context, router_id, binding):"},{"line_number":264,"context_line":"        \"\"\"Unbind the router from the chosen l3 service agent.\"\"\""},{"line_number":265,"context_line":"        port_found \u003d False"},{"line_number":266,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":267,"context_line":"            host \u003d binding.l3_agent.host"},{"line_number":268,"context_line":"            subnet_ids \u003d self.get_subnet_ids_on_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_96e633ae","side":"PARENT","line":265,"updated":"2015-12-22 13:05:25.000000000","message":"This method could be simplified to two:\n\n1) A method that returns if there exists a DVR serviced port for a router on a particular host\n\n2) A method that uses the first method, and if it returns True unbinds the router from that host.\n\nI also don\u0027t understand why it accepts a \u0027binding\u0027 and not a host and l3_agent_id, but no biggie.\n\nIt\u0027ll make the implementation simpler, more readable and more testable. Up to you, doesn\u0027t have to be in this patch, but since I do require test coverage, it\u0027s probably easier :)","commit_id":"f1ff4809b26c68a13bb9e8c23c989c4afb002a0b"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d6fe35a379a558361f7773844a26208fb91eb036","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def unbind_router_servicenode(self, context, router_id, binding):"},{"line_number":264,"context_line":"        \"\"\"Unbind the router from the chosen l3 service agent.\"\"\""},{"line_number":265,"context_line":"        port_found \u003d False"},{"line_number":266,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":267,"context_line":"            host \u003d binding.l3_agent.host"},{"line_number":268,"context_line":"            subnet_ids \u003d self.get_subnet_ids_on_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_1d823201","side":"PARENT","line":265,"in_reply_to":"3a7e1126_96e633ae","updated":"2015-12-23 14:06:23.000000000","message":"As I can see, 1) is implemented by method check_dvr_serviceable_ports_on_host, 2) will be one target of this patch.\n\nBy using check_dvr_serviceable_ports_on_host here, unbind_router_servicenode gets simpler now. I will try to make unbind_router_servicenode readable and testable.","commit_id":"f1ff4809b26c68a13bb9e8c23c989c4afb002a0b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"7e83fc653525daeadb5ff149a3101d624b88de3b","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        return binding"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def unbind_router_servicenode(self, context, router_id, binding):"},{"line_number":264,"context_line":"        \"\"\"Unbind the router from the chosen l3 service agent.\"\"\""},{"line_number":265,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":266,"context_line":"            host \u003d binding.l3_agent.host"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_76f62790","line":263,"updated":"2015-12-22 13:05:25.000000000","message":"There is no test for this method, and you\u0027re changing its implementation pretty significantly. I think this patch should introduce a test (Using no mocks, going in to neutron.tests.functional.services.l3_plugin). I checked and the return value is used in one location by negating its value (Since you\u0027re really wanna know if the router was unbound, not if it wasn\u0027t unbound...), so I suggest you take this opportunity to flip the value this function returns. Could be in another patch, up to you.","commit_id":"036827f0d60a9e7687216b017ce864cd42d7c2e7"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d6fe35a379a558361f7773844a26208fb91eb036","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        return binding"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    def unbind_router_servicenode(self, context, router_id, binding):"},{"line_number":264,"context_line":"        \"\"\"Unbind the router from the chosen l3 service agent.\"\"\""},{"line_number":265,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":266,"context_line":"            host \u003d binding.l3_agent.host"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_c1884825","line":263,"in_reply_to":"3a7e1126_76f62790","updated":"2015-12-23 14:06:23.000000000","message":"Make sense to me, I will try to add a functional test.\n\nI will try to flip the return value, and update the docstring.\nFlip current value will make return value more sensible, like:\n    return True, unbind successfully from server side.\n    return False, cannot unbind from server side.","commit_id":"036827f0d60a9e7687216b017ce864cd42d7c2e7"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"7e83fc653525daeadb5ff149a3101d624b88de3b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                          \u0027enabled l3_agent host %(host)s and \u0027"},{"line_number":272,"context_line":"                          \u0027router_id %(id)s\u0027,"},{"line_number":273,"context_line":"                          {\u0027host\u0027: host, \u0027id\u0027: router_id})"},{"line_number":274,"context_line":"                return True"},{"line_number":275,"context_line":"            agent_id \u003d binding.l3_agent_id"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"            context.session.query("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_765ce74a","line":274,"updated":"2015-12-22 13:05:25.000000000","message":"This is a great change. It also highlights how weird the return value is: A function called unbind_router_servicenode returns True if it did *not* unbind the router...","commit_id":"036827f0d60a9e7687216b017ce864cd42d7c2e7"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d6fe35a379a558361f7773844a26208fb91eb036","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                          \u0027enabled l3_agent host %(host)s and \u0027"},{"line_number":272,"context_line":"                          \u0027router_id %(id)s\u0027,"},{"line_number":273,"context_line":"                          {\u0027host\u0027: host, \u0027id\u0027: router_id})"},{"line_number":274,"context_line":"                return True"},{"line_number":275,"context_line":"            agent_id \u003d binding.l3_agent_id"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"            context.session.query("}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_21c26c34","line":274,"in_reply_to":"3a7e1126_765ce74a","updated":"2015-12-23 14:06:23.000000000","message":"Yes, return False here will make it easy to understand.","commit_id":"036827f0d60a9e7687216b017ce864cd42d7c2e7"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f2935d469c2ddc69cd84105201865fede193838b","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        \"\"\"Unbind the router from the chosen l3 service agent."},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"           Return True if router is unbound from servicenode on server side."},{"line_number":266,"context_line":"           Return False if router cannot be unbound from servicenode for"},{"line_number":267,"context_line":"           there is still any DVR serviced ports existing on servicenode."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_8081d14c","line":266,"range":{"start_line":266,"start_character":69,"end_line":266,"end_character":72},"updated":"2015-12-23 17:54:22.000000000","message":"from servicenode \"if\" instead of \"for\"","commit_id":"71e4a1b1d12d332996f3bbf6214366c0d399a43f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f2935d469c2ddc69cd84105201865fede193838b","unresolved":false,"context_lines":[{"line_number":264,"context_line":""},{"line_number":265,"context_line":"           Return True if router is unbound from servicenode on server side."},{"line_number":266,"context_line":"           Return False if router cannot be unbound from servicenode for"},{"line_number":267,"context_line":"           there is still any DVR serviced ports existing on servicenode."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_008e4178","line":267,"range":{"start_line":267,"start_character":42,"end_line":267,"end_character":43},"updated":"2015-12-23 17:54:22.000000000","message":"there \"are\" instead of \"is\" any DVR \"service\" ports instead of \"serviced\".","commit_id":"71e4a1b1d12d332996f3bbf6214366c0d399a43f"}],"neutron/tests/functional/services/l3_router/test_l3_dvr_router_plugin.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f2935d469c2ddc69cd84105201865fede193838b","unresolved":false,"context_lines":[{"line_number":529,"context_line":"            self.l3_plugin.schedule_snat_router("},{"line_number":530,"context_line":"                self.context, router[\u0027id\u0027], router)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"            # after scheduling, dvr local router and dvr snat router"},{"line_number":533,"context_line":"            # are scheduled to l3 agent"},{"line_number":534,"context_line":"            agents \u003d self.l3_plugin.list_l3_agents_hosting_router("},{"line_number":535,"context_line":"                self.context, router[\u0027id\u0027])[\u0027agents\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_4070c972","line":532,"range":{"start_line":532,"start_character":31,"end_line":532,"end_character":32},"updated":"2015-12-23 17:54:22.000000000","message":"after scheduling, check if dvr local router and dvr snat router are scheduled to the given l3 agent in service node.","commit_id":"71e4a1b1d12d332996f3bbf6214366c0d399a43f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f2935d469c2ddc69cd84105201865fede193838b","unresolved":false,"context_lines":[{"line_number":540,"context_line":"            self.assertEqual("},{"line_number":541,"context_line":"                self.l3_agent[\u0027id\u0027], snat_agents[0][\u0027l3_agent_id\u0027])"},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"            # add a dvr serviced port on l3 agent, port existence"},{"line_number":544,"context_line":"            # check will make dvr local router not be removed when"},{"line_number":545,"context_line":"            # removing router from l3 agent"},{"line_number":546,"context_line":"            self.core_plugin.update_port("}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_80b9d1eb","line":543,"range":{"start_line":543,"start_character":33,"end_line":543,"end_character":37},"updated":"2015-12-23 17:54:22.000000000","message":"#add a dvr \"service\" port.\nCheck if remove_router_from_l3_agent removes the router binding from the agent.","commit_id":"71e4a1b1d12d332996f3bbf6214366c0d399a43f"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f2935d469c2ddc69cd84105201865fede193838b","unresolved":false,"context_lines":[{"line_number":566,"context_line":"            self.assertEqual("},{"line_number":567,"context_line":"                self.l3_agent[\u0027id\u0027], snat_agents[0][\u0027l3_agent_id\u0027])"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"            # without dvr serviced ports exist on host, both dvr snat"},{"line_number":570,"context_line":"            # router and dvr local router will be removed when removing"},{"line_number":571,"context_line":"            # router from l3 agent"},{"line_number":572,"context_line":"            self.l3_plugin.remove_router_from_l3_agent("}],"source_content_type":"text/x-python","patch_set":6,"id":"1a7b0d38_00c64167","line":569,"range":{"start_line":569,"start_character":34,"end_line":569,"end_character":35},"updated":"2015-12-23 17:54:22.000000000","message":"ditto:","commit_id":"71e4a1b1d12d332996f3bbf6214366c0d399a43f"}]}
