[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] tests: new test: virsh-synopsis

On Fri, Nov 21, 2008 at 12:06:30PM +0100, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange redhat com> wrote:
> > On Fri, Nov 21, 2008 at 11:13:03AM +0100, Jim Meyering wrote:
> >> I wanted help SYNOPSIS output that was regular enough to parse.
> >
> >>  static const vshCmdInfo info_network_create[] = {
> >> -    {"syntax", "create a network from an XML <file>"},
> >> +    {"syntax", "net-create <file>"},
> >
> > I'm kind of wondering why we manually write the "syntax" string at all.
> > We know the name of the command, and we know the names of all the
> > args, so we can auto-generate this entire string.
> Right.  Everything we need is already in e.g., the
> associated vshCmdOptDef table.
> Any objection to committing that for now?
> Once those lines are all generated, the test
> won't be needed any more, but in the mean time
> it might help.


> BTW, I don't see a way to distinguish mutually-exclusive
> boolean options (like --all and --inactive, which appear in each
> synopsis like [ --inactive | --all ]) from ones that can be
> combined like those of attach-disk

I don't think that's a huge problem - just list them all, and use the
description text to specify the constraints on their use.

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]