diff options
| author | Stefan Hanreich <s.hanreich@proxmox.com> | 2025-07-16 15:08:01 +0200 |
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2025-07-17 00:10:36 +0200 |
| commit | a2d808835bd241f82af8c117345899c4162c3cb9 (patch) | |
| tree | 4716b2624f9d6e9bed2749cb623d0d91cf987f6b /src/PVE/Network/SDN/Controllers/BgpPlugin.pm | |
| parent | ccb1c8c122852992945b27b4fc8fa9ac75ee3a3a (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/BgpPlugin.pm')
| -rw-r--r-- | src/PVE/Network/SDN/Controllers/BgpPlugin.pm | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm index dd835e4..5f3fcb0 100644 --- a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm +++ b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm @@ -53,7 +53,7 @@ sub options { } # Plugin implementation -sub generate_controller_config { +sub generate_frr_config { my ($class, $plugin_config, $controller, $id, $uplinks, $config) = @_; my @peers; @@ -135,7 +135,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) = @_; } @@ -167,20 +167,4 @@ sub on_update_hook { } } -sub generate_controller_rawconfig { - my ($class, $plugin_config, $config) = @_; - return ""; -} - -sub write_controller_config { - my ($class, $plugin_config, $config) = @_; - return; -} - -sub reload_controller { - my ($class) = @_; - return; -} - 1; - |
