[pve-devel] [PATCH proxmox-perl-rs v2 4/4] fabrics: add function to get all neighbors of the fabric

Gabriel Goller g.goller at proxmox.com
Mon Aug 25 13:41:06 CEST 2025


On 25.08.2025 10:28, Wolfgang Bumiller wrote:
>On Fri, Aug 22, 2025 at 11:00:38AM +0200, Gabriel Goller wrote:
>> +                let config = FabricConfig::parse_section_config(&raw_config)?;
>> +
>> +                let mut stats: Vec<NeighborStatus> = Vec::new();
>> +
>> +                for (nodeid, node) in config.values().flat_map(|entry| {
>> +                    entry
>> +                        .nodes()
>> +                        .map(|(id, node)| (id.to_string(), node.clone()))
>
>^ ...
>I'm sensing pattern here.
>
>Would it make sense to add a `FabricConfig::all_nodes(&self) -> impl Iterator<...>` ?

Definitely makes sense, added it.

Also fixed all the other issues, thanks for the review!




More information about the pve-devel mailing list