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

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

 



"Daniel P. Berrange" <berrange@xxxxxxxxxx> 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

    attach-disk <domain> <source> <target> [--driver <driver>] \
      [--subdriver <subdriver>] [--type <type>] [--mode <mode>]

which may be specified independently.
Sure, all of the latter type happen to be non-boolean,
and we could use that,... until we need to add a command
with exclusive non-bool options.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]