)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"036928cc682705adaa97a261857bd37f9175034e","unresolved":true,"context_lines":[{"line_number":15,"context_line":"The new implementation just makes a single call to the RPC to"},{"line_number":16,"context_line":"essentially try to find the ovn_metadata_port for the given"},{"line_number":17,"context_line":"network based on the `device_id` and the ` device_owner` fields."},{"line_number":18,"context_line":"To get this functionality the `get_dhcp_ports` had to be exposed over"},{"line_number":19,"context_line":"the RPC API and version was bumped to 1.11"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Related-Bug: #1982569"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"6dee21ed_185f43b8","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":31},"updated":"2023-12-22 16:50:42.000000000","message":"note to self. Update commit message","commit_id":"a8eae15fe69777cf231e243e697e7116d2818e93"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"fd9c6450ec605863c3dfdd7c5a7320bfac07af47","unresolved":false,"context_lines":[{"line_number":15,"context_line":"The new implementation just makes a single call to the RPC to"},{"line_number":16,"context_line":"essentially try to find the ovn_metadata_port for the given"},{"line_number":17,"context_line":"network based on the `device_id` and the ` device_owner` fields."},{"line_number":18,"context_line":"To get this functionality the `get_dhcp_ports` had to be exposed over"},{"line_number":19,"context_line":"the RPC API and version was bumped to 1.11"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Related-Bug: #1982569"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"b73d0e56_5dcdfdbc","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":31},"in_reply_to":"6dee21ed_185f43b8","updated":"2024-01-02 16:39:26.000000000","message":"Done","commit_id":"a8eae15fe69777cf231e243e697e7116d2818e93"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35cd56e72564c158c20453eb18675df42bcf0075","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f5f8a780_5ffede35","updated":"2023-12-13 13:55:28.000000000","message":"Good start :) thanks for the followup patch!","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f59bf17e0375374f39265ec0fd0adac1da9fea9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"cc15d77a_515cc7c2","updated":"2023-12-21 08:49:50.000000000","message":"Please a release note with a \"feature\" section, describing the DHCP version upgrade done.","commit_id":"ffa75ce5d9bda7debf603cf340056fb607152ee8"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"d6b553abfbeba381927663055f4947f5e7843359","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"31b1a425_3824878f","updated":"2023-12-20 04:42:27.000000000","message":"recheck timeout in the test_configurations_are_synced_towards_placement(Open vSwitch agent)","commit_id":"ffa75ce5d9bda7debf603cf340056fb607152ee8"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1fa054b14d1067c11af6e0eb4bb5f8906cfc4ec8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"cddce4c4_33858f00","updated":"2023-12-22 06:36:20.000000000","message":"Maybe \"prelude\" section is not necessary for this API change","commit_id":"a8eae15fe69777cf231e243e697e7116d2818e93"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e0e36fa8cf0f2135a3da97076060ce055c7eebfa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"b05b83bf_ae8bca48","updated":"2024-01-02 08:13:16.000000000","message":"Just the \"fixme\" reminder. Anything else looks good.","commit_id":"3014b9a58ef021e027ae20d8d25ae0e748c6b95e"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"55fc79e79ac8c5c6e6e32dfccc97910d22a2b645","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"39601402_7b503df4","updated":"2024-01-02 19:07:10.000000000","message":"recheck unrelated failure","commit_id":"f1ab01cdad368c7879b315dcf32125b80bb68ec8"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"dc660e7bd794fc2c633b1328bf6384eb7f4929e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"3d4e0453_4b4d2ab6","updated":"2024-01-04 17:29:22.000000000","message":"I\u0027m gonna put a small -1 to investigate the possibility of using the existing get_ports RPC call.","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a93a00ced7eeec26f460421f0159fc06ef60f5be","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"b3e1f765_3f663288","in_reply_to":"04f907d1_879844a5","updated":"2024-01-11 13:52:07.000000000","message":"I think we can accept the current patch as is now and then implement this common API class for the RPC, in order to merge it ASAP and make the two smaller patches (easier to review). Anyway, I like the idea (as commented in patch 904872) of having this base class.","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"e611475c7b8bce7477622908fc88f77aa75c9dc8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"04f907d1_879844a5","in_reply_to":"3d4e0453_4b4d2ab6","updated":"2024-01-05 18:55:09.000000000","message":"Made a separate patch using the implementation you suggested. Waiting on the test results.\nhttps://review.opendev.org/c/openstack/neutron/+/904872","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"b9573d4c28060898ac67c2265898d137f25cc6d1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"b5561048_d3135347","in_reply_to":"b3e1f765_3f663288","updated":"2024-01-11 21:39:31.000000000","message":"If the 904872 is acceptable then I would prefer submitting that over this patch as it does not bump the RPC version? Abandon this patch but keep the RFE(although low priority IMO) thoughts?","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"}],"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35cd56e72564c158c20453eb18675df42bcf0075","unresolved":true,"context_lines":[{"line_number":859,"context_line":"              and update_dhcp_port methods."},{"line_number":860,"context_line":"        1.5 - Added dhcp_ready_on_ports"},{"line_number":861,"context_line":"        1.7 - Added get_networks"},{"line_number":862,"context_line":"        1.8 - Added get_dhcp_port"},{"line_number":863,"context_line":"    \"\"\""},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def __init__(self, topic, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"bac2ac00_451b2473","line":862,"updated":"2023-12-13 13:55:28.000000000","message":"Probably will need to bump to 1.9 version","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"ecc57ca0456e20192f765234172dffe29181a068","unresolved":false,"context_lines":[{"line_number":859,"context_line":"              and update_dhcp_port methods."},{"line_number":860,"context_line":"        1.5 - Added dhcp_ready_on_ports"},{"line_number":861,"context_line":"        1.7 - Added get_networks"},{"line_number":862,"context_line":"        1.8 - Added get_dhcp_port"},{"line_number":863,"context_line":"    \"\"\""},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"    def __init__(self, topic, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5201e814_afecf1e5","line":862,"in_reply_to":"bac2ac00_451b2473","updated":"2023-12-14 02:50:36.000000000","message":"Done","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35cd56e72564c158c20453eb18675df42bcf0075","unresolved":true,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def get_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":928,"context_line":"        # FIXME(mtomaska): bump the RPC version"},{"line_number":929,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.8\u0027)"},{"line_number":930,"context_line":"        ports \u003d cctxt.call(self.context, \u0027get_ports\u0027,"},{"line_number":931,"context_line":"                           port_filters\u003dport_filters, port_fields\u003dport_fields)"},{"line_number":932,"context_line":"        return [dhcp.DictModel(port) for port in ports]"}],"source_content_type":"text/x-python","patch_set":1,"id":"3798e840_56f82864","line":929,"range":{"start_line":929,"start_character":47,"end_line":929,"end_character":48},"updated":"2023-12-13 13:55:28.000000000","message":"9","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"ecc57ca0456e20192f765234172dffe29181a068","unresolved":false,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def get_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":928,"context_line":"        # FIXME(mtomaska): bump the RPC version"},{"line_number":929,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.8\u0027)"},{"line_number":930,"context_line":"        ports \u003d cctxt.call(self.context, \u0027get_ports\u0027,"},{"line_number":931,"context_line":"                           port_filters\u003dport_filters, port_fields\u003dport_fields)"},{"line_number":932,"context_line":"        return [dhcp.DictModel(port) for port in ports]"}],"source_content_type":"text/x-python","patch_set":1,"id":"b6c0c67a_b6f80ccf","line":929,"range":{"start_line":929,"start_character":47,"end_line":929,"end_character":48},"in_reply_to":"0f6c45cf_a969b8c8","updated":"2023-12-14 02:50:36.000000000","message":"Done","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"36f303411ddfe411fc68304442fc73b22e7922af","unresolved":true,"context_lines":[{"line_number":926,"context_line":""},{"line_number":927,"context_line":"    def get_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":928,"context_line":"        # FIXME(mtomaska): bump the RPC version"},{"line_number":929,"context_line":"        cctxt \u003d self.client.prepare(version\u003d\u00271.8\u0027)"},{"line_number":930,"context_line":"        ports \u003d cctxt.call(self.context, \u0027get_ports\u0027,"},{"line_number":931,"context_line":"                           port_filters\u003dport_filters, port_fields\u003dport_fields)"},{"line_number":932,"context_line":"        return [dhcp.DictModel(port) for port in ports]"}],"source_content_type":"text/x-python","patch_set":1,"id":"0f6c45cf_a969b8c8","line":929,"range":{"start_line":929,"start_character":47,"end_line":929,"end_character":48},"in_reply_to":"3798e840_56f82864","updated":"2023-12-13 14:17:19.000000000","message":"Yes. this is just quick WIP. Notice I left FIXME and notes in the commit message to do that. Thanks","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"fcca7612138cf7bb494913cee387349d677038d5","unresolved":false,"context_lines":[{"line_number":926,"context_line":"            return dhcp.DictModel(port)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":929,"context_line":"        \"\"\" Get ports."},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        :param port_filters: The filters to apply"},{"line_number":932,"context_line":"                             E.g {\"id\" : [\"\u003cuuid of a network\u003e\", ...]}"}],"source_content_type":"text/x-python","patch_set":6,"id":"40ada314_6dc804cb","line":929,"in_reply_to":"613378c7_890f258e","updated":"2023-12-19 17:01:14.000000000","message":"\u003e pep8: H401: docstring should not start with a space\n\nPlease fix.","commit_id":"76b18fb7be0739800909b2f40ba40541b0ef7958"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"15589dce5a7c512341efbb93b71b94d6559b3a2f","unresolved":true,"context_lines":[{"line_number":925,"context_line":"        if port:"},{"line_number":926,"context_line":"            return dhcp.DictModel(port)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Get dhcp ports."},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        :param port_filters: The filters to apply"}],"source_content_type":"text/x-python","patch_set":7,"id":"110a9494_b84e9ae1","line":928,"range":{"start_line":928,"start_character":8,"end_line":928,"end_character":22},"updated":"2023-12-19 17:11:49.000000000","message":"Not really sure why but looks like I can not just use `get_ports` as it fails some compute.api tempest test. I noticed the method `get_dhcp_port` on L#921 also contains word `dhcp` but not sure why TBH. It just looks like generic get port function and it does not do anything specific to DHCP... So to stay consistent I also left the `dhcp` word in my new method","commit_id":"ffa75ce5d9bda7debf603cf340056fb607152ee8"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1f0106864721422a64d9e2fdea9dd2fed1153118","unresolved":true,"context_lines":[{"line_number":925,"context_line":"        if port:"},{"line_number":926,"context_line":"            return dhcp.DictModel(port)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Get dhcp ports."},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        :param port_filters: The filters to apply"}],"source_content_type":"text/x-python","patch_set":7,"id":"c14ca5b2_4a06b027","line":928,"range":{"start_line":928,"start_character":8,"end_line":928,"end_character":22},"in_reply_to":"110a9494_b84e9ae1","updated":"2023-12-21 16:14:46.000000000","message":"Right, when I implemented the upper method \"get_dhcp_port\", I explicitly used the prefix DHCP because that was the \"goal\" of this method and because it was in the DHCP RPC code. But as you commented, both (mine and this one) are generic methods to retrieve ports (using filters). So I would go for \"get_ports\".","commit_id":"ffa75ce5d9bda7debf603cf340056fb607152ee8"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"fd9c6450ec605863c3dfdd7c5a7320bfac07af47","unresolved":false,"context_lines":[{"line_number":925,"context_line":"        if port:"},{"line_number":926,"context_line":"            return dhcp.DictModel(port)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Get dhcp ports."},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        :param port_filters: The filters to apply"}],"source_content_type":"text/x-python","patch_set":7,"id":"712167df_d9d0ed5d","line":928,"range":{"start_line":928,"start_character":8,"end_line":928,"end_character":22},"in_reply_to":"c14ca5b2_4a06b027","updated":"2024-01-02 16:39:26.000000000","message":"Acknowledged","commit_id":"ffa75ce5d9bda7debf603cf340056fb607152ee8"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"eb6b6f208d97f88a05749115368a60b977ee5566","unresolved":true,"context_lines":[{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    # TODO(mtomaska): This method has the word \"dhcp\" in it to make the method"},{"line_number":929,"context_line":"    # name unique in the RPC layer. This is because neutron does not currently"},{"line_number":930,"context_line":"    # use unique namespaces in the RPC calls. See LP#20247849 for more details."},{"line_number":931,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":932,"context_line":"        \"\"\"Get ports."},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"2f943921_1293d6f9","line":930,"range":{"start_line":930,"start_character":53,"end_line":930,"end_character":61},"updated":"2024-01-02 19:44:43.000000000","message":"2047849","commit_id":"f1ab01cdad368c7879b315dcf32125b80bb68ec8"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"382423f5d62bf3ca44ff578432156c81c11979c9","unresolved":false,"context_lines":[{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    # TODO(mtomaska): This method has the word \"dhcp\" in it to make the method"},{"line_number":929,"context_line":"    # name unique in the RPC layer. This is because neutron does not currently"},{"line_number":930,"context_line":"    # use unique namespaces in the RPC calls. See LP#20247849 for more details."},{"line_number":931,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":932,"context_line":"        \"\"\"Get ports."},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"401c863d_ca3c462b","line":930,"range":{"start_line":930,"start_character":53,"end_line":930,"end_character":61},"in_reply_to":"2f943921_1293d6f9","updated":"2024-01-02 19:52:17.000000000","message":"Done","commit_id":"f1ab01cdad368c7879b315dcf32125b80bb68ec8"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"dedf6f8a9c2535631af59dc81f087732524ae8dc","unresolved":false,"context_lines":[{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    # TODO(mtomaska): This method has the word \"dhcp\" in it to make the method"},{"line_number":929,"context_line":"    # name unique in the RPC layer. This is because neutron does not currently"},{"line_number":930,"context_line":"    # use unique namespaces in the RPC calls. See LP#20247849 for more details."},{"line_number":931,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"},{"line_number":932,"context_line":"        \"\"\"Get ports."},{"line_number":933,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"86c57832_ab64b423","line":930,"range":{"start_line":930,"start_character":53,"end_line":930,"end_character":61},"in_reply_to":"2f943921_1293d6f9","updated":"2024-01-02 19:52:23.000000000","message":"Done","commit_id":"f1ab01cdad368c7879b315dcf32125b80bb68ec8"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"890fb08f26cedeee58f7876778806a59a51220e5","unresolved":true,"context_lines":[{"line_number":925,"context_line":"        if port:"},{"line_number":926,"context_line":"            return dhcp.DictModel(port)"},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"    # TODO(mtomaska): This method has the word \"dhcp\" in it to make the method"},{"line_number":929,"context_line":"    # name unique in the RPC layer. This is because neutron does not currently"},{"line_number":930,"context_line":"    # use unique namespaces in the RPC calls. See LP#2047849 for more details."},{"line_number":931,"context_line":"    def get_dhcp_ports(self, port_filters\u003dNone, port_fields\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"c9d50674_e46d5bca","line":928,"updated":"2024-01-04 17:28:47.000000000","message":"As discussed privately, it would be good to explore if we can re-use the existing RCP API used by the metadata agent and avoid creating a new RCP API callback.","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"35cd56e72564c158c20453eb18675df42bcf0075","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"            },"},{"line_number":1220,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1221,"context_line":"        if ports_result:"},{"line_number":1222,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):"},{"line_number":1223,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1224,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5dcf5144_cea16f43","line":1222,"range":{"start_line":1222,"start_character":44,"end_line":1222,"end_character":47},"updated":"2023-12-13 13:55:28.000000000","message":"just being defensive here, this can return None which will raise an AttributeError on the line below. Perhaps something like\n```\n   try:\n       for fixed_ip in ports_result[0][\u0027fixed_ips\u0027]:\n           ...\n   except IndexError, KeyError:\n       LOG.warning(...)\n       raise NoMetadataPortIpFound\n```\n\nis more robust and you will not need L1221 too","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cc945ee260a1f759fc2edf8c4bad37be86e4db0","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"            },"},{"line_number":1220,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1221,"context_line":"        if ports_result:"},{"line_number":1222,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):"},{"line_number":1223,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1224,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"850929db_c0644ae8","line":1222,"range":{"start_line":1222,"start_character":44,"end_line":1222,"end_character":47},"in_reply_to":"18e928d9_cf0a26da","updated":"2023-12-18 16:05:51.000000000","message":"That\u0027s a good point, I didn\u0027t realize that, thanks. Just an idea then, since we are already polluting DHCP agent code with OVN specific things, is there a way we can know in advance that the OVN is running in the environment and then avoiding calling this method completely?","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"006faea5abc4f07d804fd0572ae0435bb6ec5222","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"            },"},{"line_number":1220,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1221,"context_line":"        if ports_result:"},{"line_number":1222,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):"},{"line_number":1223,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1224,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"18e928d9_cf0a26da","line":1222,"range":{"start_line":1222,"start_character":44,"end_line":1222,"end_character":47},"in_reply_to":"5dcf5144_cea16f43","updated":"2023-12-13 14:42:29.000000000","message":"I have one problem with that. The DHCP agent running in ML2/OVN enviroment is not common setup. So I would prefer not to log any warnings as in 99% of time the `ports_result` will be None on and thus this it will log lot of warnings. We should only log if we got a result but for some reason the `fixed_ips.ip_address` was empty. That would indicate something weird is happening.","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"70f07a49d8e5c7fbc13e5198dc7b4144263cfcf4","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"            },"},{"line_number":1220,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1221,"context_line":"        if ports_result:"},{"line_number":1222,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):"},{"line_number":1223,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1224,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"eac06344_939c2fa5","line":1222,"range":{"start_line":1222,"start_character":44,"end_line":1222,"end_character":47},"in_reply_to":"850929db_c0644ae8","updated":"2023-12-18 19:04:25.000000000","message":"This crossed my mind and I think I asked Yatin while back when working on the original patch. We could simply introduce a new confiq like `force_ovn_metadata` and then just read that config. But that would require changes in tripleo and puppet. \nOr just hit me(and did not think this through). Can the dhcp agent read neutron.conf and just see which ML2 driver is selected? Not sure if that does not go against some best practices. But even if we knew that, the agent will still need to make a RPC call to get the subnet IP for the route.","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"fd9c6450ec605863c3dfdd7c5a7320bfac07af47","unresolved":false,"context_lines":[{"line_number":1219,"context_line":"            },"},{"line_number":1220,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1221,"context_line":"        if ports_result:"},{"line_number":1222,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):"},{"line_number":1223,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1224,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1225,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"11293faf_66541416","line":1222,"range":{"start_line":1222,"start_character":44,"end_line":1222,"end_character":47},"in_reply_to":"eac06344_939c2fa5","updated":"2024-01-02 16:39:26.000000000","message":"Acknowledged","commit_id":"fc37e2cbe085bec339f0c57055ce5cdf081375ef"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"890fb08f26cedeee58f7876778806a59a51220e5","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"                    [ovn_constants.OVN_METADATA_PREFIX + self.network.id]"},{"line_number":1220,"context_line":"            },"},{"line_number":1221,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1222,"context_line":"        if ports_result:"},{"line_number":1223,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027, []):"},{"line_number":1224,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1225,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"    def _generate_opts_per_subnet(self):"},{"line_number":1228,"context_line":"        options \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"a35be5ae_42cb1e88","line":1225,"range":{"start_line":1222,"start_character":0,"end_line":1225,"end_character":46},"updated":"2024-01-04 17:28:47.000000000","message":"The `get()` suggests fixed_ips can be missing or empty. In such case the L1224 will raise an AttributeError. What about\n\n```\ntry:\n    for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027):\n        if fixed_ip.subnet_id \u003d\u003d subnet.id:\n            return fixed_ip.ip_address\nexcept IndexError, AttributeError:\n    # maybe some log message\n    return\n```","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"66bc94f37b325db487f373d82bca2c8436998cd0","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"                    [ovn_constants.OVN_METADATA_PREFIX + self.network.id]"},{"line_number":1220,"context_line":"            },"},{"line_number":1221,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1222,"context_line":"        if ports_result:"},{"line_number":1223,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027, []):"},{"line_number":1224,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1225,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"    def _generate_opts_per_subnet(self):"},{"line_number":1228,"context_line":"        options \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"a6be4584_b0f3f7a7","line":1225,"range":{"start_line":1222,"start_character":0,"end_line":1225,"end_character":46},"in_reply_to":"17dea283_f808e9fb","updated":"2024-01-10 19:44:45.000000000","message":"You\u0027re right, I misread it and thought we\u0027re iterating over the ports_result but we iterate only over first result\u0027s fixed_ips.","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"},{"author":{"_account_id":34271,"name":"Miro Tomaska","display_name":"Miro Tomaska","email":"mtomaska@redhat.com","username":"mtomaska"},"change_message_id":"e611475c7b8bce7477622908fc88f77aa75c9dc8","unresolved":true,"context_lines":[{"line_number":1219,"context_line":"                    [ovn_constants.OVN_METADATA_PREFIX + self.network.id]"},{"line_number":1220,"context_line":"            },"},{"line_number":1221,"context_line":"            port_fields\u003d[\u0027fixed_ips\u0027])"},{"line_number":1222,"context_line":"        if ports_result:"},{"line_number":1223,"context_line":"            for fixed_ip in ports_result[0].get(\u0027fixed_ips\u0027, []):"},{"line_number":1224,"context_line":"                if fixed_ip.subnet_id \u003d\u003d subnet.id:"},{"line_number":1225,"context_line":"                    return fixed_ip.ip_address"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"    def _generate_opts_per_subnet(self):"},{"line_number":1228,"context_line":"        options \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"17dea283_f808e9fb","line":1225,"range":{"start_line":1222,"start_character":0,"end_line":1225,"end_character":46},"in_reply_to":"a35be5ae_42cb1e88","updated":"2024-01-05 18:55:09.000000000","message":"Sorry but I am not seeing how the current implementation can run into the AttributeError. doing if `ports_result` and using `get` will make these operations safe. Unless, you think its a good idea to log the warning of fixed_ips being empty or key not present","commit_id":"c7f115196fa53aa3e4368b988c9086480f959398"}]}
