all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox, pve-{common,network,storage} v2 0/5] fix #7077: Improve error messages for ID verification
@ 2026-02-06 16:12 Arthur Bied-Charreton
  2026-02-06 16:12 ` [PATCH pve-common v2 1/1] fix #7077: Change JSON Schema attribute validation order Arthur Bied-Charreton
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arthur Bied-Charreton @ 2026-02-06 16:12 UTC (permalink / raw)
  To: pve-devel

A lot of the logic around verifying ID constraints like their length,
or that they follow a specific pattern, hides in registered format functions,
which makes them invisible in the API docs.

This series addresses this, as well as the not-ideal UX reported in #7077, by
moving some of these checks to the registered JSON schemas and adding explicit
length checks where no schema is defined.

As discussed in v1 [0], this renders some of the registered format functions
obsolete. I did remove formats that I was able to verify are not
depended on anywhere, however in order to keep the scope of this patch
series in check, I did not refactor any of the ones that do have dependants
(i.e., the format is referred to anywhere else than in the call to
`register_standard_option`). 

I would be very thankful for a review by someone with more experience with
those registered formats, as I may have missed dependencies my poor grepping
skills could not catch.

Changes since v1:
- Update JSON schema verification to check length constraints before custom
format verification code and/or regex
- Register length/regex constraints for IDs directly in the
`register_standard_option` calls, if applicable

[0] https://lore.proxmox.com/pve-devel/mp3ggxjqimualakem43bge5szrphz2dyat2wynowsujwl7wcbu@6pf4sbwxam6u/T/#u


pve-common:

Arthur Bied-Charreton (1):
  fix #7077: Change JSON Schema attribute validation order

 src/PVE/JSONSchema.pm | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)


pve-network:

Arthur Bied-Charreton (2):
  fix #7077: Enforce ID format in JSON schema definitions
  sdn: Remove unneeded registered formats

 src/PVE/Network/SDN/Controllers/IsisPlugin.pm |  3 +++
 src/PVE/Network/SDN/Controllers/Plugin.pm     | 17 +++--------------
 src/PVE/Network/SDN/Dns/Plugin.pm             | 15 ++-------------
 src/PVE/Network/SDN/Fabrics.pm                |  3 +++
 src/PVE/Network/SDN/Ipams/Plugin.pm           | 15 ++-------------
 src/PVE/Network/SDN/VnetPlugin.pm             | 17 +++--------------
 src/PVE/Network/SDN/Zones/Plugin.pm           | 17 +++--------------
 7 files changed, 19 insertions(+), 68 deletions(-)


pve-storage:

Arthur Bied-Charreton (1):
  fix #7077: lvm: Improve ID verification error messages

 src/PVE/Storage/Plugin.pm | 5 +++++
 1 file changed, 5 insertions(+)


proxmox:

Arthur Bied-Charreton (1):
  fix #7077: Improve SDN ID validation error messages

 pve-api-types/src/types/verifiers.rs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)


Summary over all repositories:
  10 files changed, 47 insertions(+), 83 deletions(-)

-- 
Generated by murpp 0.9.0



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

end of thread, other threads:[~2026-02-06 16:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-06 16:12 [PATCH proxmox, pve-{common,network,storage} v2 0/5] fix #7077: Improve error messages for ID verification Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-common v2 1/1] fix #7077: Change JSON Schema attribute validation order Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-network v2 1/2] fix #7077: Enforce ID format in JSON schema definitions Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-network v2 2/2] sdn: Remove unneeded registered formats Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH pve-storage v2 1/1] fix #7077: lvm: Improve ID verification error messages Arthur Bied-Charreton
2026-02-06 16:12 ` [PATCH proxmox v2 1/1] fix #7077: Improve SDN ID validation " Arthur Bied-Charreton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal