]> git.proxmox.com Git - pve-network.git/commitdiff
get_local_vnets: display vnet alias in comments
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 3 Dec 2020 09:19:37 +0000 (10:19 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Dec 2020 16:58:22 +0000 (17:58 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Network/SDN.pm

index c0c5672a1ffd38c6fea0348cb29e72f47c26632c..ed891de50fb5fea552efefc89e12c9cce524bc9e 100644 (file)
@@ -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;