Re: [libvirt] [PATCH 3/4] Update QEMU device_add command in JSON mode

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

 



On Thu, Apr 15, 2010 at 11:43:10AM +0100, Daniel P. Berrange wrote:
> The device_add command was added in JSON mode in a way I didn't
> expect. Instead of passing the normal device string to the JSON
> command:
> 
>     { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } }
> 
> We need to split up the device string into a full JSON object
> 
>     { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } }

  haha, that explains some of the hotplug device bugs we got,

> * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the
>   qemuCommandLineParseKeywords method to qemuParseKeywords
>   and export it to monitor
> * src/qemu/qemu_monitor_json.c: Split up device string into
>   a JSON object for device_add command
> ---
>  src/qemu/qemu_conf.c         |   30 ++++++++--------
>  src/qemu/qemu_conf.h         |    6 +++
>  src/qemu/qemu_monitor_json.c |   78 +++++++++++++++++++++++++++++++++++++++--
>  3 files changed, 95 insertions(+), 19 deletions(-)
> 

ACK,

the parsing code is not trivial though,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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