[pve-devel] [PATCH v3 0/3] Add format validator support

Stefan Reiter s.reiter at proxmox.com
Thu Jun 25 13:35:38 CEST 2020


Fixes "cpu" format documentation in man pages by introducing format validators,
which allow custom validation functions to be used together with format hashes.

The plan is to change occurances of hash based formats in parse_property_string
to named formats, so that future validators would be called. Such validators
would enable many formats which currently have no representation in the docs to
be included there.

v2 -> v3:
* include fixed followup patch from Fabian

v1 -> v2:
* Do validation in parse_property_string
* Re-refactor check_format based on Fabian's review
* Validate "cputype" in "pve-cpu-conf", not "pve-vm-cpu-conf"
* Use parse_property_string instead of check_format for parsing in CPUConfig


common: Stefan Reiter (2):
  JSONSchema: add format validator support and cleanup check_format
  JSONSchema: use validator in print_property_string too

 src/PVE/JSONSchema.pm | 92 ++++++++++++++++++++++++++++---------------
 1 file changed, 60 insertions(+), 32 deletions(-)

qemu-server: Stefan Reiter (1):
  fix #2671: include CPU format in man page again

 PVE/QemuServer/CPUConfig.pm | 56 ++++++++++++-------------------------
 1 file changed, 18 insertions(+), 38 deletions(-)

-- 
2.20.1




More information about the pve-devel mailing list