)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0a6499cc575d23a254a88bf925e1ad1c9ae1a643","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"32d02ccd_af466310","updated":"2024-01-09 07:37:06.000000000","message":"1) This is not closing bug 1982287, patch [1] is doing that.\n2) This functionality is not supported according to the documentation [2]. Why is that needed?\n\n[1]https://review.opendev.org/c/openstack/neutron/+/851509\n[2]https://man7.org/linux/man-pages/man5/ovn-nb.5.html#Address_Set_TABLE","commit_id":"81b03e3f8ee87437921b7510bb0eb4131401d9a2"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"3b90788872ec442a83155b9a5f6163e2c9dca224","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"23508cf3_791c2b3e","in_reply_to":"32d02ccd_af466310","updated":"2024-01-09 08:13:53.000000000","message":"For 2), do you mean mixing CIDR-type address with single IP address? I found that the test is supported in OVN tests[1]:\n```\ncheck ovn-nbctl add address_set $foo_as_uuid addresses 1.1.1.3 -- \\\n                add address_set $foo_as_uuid addresses 1.1.2.1/4\n```                \n[1]https://github.com/ovn-org/ovn/blob/8b15ea3763128a119f521ababae25b59a7cc3b4f/tests/ovn-northd.at#L8994C79-L8994C79","commit_id":"81b03e3f8ee87437921b7510bb0eb4131401d9a2"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"2b20716edef4e0103ed570f61984c29e7ce00d52","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"de79a69f_4b31500e","updated":"2024-01-10 18:33:02.000000000","message":"just a little nit about creating a helper method since there\u0027s some repeated code.","commit_id":"8e957c84bb29e0285a10b96c32003f6bcd514789"}],"ovsdbapp/schema/ovn_northbound/commands.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"92ec27d84c58111bffda34372277c7902baf2ccd","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        super().__init__(api)"},{"line_number":244,"context_line":"        self.name \u003d name"},{"line_number":245,"context_line":"        self.addresses \u003d ["},{"line_number":246,"context_line":"            str(netaddr.IPNetwork(addr).cidr) if \u0027/\u0027 in addr"},{"line_number":247,"context_line":"            else str(netaddr.IPAddress(addr))"},{"line_number":248,"context_line":"            for addr in addresses or []"},{"line_number":249,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"524337c3_ed5f8e79","line":246,"range":{"start_line":246,"start_character":46,"end_line":246,"end_character":60},"updated":"2024-01-09 12:43:45.000000000","message":"Isn\u0027t there some other way to check if the address has a subnet cidr? I check both netaddr and ipaddr and it seems this one is the best and simplest.","commit_id":"8e957c84bb29e0285a10b96c32003f6bcd514789"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"a18f55ebc00f245876601fb1c9cde39a352f389d","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        super().__init__(api)"},{"line_number":244,"context_line":"        self.name \u003d name"},{"line_number":245,"context_line":"        self.addresses \u003d ["},{"line_number":246,"context_line":"            str(netaddr.IPNetwork(addr).cidr) if \u0027/\u0027 in addr"},{"line_number":247,"context_line":"            else str(netaddr.IPAddress(addr))"},{"line_number":248,"context_line":"            for addr in addresses or []"},{"line_number":249,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba37b670_6f78f3e4","line":246,"range":{"start_line":246,"start_character":46,"end_line":246,"end_character":60},"in_reply_to":"524337c3_ed5f8e79","updated":"2024-01-10 03:30:25.000000000","message":"Yeah, it is a common check for CIDR.","commit_id":"8e957c84bb29e0285a10b96c32003f6bcd514789"},{"author":{"_account_id":28056,"name":"Liushy","email":"liuxie_11@163.com","username":"liuxie_11"},"change_message_id":"01a0e9ffff590a465b160d8827d46154e7ec8a36","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        super().__init__(api)"},{"line_number":244,"context_line":"        self.name \u003d name"},{"line_number":245,"context_line":"        self.addresses \u003d ["},{"line_number":246,"context_line":"            str(netaddr.IPNetwork(addr).cidr) if \u0027/\u0027 in addr"},{"line_number":247,"context_line":"            else str(netaddr.IPAddress(addr))"},{"line_number":248,"context_line":"            for addr in addresses or []"},{"line_number":249,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"da1a898c_33a093d1","line":246,"range":{"start_line":246,"start_character":46,"end_line":246,"end_character":60},"in_reply_to":"97c5a7f3_d1f9e954","updated":"2024-01-11 03:27:31.000000000","message":"OK,thanks for your suggestion","commit_id":"8e957c84bb29e0285a10b96c32003f6bcd514789"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"2b20716edef4e0103ed570f61984c29e7ce00d52","unresolved":true,"context_lines":[{"line_number":243,"context_line":"        super().__init__(api)"},{"line_number":244,"context_line":"        self.name \u003d name"},{"line_number":245,"context_line":"        self.addresses \u003d ["},{"line_number":246,"context_line":"            str(netaddr.IPNetwork(addr).cidr) if \u0027/\u0027 in addr"},{"line_number":247,"context_line":"            else str(netaddr.IPAddress(addr))"},{"line_number":248,"context_line":"            for addr in addresses or []"},{"line_number":249,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":3,"id":"97c5a7f3_d1f9e954","line":246,"range":{"start_line":246,"start_character":46,"end_line":246,"end_character":60},"in_reply_to":"ba37b670_6f78f3e4","updated":"2024-01-10 18:33:02.000000000","message":"The only suggestion I\u0027d make is to make a utility function so we don\u0027t have to do this multiple times. Something like:\n```\ndef normalize_prefix(addr):\n    return str(netaddr.IPNetwork(addr).cidr if \u0027/\u0027 in addr\n               else netaddr.IPAddress(addr))\n\ndef normalize_prefixes(addrs):\n    return [normalize_prefix(addr) for addr in addrs or []]\n```\n\nI\u0027m not sure if it matters, but it looks like *some* parts of the ovn-nbctl code will specifically handle ipv4/6 addresses with /32 and /128 to normalize w/o the cidr. It seems sporadic though and theoretically anyone doing comparisons on addresses should not be using string matching anyway.","commit_id":"8e957c84bb29e0285a10b96c32003f6bcd514789"}]}
