)]}'
{"neutron/db/l3_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"75b1ea97df656aa2dc5d61bb558d4e35efa4d32c","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                                  port_id, subnet_id, owner):"},{"line_number":928,"context_line":"        ports \u003d port_obj.Port.get_ports_by_router_and_port("},{"line_number":929,"context_line":"            context, router_id, owner, port_id)"},{"line_number":930,"context_line":"        if len(ports) \u003c 1:"},{"line_number":931,"context_line":"            raise l3_exc.RouterInterfaceNotFound("},{"line_number":932,"context_line":"                router_id\u003drouter_id, port_id\u003dport_id)"},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3fa7e38b_75b687df","line":930,"updated":"2019-10-02 01:07:31.000000000","message":"nit: if not len(ports): since that\u0027s was \u003c1 assumes, if you respin","commit_id":"c952b5960001faf98186b630fde75deafe5a7b8f"}],"neutron/objects/ports.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70729510c6d6e035f3b65859fe16663bad1769ec","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        The ports are retrieved using:"},{"line_number":524,"context_line":"        - The RouterPort registers. Each time a port is assigned to a router,"},{"line_number":525,"context_line":"          a new RouterPort register is added to the DB."},{"line_number":526,"context_line":"        - The port owner and devide_id information."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Both searches should return the same result. If not, a warning message"},{"line_number":529,"context_line":"        is logged and the port list to be returned is completed with the"}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_c9baf608","line":526,"range":{"start_line":526,"start_character":29,"end_line":526,"end_character":38},"updated":"2019-09-11 06:40:30.000000000","message":"nitty nit: device_id","commit_id":"09854721283facf67494bbd21bbe1c41d258ae72"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ba1ff2eedf6da17c4f92f9c114a63b3dd27b67f9","unresolved":false,"context_lines":[{"line_number":523,"context_line":"        The ports are retrieved using:"},{"line_number":524,"context_line":"        - The RouterPort registers. Each time a port is assigned to a router,"},{"line_number":525,"context_line":"          a new RouterPort register is added to the DB."},{"line_number":526,"context_line":"        - The port owner and devide_id information."},{"line_number":527,"context_line":""},{"line_number":528,"context_line":"        Both searches should return the same result. If not, a warning message"},{"line_number":529,"context_line":"        is logged and the port list to be returned is completed with the"}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_14e106ff","line":526,"range":{"start_line":526,"start_character":29,"end_line":526,"end_character":38},"in_reply_to":"5faad753_c9baf608","updated":"2019-09-11 08:40:24.000000000","message":"Done","commit_id":"09854721283facf67494bbd21bbe1c41d258ae72"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"70729510c6d6e035f3b65859fe16663bad1769ec","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                models_v2.Port.network_id \u003d\u003d subnet[\u0027network_id\u0027], )"},{"line_number":540,"context_line":"            router_filter +\u003d ("},{"line_number":541,"context_line":"                models_v2.Port.network_id \u003d\u003d subnet[\u0027network_id\u0027], )"},{"line_number":542,"context_line":"        else:"},{"line_number":543,"context_line":"            rports_filter +\u003d (l3.RouterPort.port_id \u003d\u003d port_id, )"},{"line_number":544,"context_line":"            router_filter +\u003d (models_v2.Port.id \u003d\u003d port_id, )"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_29414a0c","line":542,"range":{"start_line":542,"start_character":8,"end_line":542,"end_character":12},"updated":"2019-09-11 06:40:30.000000000","message":"so You are assuming that either subnet or port_id will always be not None, right?\nShouldn\u0027t You than check at the beginning if both aren\u0027t none and e.g. raise exception if that happens?\nOr use here \"elif\" instead of else","commit_id":"09854721283facf67494bbd21bbe1c41d258ae72"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ba1ff2eedf6da17c4f92f9c114a63b3dd27b67f9","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                models_v2.Port.network_id \u003d\u003d subnet[\u0027network_id\u0027], )"},{"line_number":540,"context_line":"            router_filter +\u003d ("},{"line_number":541,"context_line":"                models_v2.Port.network_id \u003d\u003d subnet[\u0027network_id\u0027], )"},{"line_number":542,"context_line":"        else:"},{"line_number":543,"context_line":"            rports_filter +\u003d (l3.RouterPort.port_id \u003d\u003d port_id, )"},{"line_number":544,"context_line":"            router_filter +\u003d (models_v2.Port.id \u003d\u003d port_id, )"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5faad753_54c0de50","line":542,"range":{"start_line":542,"start_character":8,"end_line":542,"end_character":12},"in_reply_to":"5faad753_29414a0c","updated":"2019-09-11 08:40:24.000000000","message":"Yes, I prefer to check this at the beginning.","commit_id":"09854721283facf67494bbd21bbe1c41d258ae72"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"083139c6b06b50521b92de799e7cbd368e1d8ea1","unresolved":false,"context_lines":[{"line_number":532,"context_line":"        if network_id and port_id:"},{"line_number":533,"context_line":"            LOG.warning(\u0027\"network_id\" and \"port_id\" are mutually exclusive, \u0027"},{"line_number":534,"context_line":"                        \u0027only one can be defined. By default, the most \u0027"},{"line_number":535,"context_line":"                        \u0027restrictive one will be used, \"port_id\"\u0027)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        rports_filter \u003d (l3.RouterPort.router_id \u003d\u003d router_id,"},{"line_number":538,"context_line":"                         l3.RouterPort.port_type \u003d\u003d owner)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5faad753_cf3ddec4","line":535,"updated":"2019-09-13 07:20:10.000000000","message":"But still You didn\u0027t warn when both network_id and port_id will be None.\nMaybe it would be easier to propose 2 methods:\nget_ports_by_router_and_network()\nget_ports_by_router_and_port()\n\nAnd make network_id and port_id as mandatory attributes in those methods.","commit_id":"001c605a0788dd9d7e4fcf5246053e205afb950d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"77fa53bdaca5ac8cba4cb083882e2f081c7d9f6e","unresolved":false,"context_lines":[{"line_number":532,"context_line":"        if network_id and port_id:"},{"line_number":533,"context_line":"            LOG.warning(\u0027\"network_id\" and \"port_id\" are mutually exclusive, \u0027"},{"line_number":534,"context_line":"                        \u0027only one can be defined. By default, the most \u0027"},{"line_number":535,"context_line":"                        \u0027restrictive one will be used, \"port_id\"\u0027)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        rports_filter \u003d (l3.RouterPort.router_id \u003d\u003d router_id,"},{"line_number":538,"context_line":"                         l3.RouterPort.port_type \u003d\u003d owner)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5faad753_8f9cc66a","line":535,"in_reply_to":"5faad753_cf3ddec4","updated":"2019-09-13 07:38:13.000000000","message":"Done","commit_id":"001c605a0788dd9d7e4fcf5246053e205afb950d"}]}
