summaryrefslogtreecommitdiff
path: root/src/PVE/Network/SDN/Controllers/IsisPlugin.pm
diff options
context:
space:
mode:
authorStefan Hanreich <s.hanreich@proxmox.com>2025-07-16 15:07:59 +0200
committerThomas Lamprecht <t.lamprecht@proxmox.com>2025-07-17 00:10:35 +0200
commitdc4e285c16a51d4317bde3c7cc47ab6b8582b9e6 (patch)
tree408b988d193a08e79d643a1c50e5631a78aa8176 /src/PVE/Network/SDN/Controllers/IsisPlugin.pm
parent074d2a69a90b32bcb4fcf5e6c9d5c830237cbe8f (diff)
refactor: controller: move frr methods into helper
Up until now the EVPN controller contained all the helper methods as well as the configuration generation logic for FRR. Since we need to write FRR configuration with the fabrics as well, move the FRR helper files into its own FRR module, so they can be used by the EVPN plugin as well as the future fabrics plugins. The fact that the EVPN controller was solely responsible for generating the FRR config also meant, that FRR configuration was only generated if you had an EVPN controller defined. In the process of generating an FRR configuration, we used mainly two formats, which I'll refer to by the following names: frr_config: This is a perl hash, that loosely resembles the structure of the FRR configuration file and was later converted into the raw_config format before writing it. raw_config: This is an array, that contains strings, where each string is a line in the FRR configuration. So the finished FRR configuration consists of all the strings in the array joined by newlines. Controllers used the frr_config format for generating FRR configuration. The local configuration in /etc/frr/frr.conf.local also gets parsed into this format. The fabrics perlmod module, returns the raw_config format. This was behind the intention to make this split more clear and handle the FRR config generation in two steps from now on: * generate a frr_config in all plugins that utilize that format * convert it to the raw_config format * append the configuration obtained via perlmod * write the finished configuration to frr.conf This process was already in place, but the distinction wasn't that clear. During this process I renamed all methods to make clear which format they accept / return. Some functions have been split to make them more granular, so we can use intermediate results. Most namely the generate_controller_rawconfig function has been split into multiple functions. Added documentation to all public FRR functions, so it is clearer which format they expect, as well as which operations they perform on the respective passed configurations. For the future it might make sense to further split the FRR config generation for zones and vnets into the respective Zone / VNet Plugins, instead of in the EVPN controller, but this was beyond the scope of this already quite large patch series. Co-authored-by: Gabriel Goller <g.goller@proxmox.com> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com> Link: https://lore.proxmox.com/20250716130837.585796-39-g.goller@proxmox.com
Diffstat (limited to 'src/PVE/Network/SDN/Controllers/IsisPlugin.pm')
0 files changed, 0 insertions, 0 deletions