From: Fabian Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Cc: Thomas Lamprecht <t.lamprecht@proxmox.com>,
Dietmar Maurer <dietmar@proxmox.com>
Subject: Re: [pve-devel] [PATCH common] get_options: allow optional arguments "arg_params" if no ambiguity
Date: Thu, 27 Aug 2020 09:54:35 +0200 [thread overview]
Message-ID: <fc24bebf-d7fb-2cb1-e0a7-c4a04ea08cf5@proxmox.com> (raw)
In-Reply-To: <c6ad534c-5f93-f6e8-7d90-366845f97cde@proxmox.com>
Am 27.08.20 um 08:39 schrieb Thomas Lamprecht:
> On 27.08.20 06:22, Dietmar Maurer wrote:
>>
>>> 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?
>>
>
> Fine for me!
>
> @Fabi, can you take a look at this?
>
> Effectively we just need to use the 'prune-backups' format defiinitions
> $prune_backups_format hash from Storage::Plugin directly as parameter,
> then we can map and pass it along to the helper.
>
Yes, will do.
next prev parent reply other threads:[~2020-08-27 7:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-26 19:27 Thomas Lamprecht
2020-08-27 4:22 ` Dietmar Maurer
2020-08-27 6:39 ` Thomas Lamprecht
2020-08-27 7:54 ` Fabian Ebner [this message]
2020-08-27 8:54 ` [pve-devel] applied: " Thomas Lamprecht
2020-08-31 10:25 ` Fabian Grünbichler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fc24bebf-d7fb-2cb1-e0a7-c4a04ea08cf5@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=dietmar@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox