)]}'
{"networking_ovn/common/ovn_client.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"04ab44c3b2cd1726fcc39e27b24242ca404b9307","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not \u0027dhcp\u0027 in port[\u0027device_id\u0027]):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"            # The \"unknown\" address should only be set for the normal LSP"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_6adf930c","line":233,"range":{"start_line":233,"start_character":20,"end_line":233,"end_character":31},"updated":"2019-10-17 15:00:43.000000000","message":"syntax:\n\n\u0027dhcp\u0027 not in port[...]","commit_id":"72fe54c097f2c44adbb27780316c3b3180ef2ae5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"04ab44c3b2cd1726fcc39e27b24242ca404b9307","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"        # Metadata ports are DHCP ports without a device_id containing \u0027dhcp\u0027"},{"line_number":1887,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1888,"context_line":"        for port in ports:"},{"line_number":1889,"context_line":"            if not \u0027dhcp\u0027 in port[\u0027device_id\u0027]:"},{"line_number":1890,"context_line":"                return port"},{"line_number":1891,"context_line":""},{"line_number":1892,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_cacd675f","line":1889,"updated":"2019-10-17 15:00:43.000000000","message":"ditto","commit_id":"72fe54c097f2c44adbb27780316c3b3180ef2ae5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"04ab44c3b2cd1726fcc39e27b24242ca404b9307","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not \u0027dhcp\u0027 in port[\u0027device_id\u0027]):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"            # The \"unknown\" address should only be set for the normal LSP"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0a329f5f","line":233,"updated":"2019-10-17 15:00:43.000000000","message":"Syntax: \n\n\u0027dhcp\u0027 not in","commit_id":"0cc554a0bdb785c0b6a8e520343997209e41b0e0"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d6969cb233bfdf38a91984fe22b40bc9ae632c22","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not \u0027dhcp\u0027 in port[\u0027device_id\u0027]):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"            # The \"unknown\" address should only be set for the normal LSP"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2aec3b8e","line":233,"in_reply_to":"3fa7e38b_0a329f5f","updated":"2019-10-17 15:08:00.000000000","message":"The alternative would be to add something to utils.py\n\ndef is_dhcp_device_port(port):\n    ...\n\nAnd it could check both the device_owner and device_id against known values.","commit_id":"0cc554a0bdb785c0b6a8e520343997209e41b0e0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b4b2090c5b2ca52c257bf830fe02fc31b9a0a113","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not \u0027dhcp\u0027 in port[\u0027device_id\u0027]):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"            # The \"unknown\" address should only be set for the normal LSP"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_9f923dfc","line":233,"in_reply_to":"3fa7e38b_2aec3b8e","updated":"2019-10-18 12:23:25.000000000","message":"++\n\nI think it\u0027s a better implementation","commit_id":"0cc554a0bdb785c0b6a8e520343997209e41b0e0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"04ab44c3b2cd1726fcc39e27b24242ca404b9307","unresolved":false,"context_lines":[{"line_number":1886,"context_line":"        # Metadata ports are DHCP ports without a device_id containing \u0027dhcp\u0027"},{"line_number":1887,"context_line":"        # since those belong to Neutron DHCP agents."},{"line_number":1888,"context_line":"        for port in ports:"},{"line_number":1889,"context_line":"            if not \u0027dhcp\u0027 in port[\u0027device_id\u0027]:"},{"line_number":1890,"context_line":"                return port"},{"line_number":1891,"context_line":""},{"line_number":1892,"context_line":"    def _find_metadata_port_ip(self, context, subnet):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_2a375b50","line":1889,"updated":"2019-10-17 15:00:43.000000000","message":"ditto","commit_id":"0cc554a0bdb785c0b6a8e520343997209e41b0e0"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"4a79d2cd7d4158f7a413a7592d00036862304d6e","unresolved":false,"context_lines":[{"line_number":1883,"context_line":"        ports \u003d self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1884,"context_line":"            network_id\u003d[network_id], device_owner\u003d[const.DEVICE_OWNER_DHCP]))"},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        # Metadata ports are DHCP ports with the device_id different"},{"line_number":1887,"context_line":"        # than \u0027reserved_dhcp_port\u0027 or not starting with \u0027dhcp\u0027, those"},{"line_number":1888,"context_line":"        # belongs to Neutron DHCP agents"},{"line_number":1889,"context_line":"        for port in ports:"},{"line_number":1890,"context_line":"            if not utils.is_neutron_dhcp_agent_port(port):"},{"line_number":1891,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_b3872d13","line":1888,"range":{"start_line":1886,"start_character":0,"end_line":1888,"end_character":40},"updated":"2019-10-18 18:35:51.000000000","message":"Since utils.is_neutron_dhcp_agent_port() defines what a DHCP agent port is, I\u0027d just have the comment here say that metadata ports are DHCP ports not belonging to the Neutron DHCP agent or something (just in case that definition ever changes, but the code here doesn\u0027t need to).","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2ef4d84884aa0e7de0da1c5f0bfbfa30f5310f0a","unresolved":false,"context_lines":[{"line_number":1883,"context_line":"        ports \u003d self._plugin.get_ports(context, filters\u003ddict("},{"line_number":1884,"context_line":"            network_id\u003d[network_id], device_owner\u003d[const.DEVICE_OWNER_DHCP]))"},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        # Metadata ports are DHCP ports with the device_id different"},{"line_number":1887,"context_line":"        # than \u0027reserved_dhcp_port\u0027 or not starting with \u0027dhcp\u0027, those"},{"line_number":1888,"context_line":"        # belongs to Neutron DHCP agents"},{"line_number":1889,"context_line":"        for port in ports:"},{"line_number":1890,"context_line":"            if not utils.is_neutron_dhcp_agent_port(port):"},{"line_number":1891,"context_line":"                return port"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_222e7efa","line":1888,"range":{"start_line":1886,"start_character":0,"end_line":1888,"end_character":40},"in_reply_to":"3fa7e38b_b3872d13","updated":"2019-10-21 09:39:07.000000000","message":"Good point, i will update the comment","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3a0e03472fb48ccb7b31cab534502a5ed2598edc","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not utils.is_neutron_dhcp_agent_port(port)):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_e54e2d95","line":232,"updated":"2019-10-21 14:25:25.000000000","message":"Don\u0027t need this check anymore as it\u0027s done in the utils code","commit_id":"15bf8f265b14c3a1e2c89a17a77cee69cad22b9d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9c45345df880936d0dc05f502460d9523b7fc744","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not utils.is_neutron_dhcp_agent_port(port)):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_9ef0e6ff","line":232,"in_reply_to":"3fa7e38b_23e43d3c","updated":"2019-10-21 15:46:41.000000000","message":"Oh nevermind, my eyes missed the \u0027not\u0027 below...","commit_id":"15bf8f265b14c3a1e2c89a17a77cee69cad22b9d"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fddbd40bb53e5a3d23952bef3100380d1852610c","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not utils.is_neutron_dhcp_agent_port(port)):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_23e43d3c","line":232,"in_reply_to":"3fa7e38b_48c95858","updated":"2019-10-21 15:07:01.000000000","message":"yeah I looked at it as well, we need to keep it since this method looks for all types of ports (not only metadata)","commit_id":"15bf8f265b14c3a1e2c89a17a77cee69cad22b9d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1e35e4569c6aa21a9aa9fa628c0fde293ebbe300","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not utils.is_neutron_dhcp_agent_port(port)):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_48c95858","line":232,"in_reply_to":"3fa7e38b_c8b548d2","updated":"2019-10-21 14:40:30.000000000","message":"I mean - if we would have removed this check.","commit_id":"15bf8f265b14c3a1e2c89a17a77cee69cad22b9d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2cf3796579c0a7926ef7c44ea261622fa92d7100","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":"            # Only adjust the OVN type if the port is not owned by Neutron"},{"line_number":231,"context_line":"            # DHCP agents."},{"line_number":232,"context_line":"            if (port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_DHCP and"},{"line_number":233,"context_line":"                    not utils.is_neutron_dhcp_agent_port(port)):"},{"line_number":234,"context_line":"                port_type \u003d \u0027localport\u0027"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_c8b548d2","line":232,"in_reply_to":"3fa7e38b_e54e2d95","updated":"2019-10-21 14:39:59.000000000","message":"You do. If the device owner is not DHCP, then the condition is always True, regardless of device_id. I spent like 10 minutes figuring this out too before I voted :D","commit_id":"15bf8f265b14c3a1e2c89a17a77cee69cad22b9d"}],"networking_ovn/common/utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e015200e95bed009bb3c7bc3f43c8f2f853b470f","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    or starting with the word \u0027dhcp\u0027 belongs to the Neutron DHCP agents."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":"    return (port[\u0027device_id\u0027] \u003d\u003d const.DEVICE_ID_RESERVED_DHCP_PORT or"},{"line_number":431,"context_line":"            port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_07ba7b09","line":431,"updated":"2019-10-18 23:34:28.000000000","message":"Should this also be checking the device_id?  I know some of the callers have used a DB filter and don\u0027t require it.","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35b1b0f6b67705439c25cc2edea1ee4e8ea6188e","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    or starting with the word \u0027dhcp\u0027 belongs to the Neutron DHCP agents."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":"    return (port[\u0027device_id\u0027] \u003d\u003d const.DEVICE_ID_RESERVED_DHCP_PORT or"},{"line_number":431,"context_line":"            port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_f7b906ec","line":431,"in_reply_to":"3fa7e38b_07ba7b09","updated":"2019-10-21 08:28:03.000000000","message":"You mean device_owner?","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"b945e055ab83ef98f487b82d9aa1c885c97c581d","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    or starting with the word \u0027dhcp\u0027 belongs to the Neutron DHCP agents."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":"    return (port[\u0027device_id\u0027] \u003d\u003d const.DEVICE_ID_RESERVED_DHCP_PORT or"},{"line_number":431,"context_line":"            port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_42f13a95","line":431,"in_reply_to":"3fa7e38b_777436d1","updated":"2019-10-21 09:38:15.000000000","message":"++ thanks going to add it","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"78388d6d7d5b0368928b62f29100953b50a0f070","unresolved":false,"context_lines":[{"line_number":428,"context_line":"    or starting with the word \u0027dhcp\u0027 belongs to the Neutron DHCP agents."},{"line_number":429,"context_line":"    \"\"\""},{"line_number":430,"context_line":"    return (port[\u0027device_id\u0027] \u003d\u003d const.DEVICE_ID_RESERVED_DHCP_PORT or"},{"line_number":431,"context_line":"            port[\u0027device_id\u0027].startswith(\u0027dhcp\u0027))"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_777436d1","line":431,"in_reply_to":"3fa7e38b_f7b906ec","updated":"2019-10-21 08:51:17.000000000","message":"I think so :)\n++ perhaps to include port[\u0027device_owner\u0027] \u003d\u003d constants. DEVICE_OWNER_DHCP [0]\n\n[0] https://github.com/openstack/neutron-lib/blob/710d129ca94df443d3b21c546c15e5b4ece23761/neutron_lib/constants.py#L55","commit_id":"f52a5d04f20d2901b8de408dbc0d9547d64b4494"}]}
