[pbs-devel] applied: [RFC proxmox 1/2] schema: print item type-text instead of <array>

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Sep 22 07:58:54 CEST 2021


On 15.09.21 15:36, Fabian Grünbichler wrote:
> this is only used for CLI synopsis/usage strings, the API viewer already
> prints the full type text in a correct format. the old variant was also
> rather misleading, since on the CLI we don't pass in an array, but each
> item as its own parameter.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> noticed this while working on the pull/sync filtering series, but it
> affects quite a lot of stuff, among other things the Updater/Deleteable
> CLI, e.g. from `man proxmox-backup-manager`:
> 
>        --delete <array>
>                      List of properties to delete.
> 
> vs.
> 
>        --delete disable|validation-delay
>                      List of properties to delete.
> 
> but some of them might only have <string> as the item type text, which
> is not much nicer :-/
> 
> the whole "List of .." is confusing anyway, but not easily solvable,
> since the description is used for
> - API dump/viewer (where it is a list/array of ..)
> - usage message/man pages (where it's a parameter that gives a single
>   element, but it might be passed in multiple times to construct an
>   array)
> 
> also for some common occurences, the item description is too generic,
> and it's not possible to override the description for external types
> with the current api macro.
> 
>  proxmox/src/api/format.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks! FYI: I moved most of the diff-stat text to the commit message,
slightly cleaned up. IMO it gives better context.





More information about the pbs-devel mailing list