public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dietmar Maurer <dietmar@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>
Subject: Re: [pve-devel] [PATCH common] get_options: allow optional arguments "arg_params" if no ambiguity
Date: Thu, 27 Aug 2020 06:22:05 +0200 (CEST)	[thread overview]
Message-ID: <2082154169.147.1598502126547@webmail.proxmox.com> (raw)
In-Reply-To: <20200826192710.2131502-1-t.lamprecht@proxmox.com>


> 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?




  reply	other threads:[~2020-08-27  4:23 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 [this message]
2020-08-27  6:39   ` Thomas Lamprecht
2020-08-27  7:54     ` Fabian Ebner
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=2082154169.147.1598502126547@webmail.proxmox.com \
    --to=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal