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

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

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.

Attachment: signature.asc
Description: Digital signature

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