[pve-devel] [PATCH V2 pve-network 2/7] get_local_vnets: display vnet alias in comments

Alexandre Derumier aderumier at odiso.com
Thu Dec 3 10:19:37 CET 2020


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Network/SDN.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/PVE/Network/SDN.pm b/PVE/Network/SDN.pm
index c0c5672..ed891de 100644
--- a/PVE/Network/SDN.pm
+++ b/PVE/Network/SDN.pm
@@ -188,6 +188,8 @@ sub get_local_vnets {
 
 	my $vnet = PVE::Network::SDN::Vnets::sdn_vnets_config($vnets_cfg, $vnetid);
 	my $zoneid = $vnet->{zone};
+	my $comments = $vnet->{alias};
+
 	my $privs = [ 'SDN.Audit', 'SDN.Allocate' ];
 
 	next if !$zoneid;
@@ -196,7 +198,7 @@ sub get_local_vnets {
 	my $zone_config = PVE::Network::SDN::Zones::sdn_zones_config($zones_cfg, $zoneid);
 
 	next if defined($zone_config->{nodes}) && !$zone_config->{nodes}->{$nodename};
-	$vnets->{$vnetid} = { type => 'vnet', active => '1' };
+	$vnets->{$vnetid} = { type => 'vnet', active => '1', comments => $comments };
     }
 
     return $vnets;
-- 
2.20.1





More information about the pve-devel mailing list