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 <[email protected]> --- 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 [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
