From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-network 07/11] merge the frr config with the fabrics frr config on apply
Date: Fri, 14 Feb 2025 14:39:47 +0100 [thread overview]
Message-ID: <20250214133951.344500-8-g.goller@proxmox.com> (raw)
In-Reply-To: <20250214133951.344500-1-g.goller@proxmox.com>
Get the config directly from the file and convert it to the
Perl-Representation (the Frr-Representation), then generate the config
with the existing functions.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
src/PVE/Network/SDN/Controllers.pm | 1 -
src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 3 ---
src/PVE/Network/SDN/Controllers/Frr.pm | 13 +++++++++++++
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/PVE/Network/SDN/Controllers.pm b/src/PVE/Network/SDN/Controllers.pm
index 43f154b7338e..da3c957fe44d 100644
--- a/src/PVE/Network/SDN/Controllers.pm
+++ b/src/PVE/Network/SDN/Controllers.pm
@@ -143,7 +143,6 @@ sub generate_controller_config {
sub reload_controller {
-
my $cfg = PVE::Network::SDN::running_config();
my $controller_cfg = $cfg->{controllers};
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 6f875cb5dbf9..4b7120091b4b 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -359,14 +359,11 @@ sub find_isis_controller {
sub generate_controller_rawconfig {
my ($class, $plugin_config, $config) = @_;
- #return PVE::Network::SDN::Controllers::Frr::generate_controller_rawconfig($class, $plugin_config, $config);
die "implemented in the Frr helper";
}
sub write_controller_config {
my ($class, $plugin_config, $config) = @_;
-
- #return PVE::Network::SDN::Controllers::Frr::write_controller_config($class, $plugin_config, $config);
die "implemented in the Frr helper";
}
diff --git a/src/PVE/Network/SDN/Controllers/Frr.pm b/src/PVE/Network/SDN/Controllers/Frr.pm
index 386dcae543e8..e9546f4d5e82 100644
--- a/src/PVE/Network/SDN/Controllers/Frr.pm
+++ b/src/PVE/Network/SDN/Controllers/Frr.pm
@@ -67,6 +67,19 @@ sub generate_controller_rawconfig {
generate_frr_routemap($final_config, $config->{frr_routemap});
generate_frr_simple_list($final_config, $config->{frr_ip_protocol});
+ # fabric config
+ # openfabric
+ my $openfabric_config = PVE::Network::SDN::Fabrics::get_config("openfabric");
+ my $openfabric_frr = $openfabric_config->get_perl_frr_repr($nodename);
+ generate_frr_interfaces($final_config, $openfabric_frr->{frr_interface});
+ generate_frr_recurse($final_config, $openfabric_frr->{frr}, undef, 0);
+
+ # ospf
+ my $ospf_config = PVE::Network::SDN::Fabrics::get_config("ospf");
+ my $ospf_frr = $ospf_config->get_perl_frr_repr($nodename);
+ generate_frr_interfaces($final_config, $ospf_frr->{frr_interface});
+ generate_frr_recurse($final_config, $ospf_frr->{frr}, undef, 0);
+
push @{$final_config}, "!";
push @{$final_config}, "line vty";
push @{$final_config}, "!";
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-02-14 13:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 13:39 [pve-devel] [RFC cluster/manager/network/proxmox{-ve-rs, -perl-rs} 00/11] Add SDN Fabrics Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH proxmox-ve-rs 01/11] add crate with common network types Gabriel Goller
2025-03-03 15:08 ` Stefan Hanreich
2025-03-05 8:28 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH proxmox-ve-rs 02/11] add proxmox-frr crate with frr types Gabriel Goller
2025-03-03 16:29 ` Stefan Hanreich
2025-03-04 16:28 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH proxmox-ve-rs 03/11] add intermediate fabric representation Gabriel Goller
2025-02-28 13:57 ` Thomas Lamprecht
2025-02-28 16:19 ` Gabriel Goller
2025-03-04 17:30 ` Gabriel Goller
2025-03-05 9:03 ` Wolfgang Bumiller
2025-03-04 8:45 ` Stefan Hanreich
2025-03-05 9:09 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH proxmox-perl-rs 04/11] fabrics: add CRUD and generate fabrics methods Gabriel Goller
2025-03-04 9:28 ` Stefan Hanreich
2025-03-05 10:20 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH pve-cluster 05/11] cluster: add sdn fabrics config files Gabriel Goller
2025-02-28 12:19 ` Thomas Lamprecht
2025-02-28 12:52 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH pve-network 06/11] add config file and common read/write methods Gabriel Goller
2025-02-14 13:39 ` Gabriel Goller [this message]
2025-02-14 13:39 ` [pve-devel] [PATCH pve-network 08/11] add api endpoints for fabrics Gabriel Goller
2025-03-04 9:51 ` Stefan Hanreich
2025-02-14 13:39 ` [pve-devel] [PATCH pve-manager 09/11] sdn: add Fabrics view Gabriel Goller
2025-03-04 9:57 ` Stefan Hanreich
2025-03-07 15:57 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH pve-manager 10/11] sdn: add fabric edit/delete forms Gabriel Goller
2025-03-04 10:07 ` Stefan Hanreich
2025-03-07 16:04 ` Gabriel Goller
2025-02-14 13:39 ` [pve-devel] [PATCH pve-manager 11/11] network: return loopback interface on network endpoint Gabriel Goller
2025-03-03 16:58 ` [pve-devel] [RFC cluster/manager/network/proxmox{-ve-rs, -perl-rs} 00/11] Add SDN Fabrics Stefan Hanreich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250214133951.344500-8-g.goller@proxmox.com \
--to=g.goller@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.