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 565471FF0DA for ; Thu, 19 Nov 2026 20:43:11 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 05463218CE; Thu, 19 Nov 2026 20:42:00 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-widget-toolkit v3 23/28] ui: network: allow selecting a VRF for host interfaces Date: Thu, 19 Nov 2026 20:41:09 +0100 Message-ID: <20261119194116.575520-24-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261119194116.575520-1-g.goller@proxmox.com> References: <20261119194116.575520-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: 1795117283089 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.226 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: 25VHPLUD5IIIOHRIFPEHM5PXJ3QS57LF X-Message-ID-Hash: 25VHPLUD5IIIOHRIFPEHM5PXJ3QS57LF 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: Let applications offer VRF membership alongside the other host interface settings without introducing SDN-specific dependencies into the toolkit. Signed-off-by: Gabriel Goller --- src/node/NetworkEdit.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/node/NetworkEdit.js b/src/node/NetworkEdit.js index 1a3e6d3a8666..82c6eb6da3c3 100644 --- a/src/node/NetworkEdit.js +++ b/src/node/NetworkEdit.js @@ -8,6 +8,9 @@ Ext.define('Proxmox.node.NetworkEdit', { // Show alternative names below normal name showAltNames: false, + // Optional selector field config for assigning interfaces to a VRF. + vrfSelector: undefined, + initComponent: function () { let me = this; @@ -299,6 +302,20 @@ Ext.define('Proxmox.node.NetworkEdit', { }); } + // OVS interfaces cannot be VRF members + if (me.vrfSelector && !me.iftype.startsWith('OVS')) { + column2.push({ + ...me.vrfSelector, + fieldLabel: gettext('VRF'), + emptyText: gettext('No override'), + name: 'vrf', + nodename: me.nodename, + allowBlank: true, + skipEmptyText: true, + deleteEmpty: !me.isCreate, + }); + } + column2.push({ xtype: 'textfield', fieldLabel: gettext('Comment'), @@ -472,6 +489,9 @@ Ext.define('Proxmox.node.NetworkEdit', { me.down('field[name=altnames]').setVisible(false); } me.setValues(data); + if (data['vrf-readonly']) { + me.down('field[name=vrf]')?.setDisabled(true); + } me.isValid(); // trigger validation }, }); -- 2.47.3