[PATCH pve-network 6/9] fabrics: ospf: add redistribute to api types

Stefan Hanreich
2026-05-04T16:32:38Z

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