From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 218B41FF0AA for ; Fri, 21 Aug 2026 16:05:01 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D384D2164D; Fri, 21 Aug 2026 16:04:23 +0200 (CEST) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH pve-network 12/15] api: sdn: allow EVPN zones as fabric VRFs Date: Fri, 21 Aug 2026 16:03:56 +0200 Message-ID: <20260821140404.322081-13-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260821140404.322081-1-g.goller@proxmox.com> References: <20260821140404.322081-1-g.goller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787321023581 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.787 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: RVJEPJTQEGU6KLUR67J4ZH5K7TAEMFZJ X-Message-ID-Hash: RVJEPJTQEGU6KLUR67J4ZH5K7TAEMFZJ X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Accept EVPN zones as the VRF provider for BGP and OSPF fabrics. EVPN zones always have a dedicated VRF, so only simple zones need the default-vrf check. Use a generic validation error and API description now that fabric VRFs are not limited to simple zones. Signed-off-by: Gabriel Goller --- src/PVE/API2/Network/SDN/Fabrics/Fabric.pm | 6 +++--- src/PVE/Network/SDN/Fabrics.pm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/API2/Network/SDN/Fabrics/Fabric.pm b/src/PVE/API2/Network/SDN/Fabrics/Fabric.pm index e381dc2a08fb..2ef55259ede3 100644 --- a/src/PVE/API2/Network/SDN/Fabrics/Fabric.pm +++ b/src/PVE/API2/Network/SDN/Fabrics/Fabric.pm @@ -39,10 +39,10 @@ sub validate_fabric_zone { my $zone = PVE::Network::SDN::Zones::get_zone($zone_id); raise_param_exc({ zone => "zone '$zone_id' does not exist" }) if !$zone; - raise_param_exc({ zone => "zone '$zone_id' is not a simple zone" }) - if $zone->{type} ne 'simple'; + raise_param_exc({ zone => "zone '$zone_id' does not provide a dedicated VRF" }) + if $zone->{type} ne 'simple' && $zone->{type} ne 'evpn'; raise_param_exc({ zone => "zone '$zone_id' is configured to use the default VRF" }) - if $zone->{'default-vrf'} // 1; + if $zone->{type} eq 'simple' && ($zone->{'default-vrf'} // 1); if ($config) { PVE::Network::SDN::Fabrics::assert_fabric_nodes_in_zone( diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm index 573cb0b1d197..e9419d718dbb 100644 --- a/src/PVE/Network/SDN/Fabrics.pm +++ b/src/PVE/Network/SDN/Fabrics.pm @@ -489,7 +489,7 @@ sub fabric_properties { zone => get_standard_option( 'pve-sdn-zone-id', { - description => 'Simple zone whose VRF contains this fabric.', + description => 'SDN zone whose VRF contains this fabric.', 'type-property' => 'protocol', 'instance-types' => ['bgp', 'ospf'], optional => 1, -- 2.47.3