summaryrefslogtreecommitdiff
path: root/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
diff options
context:
space:
mode:
authorStefan Hanreich <s.hanreich@proxmox.com>2025-07-16 15:08:01 +0200
committerThomas Lamprecht <t.lamprecht@proxmox.com>2025-07-17 00:10:36 +0200
commita2d808835bd241f82af8c117345899c4162c3cb9 (patch)
tree4716b2624f9d6e9bed2749cb623d0d91cf987f6b /src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
parentccb1c8c122852992945b27b4fc8fa9ac75ee3a3a (diff)
controllers: define new api for frr config generation
With the changes to how we handle the frr config generation, controllers are now no longer responsible for serializing and writing the FRR configuration. Instead, we pass the existing frr_config perl hash to every controller, where controllers append their respective configuration. This requires a few changes in the controller API, so that they now append to a perl hash, instead of directly writing their own configuration to the file, which is now handled externally by the SDN module. We also remove the respective methods in the EvpnPlugin that were previously responsible for serializing and writing the FRR configuration, since they have been moved to the Frr helper module instead. 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-41-g.goller@proxmox.com
Diffstat (limited to 'src/PVE/Network/SDN/Controllers/EvpnPlugin.pm')
-rw-r--r--src/PVE/Network/SDN/Controllers/EvpnPlugin.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 4e71306..63d209d 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -42,7 +42,7 @@ sub options {
}
# Plugin implementation
-sub generate_controller_config {
+sub generate_frr_config {
my ($class, $plugin_config, $controller_cfg, $id, $uplinks, $config) = @_;
my @peers;
@@ -121,7 +121,7 @@ sub generate_controller_config {
return $config;
}
-sub generate_controller_zone_config {
+sub generate_zone_frr_config {
my ($class, $plugin_config, $controller, $controller_cfg, $id, $uplinks, $config) = @_;
my $local_node = PVE::INotify::nodename();
@@ -346,7 +346,7 @@ sub generate_controller_zone_config {
return $config;
}
-sub generate_controller_vnet_config {
+sub generate_vnet_frr_config {
my ($class, $plugin_config, $controller, $zone, $zoneid, $vnetid, $config) = @_;
my $exitnodes = $zone->{'exitnodes'};