[libvirt] [PATCH v4] virsh: add [--domain DOMAIN] option to domxml-to-native DOMAIN COMMAND

Martin Kletzander mkletzan at redhat.com
Tue Jun 27 08:26:32 UTC 2017

On Mon, Jun 26, 2017 at 09:05:23PM -0400, Dan wrote:
>On Mon, Jun 26, 2017 at 09:30:11PM -0300, Julio Faracco wrote:
>> Hi Dan,
>> Have you tested the --xml argument as VSH_OT_ARGV?
>>      {.name = "domain",
>> -     .type = VSH_OT_DATA,
>> +     .type = VSH_OT_STRING,
>>       .flags = VSH_OFLAG_REQ_OPT,
>>       .help = N_("domain name, id or uuid")
>>      },
>>      {.name = "xml",
>> -     .type = VSH_OT_DATA,
>> +     .type = VSH_OT_ARGV,
>>       .help = N_("xml data file to export from")
>> Check the command 'domfsthaw', option 'mountpoint'.
>> This is the best approach that I got until now.
>Yes, it is working! Finally I understand it.
>When an --optionname is optional for a flag, VSH_OT_ARGV should be used.
>Similarly another such case is schedinfo's --set flag. Yeah, I should be
>more careful. Thank you very much.
>Shall I send a new patch using your apprach?
>Now domxml-to-native --help looks like:
>    domxml-to-native - Convert domain XML to native config
>    domxml-to-native <format> [--domain <string>] [[--xml] <string>]...
>    Convert domain XML config to a native guest configuration format.
>    [--format] <string>  target config data type format
>    --domain <string>  domain name, id or uuid
>    [--xml] <string>  xml data file to export from
>Just for aesthetic reason, shall I switch the order of the last two
>lines? (though I don't see a strong point to do this).

Please, submit a patch for that and don't change the line ordering.
Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170627/1bef4cbd/attachment-0001.sig>

More information about the libvir-list mailing list