[pbs-devel] applied: [RFC proxmox] support quoted strings in property strings

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Feb 17 12:13:06 CET 2022


On 16.02.22 14:39, Wolfgang Bumiller wrote:
> This allows free form text to exist within property strings,
> quoted, like:
>     key="A value with \"quotes, also commas",key2=value2
> or also:
>     "the value for a default_key",key2=value2
> 
> And drop ';' as a key=value separator since those are meant
> for arrays inside property strings...
> 
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
> This is mostly a reaction to Hannes' maintenance mode series.
> I think it would make more sense to improve our "property string
> specification" (as much as there is one :P) to support quoted strings.
> This way we can avoid the url encoding mess.
> 
> We could also do this in PVE (which would be particularly useful if we
> want to allow adding notes to net/disk devices).
> AFAICT the only property strings containing string values which would
> in *theory* allow quotes in the beginning wouldn't work with them in
> *practice*, (eg. the 'path' in a container's mount point, or an 'mdev'
> in a VM's hostpci entry?)
> 
>  proxmox-schema/src/lib.rs             |   2 +
>  proxmox-schema/src/property_string.rs | 163 ++++++++++++++++++++++++++
>  proxmox-schema/src/schema.rs          |  25 ++--
>  3 files changed, 177 insertions(+), 13 deletions(-)
>  create mode 100644 proxmox-schema/src/property_string.rs
> 
>

applied, thanks!

Would be great to get now for PVE too, albeit we can wait out the rust take over
there ;-P

@Hannes: can you rework the maintenance series to use this now, having mode and
message/comment more cleanly separated? I'd already apply the rest of that series,
but fwict it'd need changes in the first patch already, and the latter do not
apply independently.





More information about the pbs-devel mailing list