* [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF
@ 2026-05-04 16:31 Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting Stefan Hanreich
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
This patch series is based on the route maps series [1].
## Introduction
This patch series adds support for configuring redistribution settings for OSPF
fabrics. This allows redistributing routes learned from other sources via an
OSPF fabric.
## Motivation
Currently, nodes in OSPF fabrics only announce the route of the loopback
interfaces / point-to-point links that are participating in the fabric. With
this patch series, users can choose to redistribute local / kernel / connected
routes in addition to the fabric-specific routes. It also allows for
redistributing routes learned via BGP. Together with the BGP fabric, this allows
for utilizing multiple routing protocols, e.g. when using OSPF as IGP but BGP
for interconnecting independent clusters.
## Dependencies
* perl-rs needs to be bumped with new ve-rs version
* pve-network requires proxmox-perl-rs
* pve-manager requires pve-network
proxmox-ve-rs:
Stefan Hanreich (5):
frr: ospf: add redistribute setting
frr-templates: render redistribute setting
ve-config: add redistribute setting to ospf section config
ve-config: use constructor instead of instantiating struct
ve-config: ospf: generate redistribute config
proxmox-frr-templates/templates/ospfd.jinja | 4 +
proxmox-frr/src/ser/ospf.rs | 36 +++++++-
proxmox-ve-config/src/sdn/fabric/frr.rs | 16 +++-
proxmox-ve-config/src/sdn/fabric/mod.rs | 14 ++-
.../fabric/section_config/protocol/ospf.rs | 91 +++++++++++++++++++
5 files changed, 156 insertions(+), 5 deletions(-)
pve-network:
Stefan Hanreich (1):
fabrics: ospf: add redistribute to api types
src/PVE/Network/SDN/Fabrics.pm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
pve-manager:
Stefan Hanreich (3):
ui: sdn: fabrics: add redistribution grid component
ui: sdn: fabric edit: allow defining multiple tabs
ui: sdn: ospf fabric: add redistribution grid to ospf fabric
www/manager6/Makefile | 1 +
www/manager6/sdn/fabrics/FabricEdit.js | 22 ++-
.../sdn/fabrics/RedistributionGrid.js | 173 ++++++++++++++++++
www/manager6/sdn/fabrics/ospf/FabricEdit.js | 19 ++
4 files changed, 214 insertions(+), 1 deletion(-)
create mode 100644 www/manager6/sdn/fabrics/RedistributionGrid.js
Summary over all repositories:
10 files changed, 399 insertions(+), 6 deletions(-)
--
Generated by murpp 0.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 2/9] frr-templates: render " Stefan Hanreich
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
Implements redistributing routes from other protocols into the OSPF
fabric. This can be useful when utilizing multiple routing protocol on
the same node, but also if routes in addition to the loopback
interface of the fabric should be distributed via OSPF.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-frr/src/ser/ospf.rs | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/proxmox-frr/src/ser/ospf.rs b/proxmox-frr/src/ser/ospf.rs
index 8ab9136..c18725e 100644
--- a/proxmox-frr/src/ser/ospf.rs
+++ b/proxmox-frr/src/ser/ospf.rs
@@ -44,6 +44,35 @@ impl Area {
}
}
+#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+#[serde(rename_all = "lowercase")]
+/// OSPF redistribution source protocols
+pub enum OspfRedistributionSource {
+ /// redistribute BGP routes
+ Bgp,
+ /// redistribute connected routes
+ Connected,
+ /// redistribute IS-IS routes
+ Isis,
+ /// redistribute kernel routes
+ Kernel,
+ /// redistribute Openfabric routes
+ Openfabric,
+ /// redistribute OSPF routes
+ Ospf,
+ /// redistribute static routes
+ Static,
+}
+
+#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+pub struct OspfRedistribution {
+ pub source: OspfRedistributionSource,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub metric: Option<u32>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub route_map: Option<String>,
+}
+
/// The OSPF router properties.
///
/// Currently the only property of a OSPF router is the router_id. The router_id is used to
@@ -53,11 +82,16 @@ impl Area {
#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
pub struct OspfRouter {
pub router_id: Ipv4Addr,
+ #[serde(default)]
+ pub redistribute: Vec<OspfRedistribution>,
}
impl OspfRouter {
pub fn new(router_id: Ipv4Addr) -> Self {
- Self { router_id }
+ Self {
+ router_id,
+ redistribute: Vec::new(),
+ }
}
pub fn router_id(&self) -> &Ipv4Addr {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH proxmox-ve-rs 2/9] frr-templates: render redistribute setting
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 3/9] ve-config: add redistribute setting to ospf section config Stefan Hanreich
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-frr-templates/templates/ospfd.jinja | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxmox-frr-templates/templates/ospfd.jinja b/proxmox-frr-templates/templates/ospfd.jinja
index 0a59623..4ba609f 100644
--- a/proxmox-frr-templates/templates/ospfd.jinja
+++ b/proxmox-frr-templates/templates/ospfd.jinja
@@ -3,6 +3,10 @@
!
router ospf
ospf router-id {{ ospf.router.router_id }}
+{% for redistribution in ospf.router.redistribute %}
+ redistribute {{ redistribution.source }}{% if redistribution.metric is defined %} metric {{ redistribution.metric }}{% endif %} {% if redistribution.route_map is defined %} route-map {{ redistribution.route_map }}{% endif %}
+
+{% endfor %}
exit
{% endif %}
{% for interface_name, interface_config in ospf.interfaces|items %}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH proxmox-ve-rs 3/9] ve-config: add redistribute setting to ospf section config
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 2/9] frr-templates: render " Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct Stefan Hanreich
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
The settings are global to the fabric, which means that every node
participating in the fabric will have the same redistribution
settings. For now this seems sufficient, but if the need arises it is
always possible to implement a node-level override.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-ve-config/src/sdn/fabric/mod.rs | 14 ++++-
.../fabric/section_config/protocol/ospf.rs | 59 +++++++++++++++++++
2 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/proxmox-ve-config/src/sdn/fabric/mod.rs b/proxmox-ve-config/src/sdn/fabric/mod.rs
index c4cf10c..a30b346 100644
--- a/proxmox-ve-config/src/sdn/fabric/mod.rs
+++ b/proxmox-ve-config/src/sdn/fabric/mod.rs
@@ -845,7 +845,12 @@ impl FabricConfig {
let FabricSectionUpdater::<OspfPropertiesUpdater, OspfDeletableProperties> {
ip_prefix,
ip6_prefix,
- properties: OspfPropertiesUpdater { area, route_filter },
+ properties:
+ OspfPropertiesUpdater {
+ area,
+ route_filter,
+ redistribute,
+ },
delete,
} = updater;
@@ -865,6 +870,10 @@ impl FabricConfig {
fabric_section.properties.route_filter = Some(route_filter);
}
+ if let Some(redistribute) = redistribute {
+ fabric_section.properties.redistribute = redistribute;
+ }
+
for property in delete {
match property {
FabricDeletableProperties::IpPrefix => {
@@ -878,6 +887,9 @@ impl FabricConfig {
) => {
fabric_section.properties.route_filter = None;
}
+ FabricDeletableProperties::Protocol(
+ OspfDeletableProperties::Redistribute,
+ ) => fabric_section.properties.redistribute = Vec::new(),
}
}
diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
index 793e536..8f0b57c 100644
--- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
+++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
@@ -14,6 +14,54 @@ use crate::sdn::fabric::FabricConfigError;
use crate::sdn::prefix_list::PrefixListId;
#[api]
+#[derive(Debug, Clone, Serialize, Deserialize, Hash, Copy)]
+#[serde(rename_all = "lowercase")]
+/// OSPF redistribution source protocols
+pub enum OspfRedistributionSource {
+ /// redistribute BGP routes
+ Bgp,
+ /// redistribute connected routes
+ Connected,
+ /// redistribute IS-IS routes
+ Isis,
+ /// redistribute kernel routes
+ Kernel,
+ /// redistribute Openfabric routes
+ Openfabric,
+ /// redistribute OSPF routes
+ Ospf,
+ /// redistribute static routes
+ Static,
+}
+
+#[api]
+#[derive(Debug, Clone, Serialize, Deserialize, Hash)]
+#[serde(rename_all = "kebab-case")]
+/// An OSPF redistribution
+pub struct OspfRedistribution {
+ /// The source protocol for this redistribution
+ pub(crate) source: OspfRedistributionSource,
+ /// The metric that should be applied to redistributed routes
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) metric: Option<u32>,
+ /// The name of the route map used for filtering redistributed routes
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) route_map: Option<String>,
+}
+
+#[api(
+ properties: {
+ redistribute: {
+ type: Array,
+ optional: true,
+ items: {
+ type: String,
+ description: "An OSPF redistribution source.",
+ format: &ApiStringFormat::PropertyString(&OspfRedistribution::API_SCHEMA),
+ }
+ }
+ }
+)]
#[derive(Debug, Clone, Serialize, Deserialize, Updater, Hash)]
/// Properties for an Ospf fabric.
pub struct OspfProperties {
@@ -25,15 +73,25 @@ pub struct OspfProperties {
/// besides the configured IP prefix.
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) route_filter: Option<PrefixListId>,
+
+ /// Redistribution configuration
+ #[serde(default, skip_serializing_if = "Vec::is_empty")]
+ #[updater(serde(skip_serializing_if = "Option::is_none"))]
+ pub(crate) redistribute: Vec<PropertyString<OspfRedistribution>>,
}
impl OspfProperties {
pub fn set_area(&mut self, value: Area) {
self.area = value;
}
+
pub fn area(&self) -> &Area {
&self.area
}
+
+ pub fn redistributions(&self) -> impl IntoIterator<Item = &OspfRedistribution> {
+ self.redistribute.iter().map(Deref::deref)
+ }
}
impl Validatable for FabricSection<OspfProperties> {
@@ -60,6 +118,7 @@ impl Validatable for FabricSection<OspfProperties> {
#[serde(rename_all = "snake_case")]
pub enum OspfDeletableProperties {
RouteFilter,
+ Redistribute,
}
#[api(
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (2 preceding siblings ...)
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 3/9] ve-config: add redistribute setting to ospf section config Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 5/9] ve-config: ospf: generate redistribute config Stefan Hanreich
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
This makes it easier to add optional properties to the struct without
having to adjust this call site everytime the internal representation
changes.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-ve-config/src/sdn/fabric/frr.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox-ve-config/src/sdn/fabric/frr.rs b/proxmox-ve-config/src/sdn/fabric/frr.rs
index ca43cf9..fd99c3c 100644
--- a/proxmox-ve-config/src/sdn/fabric/frr.rs
+++ b/proxmox-ve-config/src/sdn/fabric/frr.rs
@@ -287,7 +287,7 @@ pub fn build_fabric(
/// Helper that builds a OSPF router with a the router_id.
fn build_ospf_router(router_id: Ipv4Addr) -> Result<OspfRouter, anyhow::Error> {
- Ok(ser::ospf::OspfRouter { router_id })
+ Ok(OspfRouter::new(router_id))
}
/// Helper that builds a OpenFabric router from a fabric_id and a [`Net`].
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH proxmox-ve-rs 5/9] ve-config: ospf: generate redistribute config
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (3 preceding siblings ...)
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types Stefan Hanreich
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
Implements conversion from the section config types to the proxmox-frr
types and use the conversion trait to generate the required FRR
configuration for distributing routes.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
proxmox-ve-config/src/sdn/fabric/frr.rs | 14 ++++++--
.../fabric/section_config/protocol/ospf.rs | 32 +++++++++++++++++++
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/proxmox-ve-config/src/sdn/fabric/frr.rs b/proxmox-ve-config/src/sdn/fabric/frr.rs
index fd99c3c..40e346f 100644
--- a/proxmox-ve-config/src/sdn/fabric/frr.rs
+++ b/proxmox-ve-config/src/sdn/fabric/frr.rs
@@ -3,7 +3,7 @@ use std::net::{IpAddr, Ipv4Addr};
use tracing;
use proxmox_frr::ser::openfabric::{OpenfabricInterface, OpenfabricRouter, OpenfabricRouterName};
-use proxmox_frr::ser::ospf::{self, OspfInterface, OspfRouter};
+use proxmox_frr::ser::ospf::{self, OspfInterface, OspfRedistribution, OspfRouter};
use proxmox_frr::ser::route_map::{AccessListName, RouteMapEntry, RouteMapMatch, RouteMapSet};
use proxmox_frr::ser::{self, FrrConfig, FrrProtocol, FrrWord, Interface, InterfaceName};
use proxmox_network_types::ip_address::Cidr;
@@ -202,7 +202,17 @@ pub fn build_fabric(
let frr_area = ser::ospf::Area::new(frr_word_area)?;
if frr_config.ospf.router.is_none() {
- frr_config.ospf.router = Some(build_ospf_router(*router_id)?);
+ let mut ospf_router = build_ospf_router(*router_id)?;
+
+ ospf_router.redistribute = fabric
+ .properties()
+ .redistributions()
+ .into_iter()
+ .cloned()
+ .map(OspfRedistribution::from)
+ .collect();
+
+ frr_config.ospf.router = Some(ospf_router);
}
// Add dummy interface
diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
index 8f0b57c..2a6ba6b 100644
--- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
+++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
@@ -49,6 +49,38 @@ pub struct OspfRedistribution {
pub(crate) route_map: Option<String>,
}
+#[cfg(feature = "frr")]
+mod frr {
+ use proxmox_frr::ser::ospf::OspfRedistribution as FrrOspfRedistribution;
+ use proxmox_frr::ser::ospf::OspfRedistributionSource as FrrOspfRedistributionSource;
+
+ use super::*;
+
+ impl From<OspfRedistribution> for FrrOspfRedistribution {
+ fn from(value: OspfRedistribution) -> Self {
+ Self {
+ source: value.source.into(),
+ metric: value.metric,
+ route_map: value.route_map.into(),
+ }
+ }
+ }
+
+ impl From<OspfRedistributionSource> for FrrOspfRedistributionSource {
+ fn from(value: OspfRedistributionSource) -> Self {
+ match value {
+ OspfRedistributionSource::Bgp => FrrOspfRedistributionSource::Bgp,
+ OspfRedistributionSource::Connected => FrrOspfRedistributionSource::Connected,
+ OspfRedistributionSource::Isis => FrrOspfRedistributionSource::Isis,
+ OspfRedistributionSource::Kernel => FrrOspfRedistributionSource::Kernel,
+ OspfRedistributionSource::Openfabric => FrrOspfRedistributionSource::Openfabric,
+ OspfRedistributionSource::Ospf => FrrOspfRedistributionSource::Ospf,
+ OspfRedistributionSource::Static => FrrOspfRedistributionSource::Static,
+ }
+ }
+ }
+}
+
#[api(
properties: {
redistribute: {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (4 preceding siblings ...)
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 5/9] ve-config: ospf: generate redistribute config Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 7/9] ui: sdn: fabrics: add redistribution grid component Stefan Hanreich
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
Used for configuring the redistribute settings of the respective FRR
OSPF router.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/Network/SDN/Fabrics.pm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm
index c33c962..4de0838 100644
--- a/src/PVE/Network/SDN/Fabrics.pm
+++ b/src/PVE/Network/SDN/Fabrics.pm
@@ -511,6 +511,35 @@ sub fabric_properties {
minimum => 0,
maximum => 65535,
},
+ redistribute => {
+ # coerce this value into an array before parsing (oneOf workaround)
+ type => 'array',
+ 'type-property' => 'protocol',
+ oneOf => [
+ {
+ type => 'array',
+ 'instance-types' => ['ospf'],
+ items => {
+ type => 'string',
+ format => {
+ source => {
+ type => 'string',
+ description =>
+ 'The protocol from which to redistribute routes from.',
+ enum => [
+ 'bgp',
+ 'connected',
+ 'kernel',
+ 'ospf',
+ 'static',
+ ],
+ },
+ },
+ },
+ optional => 1,
+ },
+ ],
+ },
};
if ($update) {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH pve-manager 7/9] ui: sdn: fabrics: add redistribution grid component
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (5 preceding siblings ...)
2026-05-04 16:31 ` [PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 8/9] ui: sdn: fabric edit: allow defining multiple tabs Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 9/9] ui: sdn: ospf fabric: add redistribution grid to ospf fabric Stefan Hanreich
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
This component can be used to configure the redistribution settings
for fabrics that utilize FRR. Since the redistribution settings are
basically the same for each protocol, except for the allowed source
protocols, implement a generic component where it is possible to
override the possible source protocols.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/Makefile | 1 +
.../sdn/fabrics/RedistributionGrid.js | 173 ++++++++++++++++++
2 files changed, 174 insertions(+)
create mode 100644 www/manager6/sdn/fabrics/RedistributionGrid.js
diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index 002ac9733..1ad77f3d3 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -337,6 +337,7 @@ JSSRC= \
sdn/fabrics/InterfacePanel.js \
sdn/fabrics/NodeEdit.js \
sdn/fabrics/FabricEdit.js \
+ sdn/fabrics/RedistributionGrid.js \
sdn/fabrics/openfabric/InterfacePanel.js \
sdn/fabrics/openfabric/NodeEdit.js \
sdn/fabrics/openfabric/FabricEdit.js \
diff --git a/www/manager6/sdn/fabrics/RedistributionGrid.js b/www/manager6/sdn/fabrics/RedistributionGrid.js
new file mode 100644
index 000000000..8580c4793
--- /dev/null
+++ b/www/manager6/sdn/fabrics/RedistributionGrid.js
@@ -0,0 +1,173 @@
+Ext.define('PVE.sdn.Fabric.OspfRedistribution', {
+ extend: 'Ext.data.Model',
+ fields: ['source'],
+});
+
+Ext.define('PVE.sdn.Fabric.RedistributionGrid', {
+ alias: 'widget.pveSDNRedistributionGrid',
+ extend: 'Ext.grid.Panel',
+ mixins: ['Ext.form.field.Field'],
+
+ config: {
+ sources: [],
+ additionalColumns: [],
+ },
+
+ store: {
+ model: 'PVE.sdn.Fabric.OspfRedistribution',
+ listeners: {
+ update: 'handleUpdate',
+ }
+ },
+
+ tbar: [
+ '->',
+ {
+ text: gettext('Add'),
+ handler: 'addRedistribution',
+ }
+ ],
+
+ border: false,
+
+ columns: [],
+
+ controller: {
+ xclass: 'Ext.app.ViewController',
+
+ addRedistribution: function() {
+ let me = this;
+
+ let source = me.getView().getSources()[0][0];
+
+ me.getView().getStore().add({
+ source,
+ });
+
+ me.handleUpdate();
+ },
+
+ deleteRedistribution: function (table, rI, cI, item, e, rec) {
+ let me = this;
+ me.getView().getStore().remove(rec);
+ me.handleUpdate();
+ },
+
+ handleUpdate: function() {
+ let me = this;
+ me.getView().checkChange();
+ }
+ },
+
+ initComponent: function() {
+ let me = this;
+
+ if (me.getSources().length === 0) {
+ throw "must define at least one redistribution source!";
+ }
+
+ me.columns = [
+ {
+ text: gettext("Source"),
+ xtype: 'widgetcolumn',
+ flex: 1,
+ widget: {
+ xtype: 'proxmoxKVComboBox',
+ comboItems: me.getSources(),
+ bind: {
+ value: '{record.source}',
+ },
+ listeners: {
+ select: 'handleUpdate',
+ },
+ },
+ },
+ {
+ text: gettext("Route Map"),
+ xtype: 'widgetcolumn',
+ flex: 1,
+ widget: {
+ xtype: 'pveSDNRouteMapSelector',
+ bind: {
+ value: '{record.route_map}',
+ },
+ listeners: {
+ select: 'handleUpdate',
+ },
+ },
+ },
+ ...me.getAdditionalColumns(),
+ {
+ text: gettext("Action"),
+ xtype: 'actioncolumn',
+ width: 100,
+ items: [
+ {
+ tooltip: gettext('Delete'),
+ handler: 'deleteRedistribution',
+ iconCls: 'fa critical fa-trash-o',
+ },
+ ],
+ },
+ ];
+
+ me.callParent();
+ },
+
+ isEqual: function(value1, value2) {
+ return JSON.stringify(value1) === JSON.stringify(value2);
+ },
+
+ getValue: function() {
+ let me = this;
+
+ return me.getStore().getData().items.map((record) => {
+ let data = structuredClone(record.data);
+ delete data.id;
+
+ return PVE.Parser.printPropertyString(data, undefined);
+ });
+ },
+
+ setValue: function(value) {
+ let me = this;
+
+ me.getStore().setData(value.map((item) => PVE.Parser.parsePropertyString(item)));
+ me.resetOriginalValue();
+ },
+
+ getSubmitData: function () {
+ let me = this;
+
+ let name = me.getName();
+ let value = me.getValue();
+
+ if (value.length === 0 && !me.isCreate) {
+ return {
+ delete: name,
+ };
+ }
+
+ return {
+ [name]: value,
+ };
+ },
+
+ getErrors: function(value) {
+ let me = this;
+
+ let errors = [];
+ let sourceCount = {};
+
+ for (const record of me.getStore().getData().items) {
+ sourceCount[record.data.source] ??= 0;
+ sourceCount[record.data.source]++;
+
+ if (sourceCount[record.data.source] === 2) {
+ errors.push(`Duplicate source: ${record.data.source}`);
+ }
+ }
+
+ return errors;
+ }
+});
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH pve-manager 8/9] ui: sdn: fabric edit: allow defining multiple tabs
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (6 preceding siblings ...)
2026-05-04 16:31 ` [PATCH pve-manager 7/9] ui: sdn: fabrics: add redistribution grid component Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 9/9] ui: sdn: ospf fabric: add redistribution grid to ospf fabric Stefan Hanreich
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
This allows for adding multiple tabs to the fabric edit window, which
can be used to include additional settings to the create/edit window
without cluttering the main view too much. The first use case is to
add support for route redistribution to the UI in subsequent commits.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/sdn/fabrics/FabricEdit.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/www/manager6/sdn/fabrics/FabricEdit.js b/www/manager6/sdn/fabrics/FabricEdit.js
index 6111bbb51..43a402a99 100644
--- a/www/manager6/sdn/fabrics/FabricEdit.js
+++ b/www/manager6/sdn/fabrics/FabricEdit.js
@@ -37,6 +37,7 @@ Ext.define('PVE.sdn.Fabric.Fabric.Edit', {
],
additionalItems: [],
+ additionalTabs: [],
initComponent: function () {
let me = this;
@@ -97,7 +98,26 @@ Ext.define('PVE.sdn.Fabric.Fabric.Edit', {
);
}
- me.items.push(...me.additionalItems);
+ if (me.additionalTabs.length > 0) {
+ let items = [...me.items, ...me.additionalItems];
+
+ let iPanel = Ext.create('Proxmox.panel.InputPanel', {
+ title: gettext('Fabric'),
+ items,
+ });
+
+ me.bodyPadding = 0;
+
+ me.items = [
+ {
+ xtype: 'tabpanel',
+ bodyPadding: 10,
+ items: [iPanel, ...me.additionalTabs],
+ },
+ ];
+ } else {
+ me.items.push(...me.additionalItems);
+ }
me.callParent();
},
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH pve-manager 9/9] ui: sdn: ospf fabric: add redistribution grid to ospf fabric
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
` (7 preceding siblings ...)
2026-05-04 16:31 ` [PATCH pve-manager 8/9] ui: sdn: fabric edit: allow defining multiple tabs Stefan Hanreich
@ 2026-05-04 16:31 ` Stefan Hanreich
8 siblings, 0 replies; 10+ messages in thread
From: Stefan Hanreich @ 2026-05-04 16:31 UTC (permalink / raw)
To: pve-devel
Add settings for configuring route redistribution to the ospf fabric
edit dialogue by utilizing the newly introduced redistribution grid as
well as the new option to add additional tabs to the fabric edit
dialogue.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/sdn/fabrics/ospf/FabricEdit.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/www/manager6/sdn/fabrics/ospf/FabricEdit.js b/www/manager6/sdn/fabrics/ospf/FabricEdit.js
index 3ab9bad82..6ff791a36 100644
--- a/www/manager6/sdn/fabrics/ospf/FabricEdit.js
+++ b/www/manager6/sdn/fabrics/ospf/FabricEdit.js
@@ -28,4 +28,23 @@ Ext.define('PVE.sdn.Fabric.Ospf.Fabric.Edit', {
skipEmptyText: true,
},
],
+
+ additionalTabs: [
+ {
+ xtype: 'inputpanel',
+ title: gettext('Route Redistribution'),
+ items: [
+ {
+ xtype: 'pveSDNRedistributionGrid',
+ name: 'redistribute',
+ sources: [
+ ['bgp', gettext('BGP')],
+ ['connected', gettext('Connected')],
+ ['static', gettext('Static')],
+ ['kernel', gettext('Kernel')],
+ ],
+ },
+ ],
+ }
+ ],
});
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-05-04 16:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04 16:31 [PATCH manager/network/proxmox-ve-rs 0/9] Implement route redistribution for OSPF Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 1/9] frr: ospf: add redistribute setting Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 2/9] frr-templates: render " Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 3/9] ve-config: add redistribute setting to ospf section config Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 4/9] ve-config: use constructor instead of instantiating struct Stefan Hanreich
2026-05-04 16:31 ` [PATCH proxmox-ve-rs 5/9] ve-config: ospf: generate redistribute config Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 7/9] ui: sdn: fabrics: add redistribution grid component Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 8/9] ui: sdn: fabric edit: allow defining multiple tabs Stefan Hanreich
2026-05-04 16:31 ` [PATCH pve-manager 9/9] ui: sdn: ospf fabric: add redistribution grid to ospf fabric Stefan Hanreich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox