From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C95D71FF136 for ; Mon, 04 May 2026 18:14:54 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 771A27975; Mon, 4 May 2026 18:12:36 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager v3 26/26] fabrics: node edit: add option to include wireguard interfaces Date: Mon, 4 May 2026 18:11:09 +0200 Message-ID: <20260504161115.408970-27-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260504161115.408970-1-s.hanreich@proxmox.com> References: <20260504161115.408970-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777910982564 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.665 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: PUKPGB2TLHV6YG6OEYDH3S3DZB5VXVVJ X-Message-ID-Hash: PUKPGB2TLHV6YG6OEYDH3S3DZB5VXVVJ X-MailFrom: s.hanreich@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: Because Wireguard interfaces are generated in a file separate from /e/n/i, they do not show up automatically in the PVE interface selector. Since they can be used without issue in some fabrics (everything layer 3 and above), add the option to the node edit component to include wireguard interfaces in the interface selection of the node edit window as well. Signed-off-by: Stefan Hanreich --- www/manager6/sdn/fabrics/NodeEdit.js | 44 ++++++++++++++++++++--- www/manager6/sdn/fabrics/ospf/NodeEdit.js | 1 + 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/www/manager6/sdn/fabrics/NodeEdit.js b/www/manager6/sdn/fabrics/NodeEdit.js index 55dce3043..4b3967a17 100644 --- a/www/manager6/sdn/fabrics/NodeEdit.js +++ b/www/manager6/sdn/fabrics/NodeEdit.js @@ -30,6 +30,7 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', { additionalItems: [], addAnotherCallback: undefined, + includeWireguardInterfaces: false, initComponent: function () { let me = this; @@ -127,17 +128,50 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', { loadNodeInterfaces: async function () { let me = this; - let req = await Proxmox.Async.api2({ - url: `/api2/extjs/nodes/${me.nodeId}/network`, - method: 'GET', - }); + let requests = [ + Proxmox.Async.api2({ + url: `/api2/extjs/nodes/${me.nodeId}/network`, + method: 'GET', + }), + ]; + + if (me.includeWireguardInterfaces) { + requests.push( + Proxmox.Async.api2({ + url: `/api2/extjs/cluster/sdn/fabrics/node/`, + method: 'GET', + }), + ); + } - return req.result.data.map((iface) => ({ + let result = await Promise.all(requests); + + let interfaces = result[0].result.data.map((iface) => ({ name: iface.iface, type: iface.type, ip: iface.cidr, ipv6: iface.cidr6, })); + + if (me.includeWireguardInterfaces) { + let wireguardNodes = result[1].result.data + .filter((node) => { + return node.node_id === me.nodeId && node.protocol === 'wireguard' ; + }); + + for (const node of wireguardNodes) { + for (const ifacePropertyString of node.interfaces) { + let iface = PVE.Parser.parsePropertyString(ifacePropertyString); + + interfaces.push({ + name: iface.name, + type: 'wireguard', + }); + } + } + } + + return interfaces; }, load: function () { diff --git a/www/manager6/sdn/fabrics/ospf/NodeEdit.js b/www/manager6/sdn/fabrics/ospf/NodeEdit.js index 370aee191..bf96ee95f 100644 --- a/www/manager6/sdn/fabrics/ospf/NodeEdit.js +++ b/www/manager6/sdn/fabrics/ospf/NodeEdit.js @@ -3,6 +3,7 @@ Ext.define('PVE.sdn.Fabric.Ospf.Node.Edit', { protocol: 'ospf', hasIpv6Support: false, + includeWireguardInterfaces: true, extraRequestParams: { protocol: 'ospf', -- 2.47.3