Re: [PATCH 15/21] virQEMUBuildNetdevCommandlineFromJSON: Prepare for quirky 'guestfwd'

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

 



On 5/15/20 10:28 AM, Peter Krempa wrote:
QEMU models guestfwd as:

  'guestfwd': [
                  { "str": "tcp:10.0.2.1:4600-chardev:charchannel0" },
                  { "str": "...."},
              ]

I guess the original idea was to make it extensible while not worrying
about adding another object for it. Either way it requires us to add yet
another JSON->cmdline convertor for arrays.

I would have found it easier to mention both the JSON (which you did) and the corresponding CLI (which you did not):

-netdev ...,guestfwd=tcp:10.0.2.1:4600-chardev:charchannel0,guestfwd=...

But the idea makes sense - the QMP form uses quite a bit of nesting (although actual qapfication of netdev occurred late, the hand-rolled parser for netdev predated many of the best practices learned for other interfaces, and the CLI does not reflect that nesting).

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




[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]

  Powered by Linux