)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"825b7ebde96c78868f3eb499de56cb749b25e86b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f68d490b_3dc05aae","updated":"2026-05-27 22:50:21.000000000","message":"I think with some minor changes, we can get this patch merged. That said, I have some concerns with the overall approach. We should be able to make a DB query that tells us all the compute hosts connected to the same switch that have bound ports, and from the topology DB, that would tell us which interfaces not to detach (if any), instead of going to ND for this. The only downside to doing that is if we end up deciding to support multiple OpenStack clouds/instances on the same ND, but there currently is no plan for supporting that. We can look into this or other alternate approaches post merging this patch.","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"}],"networking_cisco/ml2_drivers/ndfc/mech_ndfc.py":[{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"825b7ebde96c78868f3eb499de56cb749b25e86b","unresolved":true,"context_lines":[{"line_number":785,"context_line":"            vrf_name \u003d prj_details[0]"},{"line_number":786,"context_line":"            if vlan_id is None:"},{"line_number":787,"context_line":"                vlan_id \u003d network.get(\u0027provider:segmentation_id\u0027)"},{"line_number":788,"context_line":"            remaining_ports \u003d self._count_bound_ports_on_network("},{"line_number":789,"context_line":"                context._plugin_context, network[\u0027id\u0027])"},{"line_number":790,"context_line":"            res \u003d self.ndfc.detach_network(vrf_name, network[\u0027name\u0027],"},{"line_number":791,"context_line":"                vlan_id, topology_result,"}],"source_content_type":"text/x-python","patch_set":1,"id":"86c95378_c2c2978e","line":788,"range":{"start_line":788,"start_character":35,"end_line":788,"end_character":64},"updated":"2026-05-27 22:50:21.000000000","message":"This comment is unrelated to the patch, but while reviewing this patch, I realized that the _count_bound_ports_on_network probably needs a fix in order to be more correct. If DHCP is used, the DHCP agents would each have a bound port on the network, so the method would return a nonzero value as long as the network existed (assuming DHCP was configured for the network). This is currently working because OVN doesn\u0027t deploy DHCP agents, so any ports created for DHCP are never bound, so the method behaves as we expect. We might want to change this method at some point going forward.","commit_id":"abb592494b7a7ee36663328cae0d22fe806398c0"},{"author":{"_account_id":32213,"name":"Sayali Vidyadhar Naval","email":"sayalinaval@gmail.com","username":"sayalinaval"},"change_message_id":"b0ac0e33c4e661e0aa5ad728b00d8abd48e71b84","unresolved":false,"context_lines":[{"line_number":785,"context_line":"            vrf_name \u003d prj_details[0]"},{"line_number":786,"context_line":"            if vlan_id is None:"},{"line_number":787,"context_line":"                vlan_id \u003d network.get(\u0027provider:segmentation_id\u0027)"},{"line_number":788,"context_line":"            remaining_ports \u003d self._count_bound_ports_on_network("},{"line_number":789,"context_line":"                context._plugin_context, network[\u0027id\u0027])"},{"line_number":790,"context_line":"            res \u003d self.ndfc.detach_network(vrf_name, network[\u0027name\u0027],"},{"line_number":791,"context_line":"                vlan_id, topology_result,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3c4774e2_43b5485d","line":788,"range":{"start_line":788,"start_character":35,"end_line":788,"end_character":64},"in_reply_to":"86c95378_c2c2978e","updated":"2026-05-28 00:11:50.000000000","message":"Acknowledged","commit_id":"abb592494b7a7ee36663328cae0d22fe806398c0"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"825b7ebde96c78868f3eb499de56cb749b25e86b","unresolved":true,"context_lines":[{"line_number":785,"context_line":"            vrf_name \u003d prj_details[0]"},{"line_number":786,"context_line":"            if vlan_id is None:"},{"line_number":787,"context_line":"                vlan_id \u003d network.get(\u0027provider:segmentation_id\u0027)"},{"line_number":788,"context_line":"            remaining_ports \u003d self._count_bound_ports_on_network("},{"line_number":789,"context_line":"                context._plugin_context, network[\u0027id\u0027])"},{"line_number":790,"context_line":"            res \u003d self.ndfc.detach_network(vrf_name, network[\u0027name\u0027],"},{"line_number":791,"context_line":"                vlan_id, topology_result,"}],"source_content_type":"text/x-python","patch_set":2,"id":"370da0ad_09977686","line":788,"range":{"start_line":788,"start_character":35,"end_line":788,"end_character":64},"updated":"2026-05-27 22:50:21.000000000","message":"This comment is unrelated to the patch, but while reviewing this patch, I realized that the _count_bound_ports_on_network probably needs a fix in order to be more correct. If DHCP is used, the DHCP agents would each have a bound port on the network, so the method would return a nonzero value as long as the network existed (assuming DHCP was configured for the network). This is currently working because OVN doesn\u0027t deploy DHCP agents, so any ports created for DHCP are never bound, so the method behaves as we expect. We might want to change this method at some point going forward.","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"},{"author":{"_account_id":32213,"name":"Sayali Vidyadhar Naval","email":"sayalinaval@gmail.com","username":"sayalinaval"},"change_message_id":"b0ac0e33c4e661e0aa5ad728b00d8abd48e71b84","unresolved":false,"context_lines":[{"line_number":785,"context_line":"            vrf_name \u003d prj_details[0]"},{"line_number":786,"context_line":"            if vlan_id is None:"},{"line_number":787,"context_line":"                vlan_id \u003d network.get(\u0027provider:segmentation_id\u0027)"},{"line_number":788,"context_line":"            remaining_ports \u003d self._count_bound_ports_on_network("},{"line_number":789,"context_line":"                context._plugin_context, network[\u0027id\u0027])"},{"line_number":790,"context_line":"            res \u003d self.ndfc.detach_network(vrf_name, network[\u0027name\u0027],"},{"line_number":791,"context_line":"                vlan_id, topology_result,"}],"source_content_type":"text/x-python","patch_set":2,"id":"105265fc_b995c51f","line":788,"range":{"start_line":788,"start_character":35,"end_line":788,"end_character":64},"in_reply_to":"370da0ad_09977686","updated":"2026-05-28 00:11:50.000000000","message":"Acknowledged","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"}],"networking_cisco/ml2_drivers/ndfc/ndfc.py":[{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"825b7ebde96c78868f3eb499de56cb749b25e86b","unresolved":true,"context_lines":[{"line_number":774,"context_line":"                  \"new attachment %s\", vrf_name, network_name, vlan,"},{"line_number":775,"context_line":"                  leaf_attachments)"},{"line_number":776,"context_line":"        if self.ndfc_obj.nd_new_version:"},{"line_number":777,"context_line":"            exist_attach \u003d self.ndfc_obj.get_network_switch_interface_map("},{"line_number":778,"context_line":"                self.fabric, network_name)"},{"line_number":779,"context_line":"            LOG.debug(\"existing attachments %s\", exist_attach)"},{"line_number":780,"context_line":"            if exist_attach is None:"},{"line_number":781,"context_line":"                LOG.warning(\"Unable to retrieve existing attachments for \""},{"line_number":782,"context_line":"                            \"network %s — proceeding with full detach\","}],"source_content_type":"text/x-python","patch_set":2,"id":"73c674ae_653048b2","line":779,"range":{"start_line":777,"start_character":0,"end_line":779,"end_character":62},"updated":"2026-05-27 22:50:21.000000000","message":"Since this is common to both the if and else cases, can\u0027t this be kept outside/above it?","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"},{"author":{"_account_id":32213,"name":"Sayali Vidyadhar Naval","email":"sayalinaval@gmail.com","username":"sayalinaval"},"change_message_id":"b0ac0e33c4e661e0aa5ad728b00d8abd48e71b84","unresolved":false,"context_lines":[{"line_number":774,"context_line":"                  \"new attachment %s\", vrf_name, network_name, vlan,"},{"line_number":775,"context_line":"                  leaf_attachments)"},{"line_number":776,"context_line":"        if self.ndfc_obj.nd_new_version:"},{"line_number":777,"context_line":"            exist_attach \u003d self.ndfc_obj.get_network_switch_interface_map("},{"line_number":778,"context_line":"                self.fabric, network_name)"},{"line_number":779,"context_line":"            LOG.debug(\"existing attachments %s\", exist_attach)"},{"line_number":780,"context_line":"            if exist_attach is None:"},{"line_number":781,"context_line":"                LOG.warning(\"Unable to retrieve existing attachments for \""},{"line_number":782,"context_line":"                            \"network %s — proceeding with full detach\","}],"source_content_type":"text/x-python","patch_set":2,"id":"71fe176a_eed918f7","line":779,"range":{"start_line":777,"start_character":0,"end_line":779,"end_character":62},"in_reply_to":"73c674ae_653048b2","updated":"2026-05-28 00:11:50.000000000","message":"Done","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"825b7ebde96c78868f3eb499de56cb749b25e86b","unresolved":true,"context_lines":[{"line_number":795,"context_line":"                LOG.warning(\"Unable to retrieve existing attachments for \""},{"line_number":796,"context_line":"                            \"network %s from NDFC — skipping detach\","},{"line_number":797,"context_line":"                            network_name)"},{"line_number":798,"context_line":"                return False"},{"line_number":799,"context_line":"            removed_attach \u003d self._remove_attachments("},{"line_number":800,"context_line":"                exist_attach, leaf_attachments)"},{"line_number":801,"context_line":"            LOG.debug(\"removed attachments %s\", removed_attach)"}],"source_content_type":"text/x-python","patch_set":2,"id":"70095b16_a9928e5c","line":798,"range":{"start_line":798,"start_character":0,"end_line":798,"end_character":28},"updated":"2026-05-27 22:50:21.000000000","message":"I guess I\u0027m not sure I understand why the legacy and OpenAPI workflows/behaviors are different. This means that the detach_network behaves differently for legacy vs. OpenAPI. It seems like we should have the same behavior.","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"},{"author":{"_account_id":32213,"name":"Sayali Vidyadhar Naval","email":"sayalinaval@gmail.com","username":"sayalinaval"},"change_message_id":"b0ac0e33c4e661e0aa5ad728b00d8abd48e71b84","unresolved":false,"context_lines":[{"line_number":795,"context_line":"                LOG.warning(\"Unable to retrieve existing attachments for \""},{"line_number":796,"context_line":"                            \"network %s from NDFC — skipping detach\","},{"line_number":797,"context_line":"                            network_name)"},{"line_number":798,"context_line":"                return False"},{"line_number":799,"context_line":"            removed_attach \u003d self._remove_attachments("},{"line_number":800,"context_line":"                exist_attach, leaf_attachments)"},{"line_number":801,"context_line":"            LOG.debug(\"removed attachments %s\", removed_attach)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f226af50_ad00a88a","line":798,"range":{"start_line":798,"start_character":0,"end_line":798,"end_character":28},"in_reply_to":"70095b16_a9928e5c","updated":"2026-05-28 00:11:50.000000000","message":"Done","commit_id":"857bee2ccc27259f68220c53f365fd6185317d74"}]}
