[pve-devel] [RFC qemu-server v3 17/22] parse config: allow config keys with minus sign

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Oct 21 15:28:25 CEST 2024


thanks for the reminder on this one.

Am 16/04/2024 um 11:02 schrieb Fiona Ebner:
>> Anyhow, this on it's own would be fine by me, but in any case we
>> should at least document why the formats are mixed would be good, users
>> can be confused by it, and cannot know that most of the "bad" options
>> isn't the fault from the devs currently mainly working on PVE.
>
> Where would be a good place for this? In the appendix for the CLI in the
> admin guide? What exactly is the reason, just that the underscore was
> preferred when the project started out?

Hmm, maybe in the Configuration Files [0] appendix and then link to that
in the CLI one with a note that properties are generally derived from the
config schema?

And yeah, the original snake_case use can probably be attributed a bit to
Perl's and hash key accesses though, because, as you undoubtedly know,
snake_case properties can be used without quotes, unlike, e.g. 'kebab-case'.
But besides that I'd just say different devs and less enforcement of style
lead to the mix.

[0]: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_configuration_files_2

> Or should I re-spin naming the option "fleecing_images"?

No hard feelings either way, for new properties it is not further
restricting w.r.t. where a backup can be restored, as the new property
needs to be supported there anyway, independent of spelling, so if no
other dev has an opinion here I'd probably keep this as is; but we
really should look into s/_/-/ normalization and acceptance of either
variant for the next major release with some long term goal to sunset
the snake_case variants in the API, for config restore we probably want
to keep it forever. 




More information about the pve-devel mailing list