[pve-devel] [PATCH common] get_options: allow optional arguments "arg_params" if no ambiguity

Dietmar Maurer dietmar at proxmox.com
Thu Aug 27 06:22:05 CEST 2020


> If we run out of passed arguments from the user but still had defined
> "arg_params" (those params which went after the command in fixed
> order without option -- dashes) we always errored out with "not
> enough arguments". But, there are situations where the remaining
> arg_params are all marked as optional in the schema, so we do not
> need to error out in that case.

Ok for me, but

> A prime (future) use case is "pvesm prune-backups". Currently the
> usage is:
> > pvesm prune-backups storeid --prune-backups keep-last=1,keep-...

I would like to have a different CLI for that:

pvesm prune-backups storeid --keep-last 2 --keep-weekly 5

any opinions?





More information about the pve-devel mailing list