openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #10865
Re: OpenStack Client Followup
On Mon, Apr 30, 2012 at 3:27 PM, Dean Troyer <dtroyer@xxxxxxxxx> wrote:
> On Mon, Apr 30, 2012 at 2:19 PM, Dolph Mathews <dolph.mathews@xxxxxxxxx>
> wrote:
> > I find this behavior really annoying... --help should be contextual
> > (depending on whether a subcommand is present, and what it is).
>
> > I hope not... +1 for argparse.
>
> Actually, argparse is one reason for this behaviour. It doesn't like
> duplicated options in subparsers, nor subsets of names like we found
> in keystone with --tenant and --tenant_id, etc. IIRC none of the
> existing clients do that, they all rely on 'help command' to get
> command-specific help.
Duplicated options will be less of an issue with cliff, since the second
level parser isn't instantiated until after the options to the main program
have already been consumed.
References