[pve-devel] [PATCH pve-common 0/6] typetext updates

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Sep 22 13:45:38 CEST 2015

First patch is a re-send - did I miss something or did you forget to
apply it?

This now adds a parse_property_string function which should be usable
as a replacement for where we parse comma-separated lists of key-value
pairs. That way we have one generic parser with schema based
verification, by simply using a 'string' type with a schema hash as

I'm not 100% sure about the 'default_key' property part, though.
Since we often have an implied key (eg you don't need to use `-mp0
volume=local:foo`, but can simply use `-mp0 local:foo`), I made
the functions check for a `default_key` boolean value inside the
format schema.

Wolfgang Bumiller (6):
  JSONSchema::generate_typetext: raw typetext support
  generate_typetext: better handling of only-optional cases
  Added JSONSchema::parse_property_string
  JSONSchema: verify comma-separated property strings
  JSONSchema::generate_typetext: default_key support
  PodParser: use generate_typetext

 src/PVE/JSONSchema.pm | 85 +++++++++++++++++++++++++++++++++++++++++++++------
 src/PVE/PodParser.pm  |  5 +++
 2 files changed, 80 insertions(+), 10 deletions(-)


More information about the pve-devel mailing list