public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES network 0/2] assert vnet zone exists on create and update
@ 2026-07-03 10:47 Daniel Kral
  2026-07-03 10:47 ` [PATCH network 1/2] prefix specific sdn resource type to existence assertion string Daniel Kral
  2026-07-03 10:47 ` [PATCH network 2/2] api: vnets: assert vnet zone exists on create and update Daniel Kral
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Kral @ 2026-07-03 10:47 UTC (permalink / raw)
  To: pve-devel

If a VNet is created or updated with an empty zone '' or a non-existing
zone identifier, the API handler will die with a slighly confusing error
message:

create sdn vnet object failed: cannot lookup undefined type! at
/usr/share/perl5/PVE/API2/Network/SDN/Vnets.pm line 326.

Therefore, use the helper sdn_zones_config(), which asserts whether the
zone identifier is non-empty and existing.



Daniel Kral (2):
  prefix specific sdn resource type to existence assertion string
  api: vnets: assert vnet zone exists on create and update

 src/PVE/API2/Network/SDN/Vnets.pm  | 8 ++++----
 src/PVE/Network/SDN/Controllers.pm | 2 +-
 src/PVE/Network/SDN/Dns.pm         | 2 +-
 src/PVE/Network/SDN/Ipams.pm       | 2 +-
 src/PVE/Network/SDN/Zones.pm       | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.47.3





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-03 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 10:47 [PATCH-SERIES network 0/2] assert vnet zone exists on create and update Daniel Kral
2026-07-03 10:47 ` [PATCH network 1/2] prefix specific sdn resource type to existence assertion string Daniel Kral
2026-07-03 10:47 ` [PATCH network 2/2] api: vnets: assert vnet zone exists on create and update Daniel Kral

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal