)]}'
{"networking_ovn/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"2ee49dbb576db1f558b0ea8da3ff17016e91b374","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            external_ids \u003d getattr(row, \u0027external_ids\u0027, {})"},{"line_number":402,"context_line":"            if subnet_id \u003d\u003d external_ids.get(\u0027subnet_id\u0027):"},{"line_number":403,"context_line":"                port_id \u003d external_ids.get(\u0027port_id\u0027)"},{"line_number":404,"context_line":"                if with_ports and port_id:"},{"line_number":405,"context_line":"                    ports.append(self._format_dhcp_row(row))"},{"line_number":406,"context_line":"                else:"},{"line_number":407,"context_line":"                    subnet \u003d self._format_dhcp_row(row)"},{"line_number":408,"context_line":"                    if not with_ports:"},{"line_number":409,"context_line":"                        break"},{"line_number":410,"context_line":"        return {\u0027subnet\u0027: subnet, \u0027ports\u0027: ports}"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def get_subnets_dhcp_options(self, subnet_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_20c4763f","line":409,"range":{"start_line":404,"start_character":0,"end_line":409,"end_character":29},"updated":"2017-12-11 10:38:08.000000000","message":"Seems the logic here is questionable for get subnet in some case.\nWhen with_ports is false and port_id is Not None, it goes into the else branch, gets the subnet and then breaks, but the returned subnet is not what we want.","commit_id":"5357629dec6df08cf9c4896d74acbfbbe9a92bf8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"af553da417bda20a1ead7ba8ca8645c958efd1d1","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            external_ids \u003d getattr(row, \u0027external_ids\u0027, {})"},{"line_number":402,"context_line":"            if subnet_id \u003d\u003d external_ids.get(\u0027subnet_id\u0027):"},{"line_number":403,"context_line":"                port_id \u003d external_ids.get(\u0027port_id\u0027)"},{"line_number":404,"context_line":"                if with_ports and port_id:"},{"line_number":405,"context_line":"                    ports.append(self._format_dhcp_row(row))"},{"line_number":406,"context_line":"                else:"},{"line_number":407,"context_line":"                    subnet \u003d self._format_dhcp_row(row)"},{"line_number":408,"context_line":"                    if not with_ports:"},{"line_number":409,"context_line":"                        break"},{"line_number":410,"context_line":"        return {\u0027subnet\u0027: subnet, \u0027ports\u0027: ports}"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def get_subnets_dhcp_options(self, subnet_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_e61f8669","line":409,"range":{"start_line":404,"start_character":0,"end_line":409,"end_character":29},"in_reply_to":"df87a7cf_20c4763f","updated":"2017-12-11 12:11:32.000000000","message":"Oh good point.\n\nI can change the logic here to account for the port_id. We just don\u0027t have any example of this use (getting a single port DHCP option) in our code right now. We either get just the main DHCP options OR the main DHCP options and all it\u0027s related ports options.\n\nI will see what I can do, that would give some flexibility for this method in case we need it in the future.","commit_id":"5357629dec6df08cf9c4896d74acbfbbe9a92bf8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5bdfd0d51cf0a265a7b73fa5c1bef6b903b19e2b","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            external_ids \u003d getattr(row, \u0027external_ids\u0027, {})"},{"line_number":402,"context_line":"            if subnet_id \u003d\u003d external_ids.get(\u0027subnet_id\u0027):"},{"line_number":403,"context_line":"                port_id \u003d external_ids.get(\u0027port_id\u0027)"},{"line_number":404,"context_line":"                if with_ports and port_id:"},{"line_number":405,"context_line":"                    ports.append(self._format_dhcp_row(row))"},{"line_number":406,"context_line":"                else:"},{"line_number":407,"context_line":"                    subnet \u003d self._format_dhcp_row(row)"},{"line_number":408,"context_line":"                    if not with_ports:"},{"line_number":409,"context_line":"                        break"},{"line_number":410,"context_line":"        return {\u0027subnet\u0027: subnet, \u0027ports\u0027: ports}"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def get_subnets_dhcp_options(self, subnet_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_8ce579de","line":409,"range":{"start_line":404,"start_character":0,"end_line":409,"end_character":29},"in_reply_to":"df87a7cf_91b4b6f3","updated":"2017-12-11 13:27:33.000000000","message":"Oh you are right! Sorry yeah I totally missed what you said. I will fix it in the next patch-set.\n\nGreat review, thanks!","commit_id":"5357629dec6df08cf9c4896d74acbfbbe9a92bf8"},{"author":{"_account_id":23458,"name":"Dong Jun","email":"dongjun.01@bytedance.com","username":"Dongj"},"change_message_id":"e16d731cacc16b7bd6eb3532e3d41920bb88a3ee","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            external_ids \u003d getattr(row, \u0027external_ids\u0027, {})"},{"line_number":402,"context_line":"            if subnet_id \u003d\u003d external_ids.get(\u0027subnet_id\u0027):"},{"line_number":403,"context_line":"                port_id \u003d external_ids.get(\u0027port_id\u0027)"},{"line_number":404,"context_line":"                if with_ports and port_id:"},{"line_number":405,"context_line":"                    ports.append(self._format_dhcp_row(row))"},{"line_number":406,"context_line":"                else:"},{"line_number":407,"context_line":"                    subnet \u003d self._format_dhcp_row(row)"},{"line_number":408,"context_line":"                    if not with_ports:"},{"line_number":409,"context_line":"                        break"},{"line_number":410,"context_line":"        return {\u0027subnet\u0027: subnet, \u0027ports\u0027: ports}"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"    def get_subnets_dhcp_options(self, subnet_ids):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_91b4b6f3","line":409,"range":{"start_line":404,"start_character":0,"end_line":409,"end_character":29},"in_reply_to":"df87a7cf_e61f8669","updated":"2017-12-11 12:36:42.000000000","message":"I think I confused you, @Lucas, I talked about getting subnet DHCP option only. I am trying to explain it in detail.\n\nWhen we get subnet DHCP option only, the with_ports is False, and in the loop, we may first get a port DHCP option with both subnet_id and port_id.\nThen look into the logic here:\nif with_ports(False) and port_id(Valid): branch is False\nelse:\n   subnet \u003d self._format_dhcp_row(row)\n   --In this condition, subnet is actually a port row\n   if not with_ports(False): branch is True\n       break\n       --now we get a port DHCP option returned","commit_id":"5357629dec6df08cf9c4896d74acbfbbe9a92bf8"}]}
