qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Should we auto-generate IDs?


From: Eric Blake
Subject: Re: [Qemu-devel] Should we auto-generate IDs?
Date: Thu, 27 Aug 2015 13:20:19 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 08/27/2015 12:59 PM, John Snow wrote:

>> Dan made the point that if a name is unpredictable, then we have
>> to query to learn what name was assigned.  But if you add two or
>> more devices before querying, then you don't know which device has
>> which name.  Predictable might actually be better than
>> non-predictable.
>>
> 
> Can we add the information into the QMP response?

Yes, any command that currently returns nothing (aka {}) can be expanded
to return something useful, such as the name of the device just
allocated, without breaking back-compat.  That would be one less round
trip (create a device, and the response is the devices name; rather than
create a device and pass a second command to query its name).  But
remember that even things as trivial as creating a disk device may open
several BDS and therefore create several named items at once, so we have
to be careful that all the information can be parsed.

On the bright side, Markus' introspection work would let us know if a
command's return struct supplies the additional information.  On the
downside, management apps that want to talk to older qemu probably
wouldn't use it anyways, as they have to have the fallback of supplying
a name in the first place for older qemu, at which point supplying the
name always is easier than making code conditional on whether qemu is
new enough to introspect.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]