* [pve-devel] [PATCH pve-network] api: vnet: fix warning in vnet API
@ 2023-11-27 10:23 Stefan Hanreich
2023-11-29 9:55 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hanreich @ 2023-11-27 10:23 UTC (permalink / raw)
To: pve-devel
If zone is not set, we also check the pending changes for a zone key,
since it is set as pending when the Vnet settings have not yet been
applied.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/API2/Network/SDN/Vnets.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/API2/Network/SDN/Vnets.pm b/src/PVE/API2/Network/SDN/Vnets.pm
index 57de295..05915f6 100644
--- a/src/PVE/API2/Network/SDN/Vnets.pm
+++ b/src/PVE/API2/Network/SDN/Vnets.pm
@@ -123,7 +123,7 @@ __PACKAGE__->register_method ({
foreach my $id (@sids) {
my $privs = [ 'SDN.Audit', 'SDN.Allocate' ];
my $scfg = &$api_sdn_vnets_config($cfg, $id);
- my $zoneid = $scfg->{zone};
+ my $zoneid = $scfg->{zone} // $scfg->{pending}->{zone};
next if !$rpcenv->check_any($authuser, "/sdn/zones/$zoneid/$id", $privs, 1);
push @$res, $scfg;
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH pve-network] api: vnet: fix warning in vnet API
2023-11-27 10:23 [pve-devel] [PATCH pve-network] api: vnet: fix warning in vnet API Stefan Hanreich
@ 2023-11-29 9:55 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-11-29 9:55 UTC (permalink / raw)
To: Proxmox VE development discussion, Stefan Hanreich
Am 27/11/2023 um 11:23 schrieb Stefan Hanreich:
> If zone is not set, we also check the pending changes for a zone key,
> since it is set as pending when the Vnet settings have not yet been
> applied.
>
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---
> src/PVE/API2/Network/SDN/Vnets.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-29 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-27 10:23 [pve-devel] [PATCH pve-network] api: vnet: fix warning in vnet API Stefan Hanreich
2023-11-29 9:55 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox