[pve-devel] [PATCH pve-network 09/17] sdn: running: apply fabrics config
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Apr 2 12:41:31 CEST 2025
On March 28, 2025 6:13 pm, Gabriel Goller wrote:
> From: Stefan Hanreich <s.hanreich at proxmox.com>
>
> Save the fabrics configuration in the running configuration, when
> applying the SDN configuration. This causes the FRR configuration to
> be actually generated for the openfabric and ospf plugins, since the
> FRR configuration is generated from the running configuration.
>
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> Co-authored-by: Gabriel Goller <g.goller at proxmox.com>
> Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
> ---
> src/PVE/Network/SDN.pm | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm
> index a0b61275e10b..12f0f9361389 100644
> --- a/src/PVE/Network/SDN.pm
> +++ b/src/PVE/Network/SDN.pm
> @@ -155,13 +155,19 @@ sub commit_config {
> my $zones_cfg = PVE::Network::SDN::Zones::config();
> my $controllers_cfg = PVE::Network::SDN::Controllers::config();
> my $subnets_cfg = PVE::Network::SDN::Subnets::config();
> + my $openfabric_cfg = PVE::Network::SDN::Fabrics::config_for_protocol("openfabric")
> + ->get_inner();
> + my $ospf_cfg = PVE::Network::SDN::Fabrics::config_for_protocol("ospf")
> + ->get_inner();
>
> my $vnets = { ids => $vnets_cfg->{ids} };
> my $zones = { ids => $zones_cfg->{ids} };
> my $controllers = { ids => $controllers_cfg->{ids} };
> my $subnets = { ids => $subnets_cfg->{ids} };
> + my $openfabric = { ids => $openfabric_cfg };
> + my $ospf = { ids => $ospf_cfg };
>
> - $cfg = { version => $version, vnets => $vnets, zones => $zones, controllers => $controllers, subnets => $subnets };
> + $cfg = { version => $version, vnets => $vnets, zones => $zones, controllers => $controllers, subnets => $subnets, openfabric => $openfabric, ospf => $ospf };
wouldn't it be more in line to have fabrics => fabrics_config here?
>
> cfs_write_file($running_cfg, $cfg);
> }
> --
> 2.39.5
>
>
>
> _______________________________________________
> pve-devel mailing listZZ
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
More information about the pve-devel
mailing list