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 F33221FF185 for ; Mon, 17 Nov 2025 15:01:55 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0311F1A5AF; Mon, 17 Nov 2025 15:01:59 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Date: Mon, 17 Nov 2025 15:01:07 +0100 Message-ID: <20251117140121.160192-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1763388056696 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.003 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 Subject: [pve-devel] [PATCH network] api: sdn: show full device name of firewall bridge ports X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The bridges endpoint also returns the firewall ports of the bridges. >From the firewall port interface we extract the vmid and the vm network device index. Instead of just showing a number, return the whole `net{index}` name. This makes it easier to understand as the vm configuration also shows `net{index}` as the key of the interfaces. Signed-off-by: Gabriel Goller --- src/PVE/API2/Network/SDN/Nodes/Zone.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/Network/SDN/Nodes/Zone.pm b/src/PVE/API2/Network/SDN/Nodes/Zone.pm index 43acbe9c203f..f86ad1ead271 100644 --- a/src/PVE/API2/Network/SDN/Nodes/Zone.pm +++ b/src/PVE/API2/Network/SDN/Nodes/Zone.pm @@ -180,7 +180,7 @@ __PACKAGE__->register_method({ index => { description => 'The index of the guests network device that this interface belongs to.', - type => 'number', + type => 'string', optional => 1, }, primary_vlan => { @@ -271,7 +271,7 @@ __PACKAGE__->register_method({ if ($ifname =~ m/^(?:fwpr(\d+)p(\d+)|veth(\d+)i(\d+)|tap(\d+)i(\d+))$/) { $port->{vmid} = $1; - $port->{index} = $2; + $port->{index} = "net$2"; } if ($result->{$master}->{vlan_filtering} == 1) { -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel